Symmetric encryption · ChaCha20
ChaCha20-Poly1305 Text Encryption
Build modern AEAD payloads with ChaCha20-Poly1305. Generate ciphertext + 16-byte tags, or verify inbound messages by supplying the key, nonce, and AAD—all without leaving your browser.
ChaCha20-Poly1305 encryption
Protect text payloads with ChaCha20-Poly1305. Configure the 256-bit key, 96-bit nonce, and optional additional authenticated data (AAD) to export ciphertext with tags or to verify and decrypt incoming data.
Keys shorter than 32 bytes are zero-padded; longer inputs are truncated.
Nonces must be unique for each key and message. The canonical length is 12 bytes.
ChaCha20-Poly1305 tips
ChaCha20 provides stream-style confidentiality while Poly1305 authenticates the ciphertext and optional AAD. Both sides must use the same key, nonce, AAD, and encoding to produce identical outputs.
Never reuse a nonce with the same key. Doing so compromises confidentiality. Generate 12 random bytes for each message, and send them alongside the ciphertext and 16-byte tag.
The ciphertext shown above already includes the Poly1305 tag. When exchanging data, transfer the combined payload exactly as produced to ensure verification succeeds.