ToolypetMCP
advanced5 minutessecurity

Full Encryption Pipeline

Complete encryption pipeline: generate keys, encrypt data, create integrity hash, and sign with HMAC.

encryptionpipelineaeshmackeys

इस रेसिपी का उपयोग कब करें

Implement a proper encrypt-then-MAC pipeline for sensitive data like healthcare records, financial data, or PII. Follows NIST and OWASP best practices.

चरण

1

Generate asymmetric keys

प्रॉम्प्ट:Generate a 2048-bit RSA key pair for key exchange
2

Create symmetric keys

प्रॉम्प्ट:Generate a 256-bit AES key and 128-bit IV for symmetric encryption
3

Encrypt the data

प्रॉम्प्ट:Encrypt sensitive data 'Patient record: John Doe, SSN: 123-45-6789' using AES-256-CBC
4

Create integrity hash

प्रॉम्प्ट:Generate SHA-512 hash of the ciphertext for integrity verification
5

Sign the ciphertext

प्रॉम्प्ट:Generate HMAC-SHA256 of the ciphertext for authenticated integrity (encrypt-then-MAC)

अक्सर पूछे जाने वाले प्रश्न

Why use both RSA and AES?

RSA encrypts the AES key (key exchange). AES encrypts the data (fast symmetric encryption). This hybrid approach combines RSA's key management with AES's speed.

What is encrypt-then-MAC?

Encrypt data first, then compute MAC over ciphertext. The receiver verifies MAC before decrypting, preventing padding oracle attacks. The recommended order per cryptographic standards.

संबंधित रेसिपी