include/beecrypt/aes_le.h File Reference

Go to the source code of this file.

Data Structures

struct  _table

Defines

#define _ae0   _aes_enc.t0
#define _ae1   _aes_enc.t1
#define _ae2   _aes_enc.t2
#define _ae3   _aes_enc.t3
#define _ae4   _aes_enc.t4
#define _ad0   _aes_dec.t0
#define _ad1   _aes_dec.t1
#define _ad2   _aes_dec.t2
#define _ad3   _aes_dec.t3
#define _ad4   _aes_dec.t4
#define etfs(i)
#define esft(i)
#define elr()
#define dtfs(i)
#define dsft(i)
#define dlr()

Variables

const uint32_t _aes_mask [4]
const _table _aes_enc
const _table _aes_dec
static const uint32_t _arc []


Define Documentation

#define _ad0   _aes_dec.t0

#define _ad1   _aes_dec.t1

#define _ad2   _aes_dec.t2

#define _ad3   _aes_dec.t3

#define _ad4   _aes_dec.t4

#define _ae0   _aes_enc.t0

#define _ae1   _aes_enc.t1

#define _ae2   _aes_enc.t2

#define _ae3   _aes_enc.t3

#define _ae4   _aes_enc.t4

 
#define dlr (  ) 

Value:

s0 = \
        (_ad4[(t0      ) & 0xff] & 0x000000ff) ^ \
        (_ad4[(t3 >>  8) & 0xff] & 0x0000ff00) ^ \
        (_ad4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ \
        (_ad4[(t1 >> 24)       ] & 0xff000000) ^ \
        rk[0]; \
    s1 = \
        (_ad4[(t1      ) & 0xff] & 0x000000ff) ^ \
        (_ad4[(t0 >>  8) & 0xff] & 0x0000ff00) ^ \
        (_ad4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ \
        (_ad4[(t2 >> 24)       ] & 0xff000000) ^ \
        rk[1]; \
    s2 = \
        (_ad4[(t2      ) & 0xff] & 0x000000ff) ^ \
        (_ad4[(t1 >>  8) & 0xff] & 0x0000ff00) ^ \
        (_ad4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ \
        (_ad4[(t3 >> 24)       ] & 0xff000000) ^ \
        rk[2]; \
    s3 = \
        (_ad4[(t3      ) & 0xff] & 0x000000ff) ^ \
        (_ad4[(t2 >>  8) & 0xff] & 0x0000ff00) ^ \
        (_ad4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ \
        (_ad4[(t0 >> 24)       ] & 0xff000000) ^ \
        rk[3];

#define dsft (  ) 

Value:

s0 = \
        _ad0[(t0      ) & 0xff] ^ \
        _ad1[(t3 >>  8) & 0xff] ^ \
        _ad2[(t2 >> 16) & 0xff] ^ \
        _ad3[(t1 >> 24)       ] ^ \
        rk[i+0]; \
    s1 = \
        _ad0[(t1      ) & 0xff] ^ \
        _ad1[(t0 >>  8) & 0xff] ^ \
        _ad2[(t3 >> 16) & 0xff] ^ \
        _ad3[(t2 >> 24)       ] ^ \
        rk[i+1]; \
    s2 = \
        _ad0[(t2      ) & 0xff] ^ \
        _ad1[(t1 >>  8) & 0xff] ^ \
        _ad2[(t0 >> 16) & 0xff] ^ \
        _ad3[(t3 >> 24)       ] ^ \
        rk[i+2]; \
    s3 = \
        _ad0[(t3      ) & 0xff] ^ \
        _ad1[(t2 >>  8) & 0xff] ^ \
        _ad2[(t1 >> 16) & 0xff] ^ \
        _ad3[(t0 >> 24)       ] ^ \
        rk[i+3];

#define dtfs (  ) 

Value:

t0 = \
        _ad0[(s0      ) & 0xff] ^ \
        _ad1[(s3 >>  8) & 0xff] ^ \
        _ad2[(s2 >> 16) & 0xff] ^ \
        _ad3[(s1 >> 24)       ] ^ \
        rk[i+0]; \
    t1 = \
        _ad0[(s1      ) & 0xff] ^ \
        _ad1[(s0 >>  8) & 0xff] ^ \
        _ad2[(s3 >> 16) & 0xff] ^ \
        _ad3[(s2 >> 24)       ] ^ \
        rk[i+1]; \
    t2 = \
        _ad0[(s2      ) & 0xff] ^ \
        _ad1[(s1 >>  8) & 0xff] ^ \
        _ad2[(s0 >> 16) & 0xff] ^ \
        _ad3[(s3 >> 24)       ] ^ \
        rk[i+2]; \
    t3 = \
        _ad0[(s3      ) & 0xff] ^ \
        _ad1[(s2 >>  8) & 0xff] ^ \
        _ad2[(s1 >> 16) & 0xff] ^ \
        _ad3[(s0 >> 24)       ] ^ \
        rk[i+3];

 
#define elr (  ) 

Value:

s0 = \
        (_ae4[(t0      ) & 0xff] & _aes_mask[0]) ^ \
        (_ae4[(t1 >>  8) & 0xff] & _aes_mask[1]) ^ \
        (_ae4[(t2 >> 16) & 0xff] & _aes_mask[2]) ^ \
        (_ae4[(t3 >> 24)       ] & _aes_mask[3]) ^ \
        rk[0]; \
    s1 = \
        (_ae4[(t1      ) & 0xff] & _aes_mask[0]) ^ \
        (_ae4[(t2 >>  8) & 0xff] & _aes_mask[1]) ^ \
        (_ae4[(t3 >> 16) & 0xff] & _aes_mask[2]) ^ \
        (_ae4[(t0 >> 24)       ] & _aes_mask[3]) ^ \
        rk[1]; \
    s2 = \
        (_ae4[(t2      ) & 0xff] & _aes_mask[0]) ^ \
        (_ae4[(t3 >>  8) & 0xff] & _aes_mask[1]) ^ \
        (_ae4[(t0 >> 16) & 0xff] & _aes_mask[2]) ^ \
        (_ae4[(t1 >> 24)       ] & _aes_mask[3]) ^ \
        rk[2]; \
    s3 = \
        (_ae4[(t3      ) & 0xff] & _aes_mask[0]) ^ \
        (_ae4[(t0 >>  8) & 0xff] & _aes_mask[1]) ^ \
        (_ae4[(t1 >> 16) & 0xff] & _aes_mask[2]) ^ \
        (_ae4[(t2 >> 24)       ] & _aes_mask[3]) ^ \
        rk[3];

#define esft (  ) 

Value:

s0 = \
        _ae0[(t0      ) & 0xff] ^ \
        _ae1[(t1 >>  8) & 0xff] ^ \
        _ae2[(t2 >> 16) & 0xff] ^ \
        _ae3[(t3 >> 24)       ] ^ \
        rk[i+0]; \
    s1 = \
        _ae0[(t1      ) & 0xff] ^ \
        _ae1[(t2 >>  8) & 0xff] ^ \
        _ae2[(t3 >> 16) & 0xff] ^ \
        _ae3[(t0 >> 24)       ] ^ \
        rk[i+1]; \
    s2 = \
        _ae0[(t2      ) & 0xff] ^ \
        _ae1[(t3 >>  8) & 0xff] ^ \
        _ae2[(t0 >> 16) & 0xff] ^ \
        _ae3[(t1 >> 24)       ] ^ \
        rk[i+2]; \
    s3 = \
        _ae0[(t3      ) & 0xff] ^ \
        _ae1[(t0 >>  8) & 0xff] ^ \
        _ae2[(t1 >> 16) & 0xff] ^ \
        _ae3[(t2 >> 24)       ] ^ \
        rk[i+3];

#define etfs (  ) 

Value:

t0 = \
        _ae0[(s0      ) & 0xff] ^ \
        _ae1[(s1 >>  8) & 0xff] ^ \
        _ae2[(s2 >> 16) & 0xff] ^ \
        _ae3[(s3 >> 24)       ] ^ \
        rk[i+0]; \
    t1 = \
        _ae0[(s1      ) & 0xff] ^ \
        _ae1[(s2 >>  8) & 0xff] ^ \
        _ae2[(s3 >> 16) & 0xff] ^ \
        _ae3[(s0 >> 24)       ] ^ \
        rk[i+1]; \
    t2 = \
        _ae0[(s2      ) & 0xff] ^ \
        _ae1[(s3 >>  8) & 0xff] ^ \
        _ae2[(s0 >> 16) & 0xff] ^ \
        _ae3[(s1 >> 24)       ] ^ \
        rk[i+2]; \
    t3 = \
        _ae0[(s3      ) & 0xff] ^ \
        _ae1[(s0 >>  8) & 0xff] ^ \
        _ae2[(s1 >> 16) & 0xff] ^ \
        _ae3[(s2 >> 24)       ] ^ \
        rk[i+3];


Variable Documentation

const uint32_t _aes_mask[4]

Initial value:

 {
    0x000000ff,
    0x0000ff00,
    0x00ff0000,
    0xff000000
}

const uint32_t _arc[] [static]

Initial value:

 {
    0x00000001, 0x00000002, 0x00000004, 0x00000008,
    0x00000010, 0x00000020, 0x00000040, 0x00000080,
    0x0000001b, 0x00000036
}


Generated on Fri Jun 19 13:38:47 2009 for BeeCrypt by  doxygen 1.5.8