base/dispatch.c, etc.: Replace inline assembler for the `rdrand' fix.
[catacomb] / symm / poly1305.h
index bcc81c2..2441ad0 100644 (file)
@@ -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