~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to include/rijndael.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2011-11-08 11:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20111108113113-3ulw01fvi4vn8m25
Tags: upstream-5.5.17
ImportĀ upstreamĀ versionĀ 5.5.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef RIJNDAEL_INCLUDED
 
2
#define RIJNDAEL_INCLUDED
 
3
 
 
4
/* Copyright (c) 2002, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
 
5
   Use is subject to license terms.
 
6
 
 
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.
 
10
 
 
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.
 
15
 
 
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 */
 
19
 
 
20
 
 
21
/*
 
22
  rijndael-alg-fst.h
 
23
 
 
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>
 
29
 
 
30
  This code is hereby placed in the public domain.
 
31
  Modified by Peter Zaitsev to fit MySQL coding style.
 
32
 */
 
33
 
 
34
#define AES_MAXKC       (256/32)
 
35
#define AES_MAXKB       (256/8)
 
36
#define AES_MAXNR       14
 
37
 
 
38
int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
 
39
                        int keyBits);
 
40
int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
 
41
                        int keyBits);
 
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]);
 
46
 
 
47
#endif /* RIJNDAEL_INCLUDED */