4 * Copied from airpdcap_rijndael.h
8 * @version 3.0 (December 2000)
10 * Optimised ANSI C code for the Rijndael cipher (now AES)
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>
16 * This code is hereby placed in the public domain.
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.
31 /* Note: copied AirPDcap/rijndael/rijndael.h */
36 #include "ws_symbol_export.h"
38 #define RIJNDAEL_MAXKC (256/32)
39 #define RIJNDAEL_MAXKB (256/8)
40 #define RIJNDAEL_MAXNR 14
42 typedef struct s_rijndael_ctx
{
43 gint Nr
; /* key-length-dependent number of rounds */
44 guint32 ek
[4 * (RIJNDAEL_MAXNR
+ 1)]; /* encrypt key schedule */
45 guint32 dk
[4 * (RIJNDAEL_MAXNR
+ 1)]; /* decrypt key schedule */
50 void rijndael_set_key(
56 void rijndael_encrypt(
57 const rijndael_ctx
*ctx
,
62 void rijndael_decrypt(
63 const rijndael_ctx
*ctx
,