X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/b8f727eb436070ed90eb90c725e30c5e913b8ab9..3deadf73ca497f4c50a2dbe387f544ef0070cfb4:/server/tripe.h diff --git a/server/tripe.h b/server/tripe.h index 75ad2f1f..6f611822 100644 --- a/server/tripe.h +++ b/server/tripe.h @@ -376,15 +376,16 @@ typedef struct bulkops { /* Release a bulk encryption context and the resources it holds. */ int (*chaltag)(bulkchal */*bc*/, const void */*m*/, size_t /*msz*/, - void */*t*/); - /* Calculate a tag for the challenge in @m@, @msz@, and write it to - * @t@. Return @-1@ on error, zero on success. + uint32 /*seq*/, void */*t*/); + /* Calculate a tag for the challenge in @m@, @msz@, with the sequence + * number @seq@, and write it to @t@. Return @-1@ on error, zero on + * success. */ int (*chalvrf)(bulkchal */*bc*/, const void */*m*/, size_t /*msz*/, - const void */*t*/); - /* Check the tag @t@ on @m@, @msz@: return zero if the tag is OK, - * nonzero if it's bad. + uint32 /*seq*/, const void */*t*/); + /* Check the tag @t@ on @m@, @msz@ and @seq@: return zero if the tag + * is OK, nonzero if it's bad. */ void (*freechal)(bulkchal */*bc*/); @@ -1110,25 +1111,29 @@ extern int ksl_decrypt(keyset **/*ksroot*/, unsigned /*ty*/, /* --- @c_new@ --- * * - * Arguments: @buf *b@ = where to put the challenge + * Arguments: @const void *m@ = pointer to associated message, or null + * @size_t msz@ = length of associated message + * @buf *b@ = where to put the challenge * * Returns: Zero if OK, nonzero on error. * * Use: Issues a new challenge. */ -extern int c_new(buf */*b*/); +extern int c_new(const void */*m*/, size_t /*msz*/, buf */*b*/); /* --- @c_check@ --- * * - * Arguments: @buf *b@ = where to find the challenge + * Arguments: @const void *m@ = pointer to associated message, or null + * @size_t msz@ = length of associated message + * @buf *b@ = where to find the challenge * * Returns: Zero if OK, nonzero if it didn't work. * * Use: Checks a challenge. On failure, the buffer is broken. */ -extern int c_check(buf */*b*/); +extern int c_check(const void */*m*/, size_t /*msz*/, buf */*b*/); /*----- Administration interface ------------------------------------------*/