Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

aesopt.h File Reference

#include <asterisk/aes.h>

Include dependency graph for aesopt.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define BRG_LITTLE_ENDIAN   1234 /* byte 0 is least significant (i386) */
#define BRG_BIG_ENDIAN   4321 /* byte 0 is most significant (mc68k) */
#define NO_TABLES   0
#define ONE_TABLE   1
#define FOUR_TABLES   4
#define NONE   0
#define PARTIAL   1
#define FULL   2
#define brot(x, n)   (((aes_32t)(x) << n) | ((aes_32t)(x) >> (32 - n)))
#define aes_sw32(x)   ((brot((x),8) & 0x00ff00ff) | (brot((x),24) & 0xff00ff00))
#define ALGORITHM_BYTE_ORDER   PLATFORM_BYTE_ORDER
#define SAFE_IO
#define ENC_UNROLL   FULL
#define DEC_UNROLL   FULL
#define FF_TABLES
#define ARRAYS
#define s(x, c)   x[c]
#define FIXED_TABLES
#define ENC_ROUND   FOUR_TABLES
#define LAST_ENC_ROUND   FOUR_TABLES
#define DEC_ROUND   FOUR_TABLES
#define LAST_DEC_ROUND   FOUR_TABLES
#define KEY_SCHED   FOUR_TABLES
#define RC_LENGTH   (5 * (AES_BLOCK_SIZE / 4 - 2))
#define word_in(x, c)
#define word_out(x, c, v)
#define WPOLY   0x011b
#define BPOLY   0x1b
#define m1   0x80808080
#define m2   0x7f7f7f7f
#define gf_mulx(x)   ((((x) & m2) << 1) ^ ((((x) & m1) >> 7) * BPOLY))
#define no_table(x, box, vf, rf, c)
#define one_table(x, op, tab, vf, rf, c)
#define four_tables(x, tab, vf, rf, c)
#define vf1(x, r, c)   (x)
#define rf1(r, c)   (r)
#define rf2(r, c)   ((8+r-c)&3)
#define dec_fmvars   aes_32t g2
#define fwd_mcol(x)   (g2 = gf_mulx(x), g2 ^ upr((x) ^ g2, 3) ^ upr((x), 2) ^ upr((x), 1))
#define dec_imvars   aes_32t g2, g4, g9
#define inv_mcol(x)
#define ls_box(x, c)   no_table(x,t_use(s,box),vf1,rf2,c)
#define t_dec(m, n)   t_##m##n
#define t_set(m, n)   t_##m##n
#define t_use(m, n)   t_##m##n
#define d_1(t, n, b, v)   extern const t n[256]
#define d_4(t, n, b, v)   extern const t n[4][256]

Functions

const aes_32t t_dec (r, c)[RC_LENGTH]


Define Documentation

#define aes_sw32  )     ((brot((x),8) & 0x00ff00ff) | (brot((x),24) & 0xff00ff00))
 

Definition at line 268 of file aesopt.h.

#define ALGORITHM_BYTE_ORDER   PLATFORM_BYTE_ORDER
 

Definition at line 329 of file aesopt.h.

#define ARRAYS
 

Definition at line 402 of file aesopt.h.

#define BPOLY   0x1b
 

Definition at line 590 of file aesopt.h.

#define BRG_BIG_ENDIAN   4321 /* byte 0 is most significant (mc68k) */
 

Definition at line 180 of file aesopt.h.

#define BRG_LITTLE_ENDIAN   1234 /* byte 0 is least significant (i386) */
 

Definition at line 179 of file aesopt.h.

#define brot x,
 )     (((aes_32t)(x) << n) | ((aes_32t)(x) >> (32 - n)))
 

Definition at line 267 of file aesopt.h.

#define d_1 t,
n,
b,
 )     extern const t n[256]
 

Definition at line 967 of file aesopt.h.

#define d_4 t,
n,
b,
 )     extern const t n[4][256]
 

Definition at line 968 of file aesopt.h.

#define dec_fmvars   aes_32t g2
 

Definition at line 710 of file aesopt.h.

#define dec_imvars   aes_32t g2, g4, g9
 

Definition at line 719 of file aesopt.h.

#define DEC_ROUND   FOUR_TABLES
 

Definition at line 482 of file aesopt.h.

#define DEC_UNROLL   FULL
 

Definition at line 378 of file aesopt.h.

#define ENC_ROUND   FOUR_TABLES
 

Definition at line 466 of file aesopt.h.

#define ENC_UNROLL   FULL
 

Definition at line 370 of file aesopt.h.

#define FF_TABLES
 

Definition at line 391 of file aesopt.h.

#define FIXED_TABLES
 

Definition at line 429 of file aesopt.h.

#define four_tables x,
tab,
vf,
rf,
 ) 
 

Value:

( tab[0][bval(vf(x,0,c),rf(0,c))] \ ^ tab[1][bval(vf(x,1,c),rf(1,c))] \ ^ tab[2][bval(vf(x,2,c),rf(2,c))] \ ^ tab[3][bval(vf(x,3,c),rf(3,c))])

Definition at line 692 of file aesopt.h.

#define FOUR_TABLES   4
 

Definition at line 257 of file aesopt.h.

#define FULL   2
 

Definition at line 260 of file aesopt.h.

