32 #ifndef MBEDTLS_POLY1305_H
33 #define MBEDTLS_POLY1305_H
42 #define MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA -0x0057
48 #if !defined(MBEDTLS_POLY1305_ALT)
50 typedef struct mbedtls_poly1305_context
58 mbedtls_poly1305_context;
61 #include "poly1305_alt.h"
105 const unsigned char key[32] );
126 const unsigned char *input,
142 unsigned char mac[16] );
163 const unsigned char *input,
165 unsigned char mac[16] );
167 #if defined(MBEDTLS_SELF_TEST)
#define MBEDTLS_PRIVATE(member)
int mbedtls_poly1305_self_test(int verbose)
The Poly1305 checkup routine.
Macro wrapper for struct's memebrs.
int mbedtls_poly1305_starts(mbedtls_poly1305_context *ctx, const unsigned char key[32])
This function sets the one-time authentication key.
Build-time configuration info.
int mbedtls_poly1305_update(mbedtls_poly1305_context *ctx, const unsigned char *input, size_t ilen)
This functions feeds an input buffer into an ongoing Poly1305 computation.
void mbedtls_poly1305_init(mbedtls_poly1305_context *ctx)
This function initializes the specified Poly1305 context.
int mbedtls_poly1305_mac(const unsigned char key[32], const unsigned char *input, size_t ilen, unsigned char mac[16])
This function calculates the Poly1305 MAC of the input buffer with the provided key.
int mbedtls_poly1305_finish(mbedtls_poly1305_context *ctx, unsigned char mac[16])
This function generates the Poly1305 Message Authentication Code (MAC).
void mbedtls_poly1305_free(mbedtls_poly1305_context *ctx)
This function releases and clears the specified Poly1305 context.