1 /*	$NetBSD: rijndael-alg-fst.h,v 1.1.1.1 2011/04/13 18:14:51 elric Exp $	*/
2 
3 /*	NetBSD: rijndael-alg-fst.h,v 1.2 2000/10/02 17:19:15 itojun Exp	*/
4 /*	$KAME: rijndael-alg-fst.h,v 1.5 2003/07/15 10:47:16 itojun Exp $	*/
5 /**
6  * rijndael-alg-fst.h
7  *
8  * @version 3.0 (December 2000)
9  *
10  * Optimised ANSI C code for the Rijndael cipher (now AES)
11  *
12  * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
13  * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
14  * @author Paulo Barreto <paulo.barreto@terra.com.br>
15  *
16  * This code is hereby placed in the public domain.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
19  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
25  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 #ifndef __RIJNDAEL_ALG_FST_H
31 #define __RIJNDAEL_ALG_FST_H
32 
33 /* symbol renaming */
34 #define rijndaelKeySetupEnc _hc_rijndaelKeySetupEnc
35 #define rijndaelKeySetupDec _hc_rijndaelKeySetupDec
36 #define rijndaelEncrypt _hc_rijndaelEncrypt
37 #define rijndaelDecrypt _hc_rijndaelDecrypt
38 
39 #define RIJNDAEL_MAXKC	(256/32)
40 #define RIJNDAEL_MAXKB	(256/8)
41 #define RIJNDAEL_MAXNR	14
42 
43 int rijndaelKeySetupEnc(uint32_t rk[/*4*(Nr + 1)*/], const uint8_t cipherKey[], int keyBits);
44 int rijndaelKeySetupDec(uint32_t rk[/*4*(Nr + 1)*/], const uint8_t cipherKey[], int keyBits);
45 void rijndaelEncrypt(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, const uint8_t pt[16], uint8_t ct[16]);
46 void rijndaelDecrypt(const uint32_t rk[/*4*(Nr + 1)*/], int Nr, const uint8_t ct[16], uint8_t pt[16]);
47 
48 #endif /* __RIJNDAEL_ALG_FST_H */
49