1 /******************************************************************************
2  *  Filename:       sw_poly1305-donna.h
3  ******************************************************************************/
4 
5 #ifndef POLY1305_DONNA_H
6 #define POLY1305_DONNA_H
7 
8 #include <stddef.h>
9 
10 typedef struct
11 {
12     size_t aligner;
13     unsigned char opaque[136];
14 } poly1305_context;
15 
16 void poly1305_init(poly1305_context *ctx, const unsigned char key[32]);
17 void poly1305_update(poly1305_context *ctx, const unsigned char *m, size_t bytes);
18 void poly1305_finish(poly1305_context *ctx, unsigned char mac[16]);
19 void poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, const unsigned char key[32]);
20 
21 int poly1305_verify(const unsigned char mac1[16], const unsigned char mac2[16]);
22 int poly1305_power_on_self_test(void);
23 
24 #endif /* POLY1305_DONNA_H */
25