X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/dcdc42e7356a0ae7c4d16728c8afff51f76f4546..b817bfc642225b8c3c0b6a7e42d1fb949b61a606:/blkc.h diff --git a/blkc.h b/blkc.h index 6e1ea0a..dfbd4f7 100644 --- a/blkc.h +++ b/blkc.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: blkc.h,v 1.4 2001/04/29 17:39:15 mdw Exp $ + * $Id: blkc.h,v 1.7 2004/04/08 01:36:15 mdw Exp $ * * Common definitions for block ciphers * @@ -27,25 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: blkc.h,v $ - * Revision 1.4 2001/04/29 17:39:15 mdw - * Removed `-sched' tests. Reorganized so that we can theoretically have - * multiple tests in the same file. (This isn't so useful in production, - * but it's handy when doing test builds.) - * - * Revision 1.3 2000/06/17 10:47:06 mdw - * Slight support for 96-bit ciphers. Support for counter-mode ciphers. - * - * Revision 1.2 1999/12/10 23:29:48 mdw - * Change header file guard names. - * - * Revision 1.1 1999/09/03 08:41:11 mdw - * Initial import. - * - */ - #ifndef CATACOMB_BLKC_H #define CATACOMB_BLKC_H @@ -211,6 +192,16 @@ #define BLKC_SKEL_128(PRE, decl, op, guts) \ BLKC_SKEL(PRE, decl, guts(op, 0); guts(op, 1); guts(op, 2); guts(op, 3);) +#define BLKC_SKEL_192(PRE, decl, op, guts) \ + BLKC_SKEL(PRE, decl, \ + guts(op, 0); guts(op, 1); guts(op, 2); guts(op, 3); \ + guts(op, 4); guts(op, 5);) + +#define BLKC_SKEL_256(PRE, decl, op, guts) \ + BLKC_SKEL(PRE, decl, \ + guts(op, 0); guts(op, 1); guts(op, 2); guts(op, 3); \ + guts(op, 4); guts(op, 5); guts(op, 6); guts(op, 7);) + #define BLKC_STORE_GUTS(op, i) op(_p + 4 * i, _w[i]) #define BLKC_XSTORE_GUTS(op, i) op(_p + 4 * i, _w[i] ^ _wx[i]) #define BLKC_LOAD_GUTS(op, i) _w[i] = op(_p + 4 * i) @@ -317,7 +308,7 @@ static int pre##_verify(dstr *v) \ \ BLKC_VERIFY(PRE, pre) \ \ -static test_chunk defs[] = { \ +static const test_chunk defs[] = { \ { #pre, pre##_verify, { &type_hex, &type_hex, &type_hex, 0 } }, \ { 0, 0, { 0 } } \ }; \