~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to include/rijndael.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2002 MySQL AB
 
2
 
 
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.
 
6
 
 
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.
 
11
 
 
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 */
 
15
 
 
16
 
 
17
/*
 
18
  rijndael-alg-fst.h
 
19
 
 
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>
 
25
 
 
26
  This code is hereby placed in the public domain.
 
27
  Modified by Peter Zaitsev to fit MySQL coding style.
 
28
 */
 
29
 
 
30
#define AES_MAXKC       (256/32)
 
31
#define AES_MAXKB       (256/8)
 
32
#define AES_MAXNR       14
 
33
 
 
34
int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
 
35
                        int keyBits);
 
36
int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
 
37
                        int keyBits);
 
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]);