X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/57496a500309c335ff9c60d3462757c0c5f04801..25f3ce6a509ff9e3a354303023cb2028e9f83b95:/symm/poly1305.h diff --git a/symm/poly1305.h b/symm/poly1305.h index bcc81c29..2441ad05 100644 --- a/symm/poly1305.h +++ b/symm/poly1305.h @@ -69,6 +69,7 @@ extern const octet poly1305_keysz[]; #define POLY1305_BLKSZ 16u #define POLY1305_KEYSZ 16u #define POLY1305_MASKSZ 16u +#define POLY1305_TAGSZ 16u /*----- Data structures ---------------------------------------------------*/ @@ -178,6 +179,23 @@ extern void poly1305_hash(poly1305_ctx */*ctx*/, extern void poly1305_flush(poly1305_ctx */*ctx*/); +/* --- @poly1305_flushzero@ --- * + * + * Arguments: @poly1305_ctx *ctx@ = MAC context to flush + * + * Returns: --- + * + * Use: Forces any buffered message data in the context to be + * processed, by hashing between zero and fifteen additional + * zero bytes. Like @poly1305_flush@, this has no effect if the + * the message processed so far is a whole number of blocks. + * Unlike @poly1305_flush@, the behaviour if the message is not + * a whole number of blocks is equivalent to actually hashing + * some extra data. + */ + +extern void poly1305_flushzero(poly1305_ctx */*ctx*/); + /* --- @poly1305_concat@ --- * * * Arguments: @poly1305_ctx *ctx@ = destination context