#define fwd_mcol  )     (g2 = gf_mulx(x), g2 ^ upr((x) ^ g2, 3) ^ upr((x), 2) ^ upr((x), 1))
 

Definition at line 711 of file aesopt.h.

#define gf_mulx  )     ((((x) & m2) << 1) ^ ((((x) & m1) >> 7) * BPOLY))
 

Definition at line 596 of file aesopt.h.

#define inv_mcol  ) 
 

Value:

(g2 = gf_mulx(x), g4 = gf_mulx(g2), g9 = (x) ^ gf_mulx(g4), g4 ^= g9, \ (x) ^ g2 ^ g4 ^ upr(g2 ^ g9, 3) ^ upr(g4, 2) ^ upr(g9, 1))

Definition at line 720 of file aesopt.h.

#define KEY_SCHED   FOUR_TABLES
 

Definition at line 502 of file aesopt.h.

#define LAST_DEC_ROUND   FOUR_TABLES
 

Definition at line 490 of file aesopt.h.

#define LAST_ENC_ROUND   FOUR_TABLES
 

Definition at line 474 of file aesopt.h.

#define ls_box x,
 )     no_table(x,t_use(s,box),vf1,rf2,c)
 

Definition at line 733 of file aesopt.h.

#define m1   0x80808080
 

Definition at line 594 of file aesopt.h.

#define m2   0x7f7f7f7f
 

Definition at line 595 of file aesopt.h.

#define no_table x,
box,
vf,
rf,
 ) 
 

Value:

bytes2word( \ box[bval(vf(x,0,c),rf(0,c))], \ box[bval(vf(x,1,c),rf(1,c))], \ box[bval(vf(x,2,c),rf(2,c))], \ box[bval(vf(x,3,c),rf(3,c))])

Definition at line 680 of file aesopt.h.

#define NO_TABLES   0
 

Definition at line 255 of file aesopt.h.

#define NONE   0
 

Definition at line 258 of file aesopt.h.

#define one_table x,
op,
tab,
vf,
rf,
 ) 
 

Value:

( tab[bval(vf(x,0,c),rf(0,c))] \ ^ op(tab[bval(vf(x,1,c),rf(1,c))],1) \ ^ op(tab[bval(vf(x,2,c),rf(2,c))],2) \ ^ op(tab[bval(vf(x,3,c),rf(3,c))],3))

Definition at line 686 of file aesopt.h.

#define ONE_TABLE   1
 

Definition at line 256 of file aesopt.h.

#define PARTIAL   1
 

Definition at line 259 of file aesopt.h.

#define RC_LENGTH   (5 * (AES_BLOCK_SIZE / 4 - 2))
 

Definition at line 511 of file aesopt.h.

#define rf1 r,
 )     (r)
 

Definition at line 699 of file aesopt.h.

#define rf2 r,
 )     ((8+r-c)&3)
 

Definition at line 700 of file aesopt.h.

#define s x,
 )     x[c]
 

Definition at line 417 of file aesopt.h.

Referenced by ast_app_getdata(), ast_app_getdata_full(), ast_applystream(), ast_carefulwrite(), ast_cli_command(), ast_dsp_digitdetect(), ast_dsp_silence(), ast_enum_init(), ast_false(), ast_get_enum(), ast_get_group(), ast_get_txt(), ast_gethostbyname(), ast_ouraddrfor(), ast_playstream(), ast_playtones_start(), ast_readframe(), ast_readstring(), ast_readstring_full(), ast_rtp_reload(), ast_safe_system(), ast_sched_del(), ast_sched_dump(), ast_smoother_feed(), ast_smoother_free(), ast_smoother_get_flags(), ast_smoother_new(), ast_smoother_read(), ast_smoother_reset(), ast_smoother_set_flags(), ast_true(), astman_send_ack(), astman_send_error(), astman_send_response(), manager_event(), and sched_context_destroy().

#define SAFE_IO
 

Definition at line 355 of file aesopt.h.

#define t_dec m,
 )     t_##m##n
 

Definition at line 782 of file aesopt.h.

#define t_set m,
 )     t_##m##n
 

Definition at line 783 of file aesopt.h.

#define t_use m,
 )     t_##m##n
 

Definition at line 784 of file aesopt.h.

#define vf1 x,
r,
 )     (x)
 

Definition at line 698 of file aesopt.h.

#define word_in x,
 ) 
 

Value:

bytes2word(((aes_08t*)(x)+4*c)[0], ((aes_08t*)(x)+4*c)[1], \ ((aes_08t*)(x)+4*c)[2], ((aes_08t*)(x)+4*c)[3])

Definition at line 570 of file aesopt.h.

#define word_out x,
c,
 ) 
 

Value:

{ ((aes_08t*)(x)+4*c)[0] = bval(v,0); ((aes_08t*)(x)+4*c)[1] = bval(v,1); \ ((aes_08t*)(x)+4*c)[2] = bval(v,2); ((aes_08t*)(x)+4*c)[3] = bval(v,3); }

Definition at line 572 of file aesopt.h.

#define WPOLY   0x011b
 

Definition at line 589 of file aesopt.h.


Function Documentation

const aes_32t t_dec ,
 


Generated on Sat Jun 12 16:41:01 2004 for Asterisk by doxygen 1.3.7