🔓 Decrypt Data with HMAC Verification

Proper decryption with authentication verification

⚠️ Important: HMAC cannot be "decrypted" - it's a one-way hash for authentication. This tool shows how to decrypt AES-encrypted data while verifying its HMAC signature.

🔒 Production Requirements: This demo requires HTTPS to work in production (crypto.subtle API requirement).
1. Encrypt Data
2. Decrypt & Verify
3. Manual Input

Step 1: Create Encrypted Data with HMAC

First, let's encrypt some data and generate its HMAC for authentication:

Step 2: Decrypt Data with HMAC Verification

Now decrypt the data while verifying its authenticity:

1
Verify HMAC to ensure data integrity
2
If HMAC is valid, decrypt the data
3
Display the original plaintext

Step 3: Manual Decryption (Paste Your Own Data)

If you have encrypted data from another source:

Understanding the Process

Encryption Process:
1. Generate random IV (Initialization Vector) 2. Encrypt data using AES-CBC + key + IV 3. Generate HMAC of (encrypted_data + IV) using HMAC key 4. Store: encrypted_data, IV, HMAC
Decryption Process:
1. Calculate HMAC of (encrypted_data + IV) using HMAC key 2. Compare with stored HMAC - if different, data is tampered! 3. If HMAC matches, decrypt using AES-CBC + key + IV 4. Return original plaintext