1 /* Copyright (C) 2002 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
20 @version 3.0 (December 2000)
21 Optimised ANSI C code for the Rijndael cipher (now AES)
22 @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
23 @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
24 @author Paulo Barreto <paulo.barreto@terra.com.br>
26 This code is hereby placed in the public domain.
27 Modified by Peter Zaitsev to fit MySQL coding style.
30 #define AES_MAXKC (256/32)
31 #define AES_MAXKB (256/8)
34 int rijndaelKeySetupEnc(uint32 rk
[/*4*(Nr + 1)*/], const uint8 cipherKey
[],
36 int rijndaelKeySetupDec(uint32 rk
[/*4*(Nr + 1)*/], const uint8 cipherKey
[],
38 void rijndaelEncrypt(const uint32 rk
[/*4*(Nr + 1)*/], int Nr
,
39 const uint8 pt
[16], uint8 ct
[16]);
40 void rijndaelDecrypt(const uint32 rk
[/*4*(Nr + 1)*/], int Nr
,
41 const uint8 ct
[16], uint8 pt
[16]);