X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/2e8eb64a72472bea4faba1cee5edde4fe3616808..df82bc85db06b9cd8917aec33aadaf151d9d4a46:/rijndael256.c diff --git a/rijndael256.c b/rijndael256.c index 7fc9633..27f06d7 100644 --- a/rijndael256.c +++ b/rijndael256.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: rijndael256.c,v 1.1 2001/05/07 17:32:03 mdw Exp $ + * $Id: rijndael256.c,v 1.2 2004/04/08 01:36:15 mdw Exp $ * * The Rijndael block cipher, 256-bit version * * (c) 2001 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,26 +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: rijndael256.c,v $ - * Revision 1.1 2001/05/07 17:32:03 mdw - * New Rijndael block sizes. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -111,7 +103,7 @@ void rijndael256_eblk(const rijndael_ctx *k, const uint32 *s, uint32 *dst) uint32 a = s[0], b = s[1], c = s[2], d = s[3]; uint32 e = s[4], f = s[5], g = s[6], h = s[7]; uint32 aa, bb, cc, dd, ee, ff, gg, hh; - uint32 *w = k->w; + const uint32 *w = k->w; a ^= *w++; b ^= *w++; c ^= *w++; d ^= *w++; e ^= *w++; f ^= *w++; g ^= *w++; h ^= *w++; @@ -140,7 +132,7 @@ void rijndael256_dblk(const rijndael_ctx *k, const uint32 *s, uint32 *dst) uint32 a = s[0], b = s[1], c = s[2], d = s[3]; uint32 e = s[4], f = s[5], g = s[6], h = s[7]; uint32 aa, bb, cc, dd, ee, ff, gg, hh; - uint32 *w = k->wi; + const uint32 *w = k->wi; a ^= *w++; b ^= *w++; c ^= *w++; d ^= *w++; e ^= *w++; f ^= *w++; g ^= *w++; h ^= *w++;