poly1305.c (785B)
1 #include "poly1305.h" 2 3 static void 4 _poly1305_clamp(unsigned char r[static 16]) 5 { 6 // r &= 0x0ffffffc 0ffffffc 0ffffffc 0fffffff 7 // r &= 0x0ffffffc 0x0ffffffc 0x0ffffffc 0x0fffffff 8 // 9 uint32_t *vs = (void *) r; 10 } 11 12 void 13 poly1305_init(struct poly1305_ctx *ctx, 14 unsigned char const key[static POLY1305_KEY_SIZE]) 15 { 16 } 17 18 void 19 poly1305_push(struct poly1305_ctx *ctx, void const *buf, size_t len) 20 { 21 } 22 23 void 24 poly1305_dgst(struct poly1305_ctx *ctx, 25 unsigned char digest[static POLY1305_DIGEST_SIZE]) 26 { 27 } 28 29 void 30 poly1305(unsigned char const key[static POLY1305_KEY_SIZE], 31 void const *buf, size_t len, 32 unsigned char digest[static POLY1305_DIGEST_SIZE]) 33 { 34 struct poly1305_ctx ctx; 35 poly1305_init(&ctx, key); 36 poly1305_push(&ctx, buf, len); 37 poly1305_dgst(&ctx, digest); 38 }