Digital Envelope
Digital envelope encryption: encrypt symmetric key with recipient's public key, encrypt message with symmetric key.
Recipient Key Pair
Seal (Encrypt)
Open (Decrypt)
Usage
Digital Envelope Principle
Digital envelope combines the advantages of symmetric encryption (fast) and asymmetric encryption (secure key distribution): sender generates a random symmetric key to encrypt the message, then encrypts the symmetric key with the recipient's public key; recipient decrypts the symmetric key with their private key, then decrypts the message.
Steps
1. Recipient clicks "Generate Key Pair" and sends the public key to the sender; 2. Sender enters message, clicks "Seal & Encrypt", and sends the encrypted symmetric key, encrypted message, and IV to the recipient; 3. Recipient fills in the three items and clicks "Open & Decrypt" to retrieve the original text.
Technical Implementation
Uses RSA-OAEP (2048-bit, SHA-256) to encrypt the symmetric key, AES-GCM (256-bit) to encrypt the message. All operations are based on the browser's native Web Crypto API; keys never leave the local machine.