Skip to content

Poly1305 MAC Generator and Verifier Online

Poly1305 is a fast, secure message authentication code (MAC) designed to detect accidental or malicious changes to messages. It produces a 16-byte tag for a message using a 32-byte secret key. Poly1305 is commonly used as the authentication part of the ChaCha20-Poly1305 AEAD construction.

Below is the Poly1305 MAC Generator and Verifier tool allows users to quickly compute authentication tags for messages, verify tags received from APIs or secure communication systems, and validate message integrity in real time. Use HMAC-SHA256 Generator for a broader library support or standardized hash functions.

Generate 32-byte Poly1305 key Online (optional)

Generated on the DevGlan server. Use each raw Poly1305 key for only one message.

Generate MAC

Raw Poly1305, computed on the DevGlan server.

Non-empty text takes precedence over a file.

Configuration-matched examples

The Java example requires Bouncy Castle on the classpath, a raw 32-byte key.bin, and raw message.bin. Verification also reads a 32-character hexadecimal tag from tag.hex.

Use OpenSSL 3 with raw message bytes in message.bin and a one-time 64-character hex key. No entered secrets are included.



Verify MAC

Raw Poly1305, computed on the DevGlan server.

Non-empty text takes precedence over a file.

Configuration-matched examples

The Java example requires Bouncy Castle on the classpath, a raw 32-byte key.bin, and raw message.bin. Verification also reads a 32-character hexadecimal tag from tag.hex.

Use OpenSSL 3 with raw message bytes in message.bin and a one-time 64-character hex key. No entered secrets are included.



Key Features

  • You can generate a Poly1305 tag (MAC) for a text input or file using a 32-byte key (HEX).
  • You can verify that a given tag matches a message and key - verification returns valid/invalid.
  • For real-world systems prefer AEAD (ChaCha20-Poly1305), using a unique nonce for every encryption under the same key.

PolyMac is not suitable for password storage or password hashing. If you are storing user passwords or deriving encryption keys from passwords, use a password hashing function instead:

Usage Guide - step by step

  1. Choose Generate or Verify card: Pick whether you want to create a tag or check an existing tag for a message/file.
  2. Provide a 32-byte key (HEX): A 256-bit key; you can paste your own or use the Generate Key button to get a new key in hex format, then choose an explicit Use action. Keep the key secret.
  3. Provide message or file: Either type/paste the exact message into the text box or upload a file to MAC the file bytes. The MAC covers the exact bytes - whitespace and encodings matter.
  4. Generate tag: Click Generate MAC. The tool returns a 16-byte tag (displayed as HEX) you can copy or download.
  5. Verify: To verify, use the Verify card, enter the same key and the tag (HEX), and either paste the original message or upload the same file. The tool will respond VALID or INVALID.

Practical use cases

1) API message integrity: When two services exchange messages, they can attach a Poly1305 tag to each payload. The receiver verifies the tag before processing to ensure the payload is authentic.

2) Signed file download validation: For secure file transfer between systems, the sender provides the file plus a Poly1305 tag. The receiver verifies the tag after download to detect corruption or tampering.

3) Embedded systems & IoT: Resource-constrained devices benefit from Poly1305’s speed. Use it to authenticate telemetry packets where CPU and memory are limited.

4) Educational & debugging: Use this tool to learn how MACs work, to generate test vectors, and to debug interoperability between libraries (server vs browser implementations).

Comparison between Hashing and Mac tools

Algorithm Purpose Use for Passwords?
HMAC-SHA256 Message authentication ❌ No
Poly1305 Message authentication ❌ No
Argon2 Password hashing ✅ Yes
PBKDF2 Password hashing / KDF ✅ Yes

Frequently asked questions

Can I reuse a Poly1305 key?

Never use the same raw Poly1305 key to authenticate different messages: doing so can allow forged tags. Use the original key to verify its message and tag; verification does not require a new key. For each new message, generate a fresh independent 32-byte key. In ChaCha20-Poly1305, the long-term key can be used for multiple messages only with a unique nonce for every encryption under that key; the construction derives a one-time Poly1305 key for each nonce. This raw Poly1305 tool does not accept a nonce or derive one-time keys.

Where is processing performed?

Keys are generated and MACs are computed on the DevGlan server. Submitted keys and message bytes leave your browser. This tool does not persist your drafts in browser storage.

❤️ Liked this tool?

If it saved you time, consider buying me a coffee to support future improvements.

Help Others Find This

References