diff options
Diffstat (limited to 'src/libcryptobox/poly1305/ref-64.c')
-rw-r--r-- | src/libcryptobox/poly1305/ref-64.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libcryptobox/poly1305/ref-64.c b/src/libcryptobox/poly1305/ref-64.c index f6ead5955..db7b85c1e 100644 --- a/src/libcryptobox/poly1305/ref-64.c +++ b/src/libcryptobox/poly1305/ref-64.c @@ -5,6 +5,7 @@ */ #include "config.h" +#include "poly1305.h" enum { POLY1305_BLOCK_SIZE = 16 }; @@ -62,12 +63,12 @@ U64TO8(unsigned char *p, uint64_t v) { p[7] = (unsigned char)(v >> 56) & 0xff; } -static size_t +size_t poly1305_block_size_ref(void) { return POLY1305_BLOCK_SIZE; } -static void +void poly1305_init_ext_ref(void *state, const poly1305_key *key, size_t bytes_hint) { poly1305_state_ref_t *st = (poly1305_state_ref_t *)state; uint64_t t0, t1; @@ -94,7 +95,7 @@ poly1305_init_ext_ref(void *state, const poly1305_key *key, size_t bytes_hint) { st->final = 0; } -static void +void poly1305_blocks_ref(void *state, const unsigned char *in, size_t inlen) { poly1305_state_ref_t *st = (poly1305_state_ref_t *)state; const uint64_t hibit = (st->final) ? 0 : ((uint64_t)1 << 40); /* 1 << 128 */ @@ -146,7 +147,7 @@ poly1305_blocks_ref(void *state, const unsigned char *in, size_t inlen) { st->h[2] = h2; } -static void +void poly1305_finish_ext_ref(void *state, const unsigned char *in, size_t remaining, unsigned char mac[16]) { poly1305_state_ref_t *st = (poly1305_state_ref_t *)state; uint64_t h0, h1, h2, c; @@ -215,7 +216,7 @@ poly1305_finish_ext_ref(void *state, const unsigned char *in, size_t remaining, } -static void +void poly1305_auth_ref(unsigned char mac[16], const unsigned char *in, size_t inlen, const poly1305_key *key) { poly1305_state_ref_t st; size_t blocks; |