Eneboo - Documentación para desarrolladores
|
00001 /* Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 00018 /* 00019 rijndael-alg-fst.h 00020 00021 @version 3.0 (December 2000) 00022 Optimised ANSI C code for the Rijndael cipher (now AES) 00023 @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be> 00024 @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be> 00025 @author Paulo Barreto <paulo.barreto@terra.com.br> 00026 00027 This code is hereby placed in the public domain. 00028 Modified by Peter Zaitsev to fit MySQL coding style. 00029 */ 00030 00031 #define AES_MAXKC (256/32) 00032 #define AES_MAXKB (256/8) 00033 #define AES_MAXNR 14 00034 00035 int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], 00036 int keyBits); 00037 int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], 00038 int keyBits); 00039 void rijndaelEncrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, 00040 const uint8 pt[16], uint8 ct[16]); 00041 void rijndaelDecrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, 00042 const uint8 ct[16], uint8 pt[16]);