AES-256-GCM passphrase envelope

PBKDF2-HMAC-SHA-256 derives a key-encryption key from the passphrase; it wraps a random 256-bit data key with AES-KW (RFC 3394); the data key encrypts under AES-GCM with the associated data authenticated but not encrypted. Output: v2.salt.iv.wrappedKey.aad.ciphertext.iterations.

Output


        

Changing the passphrase re-wraps 40 bytes instead of re-encrypting the data. The tests check this envelope against tampered ciphertext and tampered associated data, and AES-GCM itself against NIST GCM test case 16.

Every operation runs in your browser on the Web Crypto API; the content-security policy sets connect-src 'none', so nothing can be sent anywhere. Keys generated here are ephemeral and not stored.