Skip to main content

Module poly1305

Module poly1305 

Source
Expand description

§Poly1305 MAC

Poly1305 is a fast message-authentication code specified in RFC 8439. The 16-byte tag authenticates a message with a 32-byte key split into a polynomial part r and a one-time pad s.

§Example

use crypto::poly1305::Poly1305;

let key = b"0123456789abcdef0123456789abcdef";
let tag = Poly1305::mac(key, b"authenticate me");
assert_eq!(tag.len(), 16);

Structs§

Poly1305
Poly1305 streaming MAC state.