Wed Oct 28 15:47:57 2009

Asterisk developer's documentation


aeskey.c File Reference

This file contains the code for implementing the key schedule for AES (Rijndael) for block and key sizes of 16, 24, and 32 bytes. See aesopt.h for further details including optimisation. More...

#include "aesopt.h"

Include dependency graph for aeskey.c:

Go to the source code of this file.

Defines

#define ke4(k, i)
#define ke6(k, i)
#define ke8(k, i)
#define kel4(k, i)
#define kel6(k, i)
#define kel8(k, i)


Detailed Description

This file contains the code for implementing the key schedule for AES (Rijndael) for block and key sizes of 16, 24, and 32 bytes. See aesopt.h for further details including optimisation.

Definition in file aeskey.c.


Define Documentation

#define ke4 ( k,
 ) 

Value:

{   k[4*(i)+4] = ss[0] ^= ls_box(ss[3],3) ^ t_use(r,c)[i]; k[4*(i)+5] = ss[1] ^= ss[0]; \
    k[4*(i)+6] = ss[2] ^= ss[1]; k[4*(i)+7] = ss[3] ^= ss[2]; \
}

Definition at line 65 of file aeskey.c.

#define ke6 ( k,
 ) 

Value:

{   k[6*(i)+ 6] = ss[0] ^= ls_box(ss[5],3) ^ t_use(r,c)[i]; k[6*(i)+ 7] = ss[1] ^= ss[0]; \
    k[6*(i)+ 8] = ss[2] ^= ss[1]; k[6*(i)+ 9] = ss[3] ^= ss[2]; \
    k[6*(i)+10] = ss[4] ^= ss[3]; k[6*(i)+11] = ss[5] ^= ss[4]; \
}

Definition at line 74 of file aeskey.c.

#define ke8 ( k,
 ) 

Value:

{   k[8*(i)+ 8] = ss[0] ^= ls_box(ss[7],3) ^ t_use(r,c)[i]; k[8*(i)+ 9] = ss[1] ^= ss[0]; \
    k[8*(i)+10] = ss[2] ^= ss[1]; k[8*(i)+11] = ss[3] ^= ss[2]; \
    k[8*(i)+12] = ss[4] ^= ls_box(ss[3],0); k[8*(i)+13] = ss[5] ^= ss[4]; \
    k[8*(i)+14] = ss[6] ^= ss[5]; k[8*(i)+15] = ss[7] ^= ss[6]; \
}

Definition at line 84 of file aeskey.c.

#define kel4 ( k,
 ) 

Value:

{   k[4*(i)+4] = ss[0] ^= ls_box(ss[3],3) ^ t_use(r,c)[i]; k[4*(i)+5] = ss[1] ^= ss[0]; \
    k[4*(i)+6] = ss[2] ^= ss[1]; k[4*(i)+7] = ss[3] ^= ss[2]; \
}

Definition at line 69 of file aeskey.c.

#define kel6 ( k,
 ) 

Value:

{   k[6*(i)+ 6] = ss[0] ^= ls_box(ss[5],3) ^ t_use(r,c)[i]; k[6*(i)+ 7] = ss[1] ^= ss[0]; \
    k[6*(i)+ 8] = ss[2] ^= ss[1]; k[6*(i)+ 9] = ss[3] ^= ss[2]; \
}

Definition at line 79 of file aeskey.c.

#define kel8 ( k,
 ) 

Value:

{   k[8*(i)+ 8] = ss[0] ^= ls_box(ss[7],3) ^ t_use(r,c)[i]; k[8*(i)+ 9] = ss[1] ^= ss[0]; \
    k[8*(i)+10] = ss[2] ^= ss[1]; k[8*(i)+11] = ss[3] ^= ss[2]; \
}

Definition at line 90 of file aeskey.c.


Generated on Wed Oct 28 15:47:57 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6