MAC family

Poly1305

Bernstein's fast one-time authenticator, paired with ChaCha20 in RFC 8439

standard 1 variant RFC 8439

Overview

Poly1305 is a one-time message authentication code designed by Daniel J. Bernstein. Combined with ChaCha20 in the ChaCha20-Poly1305 AEAD, it is one of the two dominant authenticated-encryption constructions on the internet alongside AES-GCM.

Poly1305 evaluates a polynomial over the prime field modulo 2^130 − 5. The message is split into 16-byte chunks, each extended with a 1 bit, and the polynomial with these chunks as coefficients is evaluated at a secret point r, with certain bits of r clamped to zero for efficient implementation. A second secret s is added to the result modulo 2^128 to produce a 16-byte tag.

The pair (r, s) must be used for only one message. In ChaCha20-Poly1305 a fresh key pair is derived for each message from the first ChaCha20 keystream block. Poly1305 was originally published in 2005 with AES generating s; RFC 8439 standardises it with ChaCha20. It is constant-time when implemented carefully.

History

2005–2018
  1. Poly1305-AES published by Daniel J. Bernstein

  2. ChaCha20-Poly1305 specified in RFC 7539

  3. Updated in RFC 8439

Security notes

Poly1305 is secure only if each key is used once. Reusing a key for two messages allows forgeries. Within AEAD constructions with unique nonces this holds automatically.

Typical uses

ChaCha20-Poly1305 AEAD in TLS 1.3, SSH, WireGuardNaCl/libsodium secretbox (XSalsa20-Poly1305)Fast software authentication without AES hardware

Variants in NextSSL

1
AlgorithmTierSizes (bytes)StandardsAPI
Poly1305
poly1305
standard key 32 · tag 16 RFC 8439 safe

Frequently asked questions

Which Poly1305 variants does NextSSL include?

NextSSL registers 1 Poly1305 variant: poly1305.