ToolypetMCP
advanced4 minutessecurity

Data Encryption Workflow

Encrypt sensitive data with AES, manage encryption keys securely, and verify with HMAC.

encryptionaeshmackeys

Quando usar esta receita

Protect sensitive data at rest — user PII, payment information, health records. AES-256-GCM provides authenticated encryption, and HMAC adds an additional integrity layer.

Etapas

1

Create a strong encryption key

Prompt:Generate a 256-bit encryption key in hex format
2

Encrypt the data

Prompt:Encrypt 'sensitive user data' using AES-256-GCM with the generated key
3

Add integrity protection

Prompt:Generate HMAC of the encrypted data for integrity verification

Perguntas frequentes

Why use AES-GCM instead of AES-CBC?

GCM provides authenticated encryption — it detects if the ciphertext was tampered with. CBC requires a separate MAC (like HMAC) for integrity, making GCM simpler and more secure.

How should I store encryption keys?

Never store keys alongside encrypted data. Use a key management service (KMS) like AWS KMS, HashiCorp Vault, or environment variables for development.

Receitas relacionadas