X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/36c67859bdb3aae4d5b837290939548bd24ad842..b2776fdf2a98ea586bbdad50eca4ed95e967b0d7:/hmac.h diff --git a/hmac.h b/hmac.h index 097371a..fffb093 100644 --- a/hmac.h +++ b/hmac.h @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: hmac.h,v 1.5 2001/04/03 19:35:45 mdw Exp $ + * $Id: hmac.h,v 1.7 2004/04/08 01:36:15 mdw Exp $ * * Generic code for HMAC and NMAC * * (c) 1998 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,39 +15,18 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: hmac.h,v $ - * Revision 1.5 2001/04/03 19:35:45 mdw - * Support the SSL HMAC variant (untested). - * - * Revision 1.4 2000/10/15 19:09:20 mdw - * Support HMAC mode for hash functions which need to store more state than - * the hash output size. - * - * Revision 1.3 2000/06/17 11:23:57 mdw - * New key size interface. - * - * Revision 1.2 1999/12/10 23:17:39 mdw - * Split mode macros into interface and implementation. - * - * Revision 1.1 1999/09/03 08:41:12 mdw - * Initial import. - * - */ - /*----- Notes on the HMAC and NMAC constructions --------------------------* * * Designed by Mihir Bellare, Ran Canetti and Hugo Krawczyk, NMAC is a method @@ -107,7 +86,9 @@ typedef struct pre##_macctx { \ \ /* --- Other useful constants --- */ \ \ -extern const octet pre##_mackeysz[]; \ +extern const octet pre##_hmackeysz[]; \ +extern const octet pre##_nmackeysz[]; \ +extern const octet pre##_sslmackeysz[]; \ \ /* --- @pre_nmacinit@ --- * \ * \ @@ -138,7 +119,7 @@ extern void pre##_nmacinit(pre##_mackey */*key*/, \ * use, as specified in RFC2104. \ */ \ \ -extern void pre##_hmacinit(pre##_mackey */*key*/, \ +extern void pre##_hmacinit(pre##_mackey */*key*/, \ const void */*k*/, size_t /*sz*/); \ \ /* --- @pre_sslmacinit@ --- * \ @@ -197,7 +178,9 @@ extern void pre##_macdone(pre##_macctx */*ctx*/, void */*mac*/); \ \ /* --- Generic MAC interface --- */ \ \ -extern const gcmac pre##_hmac; +extern const gcmac pre##_hmac; \ +extern const gcmac pre##_nmac; \ +extern const gcmac pre##_sslmac; /*----- That's all, folks -------------------------------------------------*/