Poly1305 is a message authentication code used widely in modern AEAD constructions
such as ChaCha20-Poly1305. For correct operation, Poly1305 requires a 32-byte one-time key
and this tool generates that key.
The Poly1305 Key Generator creates a cryptographically secure,
one-time 32-byte (256-bit) key - in formats (Hex, Base64, Base32) suitable for Poly1305 message authentication.
If you're experimenting with ChaCha20 encryption/decryption you may find our
ChaCha20 online tool useful as well.
Generate 32-byte Poly1305 key Online
Generating...
{{vm.response.key || 'No key yet'}}
Support This Free Tool!
I build these tools to give you fast, secure, privacy-friendly utilities—free and
signup-free.
Buying me a coffee helps keep the project running and supports
new features.
Thank you for helping this tool thrive!
We do not store, log any key you enter. This tool runs entirely over a secure HTTPS
connection to keep your encryption key safe at all times.
Usage Guide
Below is the usage guide of this tool.
How to use the Poly1305 Key Generator
Open the tool.
Select the desired encoding (Hex / Base64 / Base32).
Click Generate Poly1305 Key. The encoded key will appear immediately.
Use Copy to copy the encoded key to clipboard or Download to save the raw 32-byte binary key.
Key features
Fixed 32-byte key (256 bits) — required by Poly1305 and enforced in UI and backend.
Secure generation — keys are generated using a secure RNG (server side) and are never written to logs.
Multiple encodings — Hex, Base64, Base32 for developer convenience.
One-click copy & download — download the key as a raw binary file for use with libraries.
Developer example — how to use the key
Below is a simple example in pseudocode showing how the generated 32-byte key will typically be used with ChaCha20-Poly1305 libraries.
// pseudocode// 32 bytes
key = read_key_from_file("/tmp/poly1305_key_32b.bin")
aad = "optional-associated-data"
// per AEAD construction (e.g., 12 bytes for RFC7539)
nonce = generate_nonce()
ciphertext, tag = chacha20_poly1305_encrypt(key, nonce, plaintext, aad)
// 'tag' here is the Poly1305 authentication tag
Security tip: Poly1305 one-time keys must not be reused with the same stream/cipher state. If you plan to switch to a client-only mode (where keys never leave the browser), consider using a verified cryptographic library (libsodium / WebCrypto / libsodium.js).