Poly1305 one-time message authentication code.
More...
Poly1305 one-time message authentication code.
Poly1305 is a one-time authenticator designed by D.J. Bernstein. It uses a 32-byte one-time key and a message and produces a 16-byte tag.
◆ POLY1305_BLOCK_SIZE
#define POLY1305_BLOCK_SIZE 16 |
Poly1305 block size.
Definition at line 41 of file poly1305.h.
◆ poly1305_auth()
void poly1305_auth |
( |
uint8_t * |
mac, |
|
|
const uint8_t * |
data, |
|
|
size_t |
len, |
|
|
const uint8_t * |
key |
|
) |
| |
Calculate a single poly1305 tag.
- Parameters
-
mac | 16 byte buffer for the tag |
data | ptr to the message |
len | length of the message |
key | 32 byte key |
◆ poly1305_finish()
Finish the poly1305 operation.
- Parameters
-
ctx | poly1305 context |
mac | 16 byte buffer for the tag |
◆ poly1305_init()
Initialize a poly1305 context.
- Parameters
-
ctx | Poly1305 context |
key | 32 byte key |
◆ poly1305_update()
void poly1305_update |
( |
poly1305_ctx_t * |
ctx, |
|
|
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Update the poly1305 context with a block of message.
- Parameters
-
ctx | poly1305 context |
data | ptr to the message |
len | length of the message |