nrfxlib API 0.1.0
|
Type declaration and APIs for the Poly1035 algorithm. More...
Macros | |
#define | ocrypto_poly1305_KEY_BYTES (32) |
#define | ocrypto_poly1305_BYTES (16) |
Functions | |
void | ocrypto_poly1305 (uint8_t r[(16)], const uint8_t *in, size_t in_len, const uint8_t k[(32)]) |
Incremental Poly1305 generator. | |
This group of functions can be used to incrementally compute the Poly1305 authenticator on a message. Use pattern: ocrypto_poly1305_init(ctx, key);
ocrypto_poly1305_update(ctx, m, m_len);
...
ocrypto_chacha20_update(ctx, m, m_len);
ocrypto_poly1305_final(ctx, tag);
void ocrypto_poly1305_init(ocrypto_poly1305_ctx *ctx, const uint8_t key[(32)]) void ocrypto_poly1305_final(ocrypto_poly1305_ctx *ctx, uint8_t r[(16)]) void ocrypto_poly1305_update(ocrypto_poly1305_ctx *ctx, const uint8_t *in, size_t in_len) | |
void | ocrypto_poly1305_init (ocrypto_poly1305_ctx *ctx, const uint8_t key[(32)]) |
void | ocrypto_poly1305_update (ocrypto_poly1305_ctx *ctx, const uint8_t *in, size_t in_len) |
void | ocrypto_poly1305_pad (ocrypto_poly1305_ctx *ctx) |
void | ocrypto_poly1305_final (ocrypto_poly1305_ctx *ctx, uint8_t r[(16)]) |
Type declaration and APIs for the Poly1035 algorithm.
Poly1305 is a message authentication code created by Daniel J. Bernstein. It can be used to verify the data integrity and the authenticity of a message.
Poly1305 takes a one-time key to produce an authentication tag for a message. Since a key can only be used to authenticate a single message, a new key needs to be derived for each message.