cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Macros | Functions
aestab.c File Reference
#include "crypt/aes.h"
#include "crypt/aesopt.h"
#include "aestab.h"

Go to the source code of this file.

Macros

#define DO_TABLES
 
#define f2(x)   ((x<<1) ^ (((x>>7) & 1) * WPOLY))
 
#define f4(x)   ((x<<2) ^ (((x>>6) & 1) * WPOLY) ^ (((x>>6) & 2) * WPOLY))
 
#define f8(x)
 
#define f3(x)   (f2(x) ^ x)
 
#define f9(x)   (f8(x) ^ x)
 
#define fb(x)   (f8(x) ^ f2(x) ^ x)
 
#define fd(x)   (f8(x) ^ f4(x) ^ x)
 
#define fe(x)   (f8(x) ^ f4(x) ^ f2(x))
 
#define fwd_affine(x)   (w = (uint_32t)x, w ^= (w<<1)^(w<<2)^(w<<3)^(w<<4), 0x63^(uint_8t)(w^(w>>8)))
 
#define inv_affine(x)   (w = (uint_32t)x, w = (w<<1)^(w<<3)^(w<<6), 0x05^(uint_8t)(w^(w>>8)))
 

Functions

AES_RETURN aes_init (void)
 

Macro Definition Documentation

#define DO_TABLES

Definition at line 33 of file aestab.c.

#define f2 (   x)    ((x<<1) ^ (((x>>7) & 1) * WPOLY))

Definition at line 172 of file aestab.c.

#define f3 (   x)    (f2(x) ^ x)

Definition at line 176 of file aestab.c.

#define f4 (   x)    ((x<<2) ^ (((x>>6) & 1) * WPOLY) ^ (((x>>6) & 2) * WPOLY))

Definition at line 173 of file aestab.c.

#define f8 (   x)
Value:
((x<<3) ^ (((x>>5) & 1) * WPOLY) ^ (((x>>5) & 2) * WPOLY) \
^ (((x>>5) & 4) * WPOLY))

Definition at line 174 of file aestab.c.

#define f9 (   x)    (f8(x) ^ x)

Definition at line 177 of file aestab.c.

#define fb (   x)    (f8(x) ^ f2(x) ^ x)

Definition at line 178 of file aestab.c.

#define fd (   x)    (f8(x) ^ f4(x) ^ x)

Definition at line 179 of file aestab.c.

#define fe (   x)    (f8(x) ^ f4(x) ^ f2(x))

Definition at line 180 of file aestab.c.

#define fwd_affine (   x)    (w = (uint_32t)x, w ^= (w<<1)^(w<<2)^(w<<3)^(w<<4), 0x63^(uint_8t)(w^(w>>8)))

Definition at line 264 of file aestab.c.

#define inv_affine (   x)    (w = (uint_32t)x, w = (w<<1)^(w<<3)^(w<<6), 0x05^(uint_8t)(w^(w>>8)))

Definition at line 267 of file aestab.c.

Function Documentation

AES_RETURN aes_init ( void  )

Definition at line 272 of file aestab.c.