/* -*-c-*-
*
- * $Id: rijndael.c,v 1.4 2001/05/07 17:31:53 mdw Exp $
+ * $Id: rijndael.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
*
* The Rijndael block cipher
*
* (c) 2000 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* 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: rijndael.c,v $
- * Revision 1.4 2001/05/07 17:31:53 mdw
- * Separate out key scheduling.
- *
- * Revision 1.3 2001/05/07 15:44:46 mdw
- * Fix unusual numbers of rounds. Simplify implementation.
- *
- * Revision 1.2 2000/12/06 20:32:59 mdw
- * Fix round count for weird key sizes.
- *
- * Revision 1.1 2000/06/17 11:56:07 mdw
- * New cipher.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include <assert.h>
{
uint32 a = s[0], b = s[1], c = s[2], d = s[3];
uint32 aa, bb, cc, dd;
- uint32 *w = k->w;
+ const uint32 *w = k->w;
a ^= *w++; b ^= *w++; c ^= *w++; d ^= *w++;
aa = a; bb = b; cc = c; dd = d;
{
uint32 a = s[0], b = s[1], c = s[2], d = s[3];
uint32 aa, bb, cc, dd;
- uint32 *w = k->wi;
+ const uint32 *w = k->wi;
a ^= *w++; b ^= *w++; c ^= *w++; d ^= *w++;
aa = a; bb = b; cc = c; dd = d;