limb 0.2.0

2024-01-09

poly1305_init(3)
limb manual
poly1305_init(3)

NAME

poly1305_init, poly1305_update, poly1305_final - compute Poly1305-based MAC of a message

SYNOPSIS

#include <limb/poly1305.h>
void poly1305_init(const void *key, void *ctx)
void poly1305_update(const void *msg, size_t mlen, void *ctx)
void poly1305_final(void *dst, void *ctx)

DESCRIPTION

The poly1305_init() function initializes the given poly1305 context ctx to compute a Poly1305-based message authentication code.

This implementation is conform to RFC 8439, as such the key pointed to by key must be 256bit/32 bytes long.

The poly1305_upate() function feeds the specified chunk of data pointed by msg of length mlen (in bytes) to be hashed into the given ctx. You can call this function as many times as needed.

The poly1305_final() function stores the computed MAC from ctx in binary form into dst, which must be able to store 16 bytes.

SEE ALSO

hmac(3), ccpl_init(3)

limb 0.1.0
2023-07-24
poly1305_init(3)