LearningTransformsv1

Encrypt and decrypt text with AES-GCM

Encrypt text locally with authenticated encryption, then decrypt the packaged payload with the same passphrase.

Reddit
Output
Transformed result
Generated locally after the page loads.
Programming example
Input
Relationship

What connects the input and output?

PBKDF2 derives a 256-bit key from the passphrase and a random salt. AES-GCM encrypts the UTF-8 bytes with a fresh 96-bit initialization vector and authenticates the ciphertext. The salt, vector and ciphertext are packaged together for this demonstration.

Sources

3
  1. NIST SP 800-38D: GCM and GMACNational Institute of Standards and TechnologyUS-PUBLIC-DOMAIN
  2. NIST SP 800-132: Password-Based Key DerivationNational Institute of Standards and TechnologyUS-PUBLIC-DOMAIN
  3. MDN: SubtleCrypto encrypt()Mozilla Developer Network

Discussion

0

Sign in to join the discussion.