X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/8b3d7f307a1f99d461898af5422a960cd8080e72..b3e91ee5b36143a745895b89db31e8bcda3ef2ae:/rijndael-base.h diff --git a/rijndael-base.h b/rijndael-base.h index 1c17fdf..f88b2f7 100644 --- a/rijndael-base.h +++ b/rijndael-base.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: rijndael-base.h,v 1.1 2001/05/07 17:31:37 mdw Exp $ + * $Id: rijndael-base.h,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * Internal header for Rijndael implementation * @@ -27,14 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: rijndael-base.h,v $ - * Revision 1.1 2001/05/07 17:31:37 mdw - * Centralize Rijndael tables and key scheduling. - * - */ - #ifndef CATACOMB_RIJNDAEL_BASE_H #define CATACOMB_RIJNDAEL_BASE_H @@ -65,12 +57,12 @@ extern const octet rijndael_rcon[]; /*----- Handy macros ------------------------------------------------------*/ #define SUB(s, a, b, c, d) \ - (s[U8((a) >> 0)] << 0 | s[U8((b) >> 8)] << 8 | \ - s[U8((c) >> 16)] << 16 | s[U8((d) >> 24)] << 24) + (s[U8((a) >> 24)] << 24 | s[U8((b) >> 16)] << 16 | \ + s[U8((c) >> 8)] << 8 | s[U8((d) >> 0)] << 0) #define MIX(t, a, b, c, d) \ - (t[0][U8((a) >> 0)] ^ t[1][U8((b) >> 8)] ^ \ - t[2][U8((c) >> 16)] ^ t[3][U8((d) >> 24)]) + (t[0][U8((a) >> 24)] ^ t[1][U8((b) >> 16)] ^ \ + t[2][U8((c) >> 8)] ^ t[3][U8((d) >> 0)]) /*----- That's all, folks -------------------------------------------------*/