poly1305-donna.h 658 B

1234567891011121314151617181920
  1. #ifndef POLY1305_DONNA_H
  2. #define POLY1305_DONNA_H
  3. #include <stddef.h>
  4. typedef struct poly1305_context {
  5. size_t aligner;
  6. unsigned char opaque[136];
  7. } poly1305_context;
  8. void poly1305_init(poly1305_context *ctx, const unsigned char key[32]);
  9. void poly1305_update(poly1305_context *ctx, const unsigned char *m, size_t bytes);
  10. void poly1305_finish(poly1305_context *ctx, unsigned char mac[16]);
  11. void poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, const unsigned char key[32]);
  12. int poly1305_verify(const unsigned char mac1[16], const unsigned char mac2[16]);
  13. int poly1305_power_on_self_test(void);
  14. #endif /* POLY1305_DONNA_H */