1
#ifndef RIJNDAEL_INCLUDED
2
#define RIJNDAEL_INCLUDED
4
/* Copyright (c) 2002, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
5
Use is subject to license terms.
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; version 2 of the License.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
24
@version 3.0 (December 2000)
25
Optimised ANSI C code for the Rijndael cipher (now AES)
26
@author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
27
@author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
28
@author Paulo Barreto <paulo.barreto@terra.com.br>
30
This code is hereby placed in the public domain.
31
Modified by Peter Zaitsev to fit MySQL coding style.
34
#define AES_MAXKC (256/32)
35
#define AES_MAXKB (256/8)
38
int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
40
int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
42
void rijndaelEncrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr,
43
const uint8 pt[16], uint8 ct[16]);
44
void rijndaelDecrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr,
45
const uint8 ct[16], uint8 pt[16]);
47
#endif /* RIJNDAEL_INCLUDED */