33 #ifndef MBEDTLS_POLY1305_H 34 #define MBEDTLS_POLY1305_H 36 #if !defined(MBEDTLS_CONFIG_FILE) 39 #include MBEDTLS_CONFIG_FILE 45 #define MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA -0x0057 49 #define MBEDTLS_ERR_POLY1305_FEATURE_UNAVAILABLE -0x0059 53 #define MBEDTLS_ERR_POLY1305_HW_ACCEL_FAILED -0x005B 59 #if !defined(MBEDTLS_POLY1305_ALT) 72 #include "poly1305_alt.h" 116 const unsigned char key[32] );
137 const unsigned char *input,
153 unsigned char mac[16] );
174 const unsigned char *input,
176 unsigned char mac[16] );
178 #if defined(MBEDTLS_SELF_TEST) 185 int mbedtls_poly1305_self_test(
int verbose );
size_t queue_len
Definition: poly1305.h:67
Definition: poly1305.h:61
Configuration options (set of defines)
uint8_t queue[16]
Definition: poly1305.h:66
struct mbedtls_poly1305_context mbedtls_poly1305_context
uint32_t r[4]
Definition: poly1305.h:63
int mbedtls_poly1305_starts(mbedtls_poly1305_context *ctx, const unsigned char key[32])
This function sets the one-time authentication key.
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.
uint32_t s[4]
Definition: poly1305.h:64
uint32_t acc[5]
Definition: poly1305.h:65
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.