[][src]Module rust_sodium::crypto::onetimeauth::poly1305

crypto_onetimeauth_poly1305, an authenticator specified in Cryptography in NaCl, Section 9. This authenticator is proven to meet the standard notion of unforgeability after a single message.

Structs

Key

Authentication Key

Tag

Authentication Tag

Constants

KEYBYTES

Number of bytes in a Key.

TAGBYTES

Number of bytes in a Tag.

Functions

authenticate

authenticate() authenticates a message m using a secret key k. The function returns an authenticator tag.

gen_key

gen_key() randomly generates a key for authentication

verify

verify() returns true if tag is a correct authenticator of message m under a secret key k. Otherwise it returns false.