#include "asterisk/aes.h"#include "asterisk/endian.h"

Go to the source code of this file.
Defines | |
| #define | aes_sw32(x) ((brot((x),8) & 0x00ff00ff) | (brot((x),24) & 0xff00ff00)) |
| #define | ALGORITHM_BYTE_ORDER PLATFORM_BYTE_ORDER |
| #define | ARRAYS |
| #define | BPOLY 0x1b |
| #define | BRG_BIG_ENDIAN 4321 |
| #define | BRG_LITTLE_ENDIAN 1234 |
| #define | brot(x, n) (((aes_32t)(x) << n) | ((aes_32t)(x) >> (32 - 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] |
| #define | dec_fmvars aes_32t g2 |
| #define | DEC_ROUND FOUR_TABLES |
| #define | DEC_UNROLL FULL |
| #define | DECRYPTION |
| #define | DECRYPTION_KEY_SCHEDULE |
| #define | ENC_ROUND FOUR_TABLES |
| #define | ENC_UNROLL FULL |
| #define | ENCRYPTION |
| #define | ENCRYPTION_KEY_SCHEDULE |
| #define | FF_TABLES |
| #define | FIXED_TABLES |
| #define | FL4_SET |
| #define | FOUR_TABLES 4 |
| #define | four_tables(x, tab, vf, rf, c) |
| #define | FT4_SET |
| #define | FULL 2 |
| #define | fwd_mcol(x) (g2 = gf_mulx(x), g2 ^ upr((x) ^ g2, 3) ^ upr((x), 2) ^ upr((x), 1)) |
| #define | gf_mulx(x) ((((x) & m2) << 1) ^ ((((x) & m1) >> 7) * BPOLY)) |
| #define | IL4_SET |
| #define | IM4_SET |
| #define | inv_mcol(x) four_tables(x,t_use(i,m),vf1,rf1,0) |
| #define | IT4_SET |
| #define | KEY_SCHED FOUR_TABLES |
| #define | LAST_DEC_ROUND FOUR_TABLES |
| #define | LAST_ENC_ROUND FOUR_TABLES |
| #define | LS4_SET |
| #define | ls_box(x, c) four_tables(x,t_use(f,l),vf1,rf2,c) |
| #define | m1 0x80808080 |
| #define | m2 0x7f7f7f7f |
| #define | no_table(x, box, vf, rf, c) |
| #define | NO_TABLES 0 |
| #define | NONE 0 |
| #define | ONE_TABLE 1 |
| #define | one_table(x, op, tab, vf, rf, c) |
| #define | PARTIAL 1 |
| #define | RC_LENGTH (5 * (AES_BLOCK_SIZE / 4 - 2)) |
| #define | rf1(r, c) (r) |
| #define | rf2(r, c) ((8+r-c)&3) |
| #define | s(x, c) x[c] |
| #define | SAFE_IO |
| #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 | vf1(x, r, c) (x) |
| #define | word_in(x, c) |
| #define | word_out(x, c, v) |
| #define | WPOLY 0x011b |
Functions | |
| d_4 (aes_32t, t_dec(f, n), sb_data, u) | |
| d_4 (aes_32t, t_dec(i, m), mm_data, v) | |
| d_4 (aes_32t, t_dec(i, l), isb_data, w) | |
| d_4 (aes_32t, t_dec(i, n), isb_data, v) | |
| d_4 (aes_32t, t_dec(f, l), sb_data, w) | |
| const aes_32t | t_dec (r, c)[RC_LENGTH] |
| #define aes_sw32 | ( | x | ) | ((brot((x),8) & 0x00ff00ff) | (brot((x),24) & 0xff00ff00)) |
| #define brot | ( | x, | ||
| n | ||||
| ) | (((aes_32t)(x) << n) | ((aes_32t)(x) >> (32 - n))) |
| #define four_tables | ( | x, | ||
| tab, | ||||
| vf, | ||||
| rf, | ||||
| c | ||||
| ) |
| #define fwd_mcol | ( | x | ) | (g2 = gf_mulx(x), g2 ^ upr((x) ^ g2, 3) ^ upr((x), 2) ^ upr((x), 1)) |
| #define gf_mulx | ( | x | ) | ((((x) & m2) << 1) ^ ((((x) & m1) >> 7) * BPOLY)) |
| #define inv_mcol | ( | x | ) | four_tables(x,t_use(i,m),vf1,rf1,0) |
Definition at line 697 of file aesopt.h.
Referenced by aes_decrypt_key128().
| #define ls_box | ( | x, | ||
| c | ||||
| ) | four_tables(x,t_use(f,l),vf1,rf2,c) |
| #define m1 0x80808080 |
Definition at line 576 of file aesopt.h.
Referenced by add_exten_to_pattern_tree().
| #define m2 0x7f7f7f7f |
Definition at line 577 of file aesopt.h.
Referenced by add_exten_to_pattern_tree().
| #define no_table | ( | x, | ||
| box, | ||||
| vf, | ||||
| rf, | ||||
| c | ||||
| ) |
| #define one_table | ( | x, | ||
| op, | ||||
| tab, | ||||
| vf, | ||||
| rf, | ||||
| c | ||||
| ) |
| #define s | ( | x, | ||
| c | ||||
| ) | x[c] |
Definition at line 399 of file aesopt.h.
Referenced by __ast_cli_register(), acf_import(), add_sdp(), aji_status_exec(), ast_dsp_digitreset(), ast_say_number_full_ka(), ast_skip_nonblanks(), bc_state2str(), CB_ADD_LEN(), check_auth(), cli_console_dial(), complete_dialplan_add_include(), complete_dialplan_remove_extension(), complete_dialplan_remove_include(), complete_peer_helper(), console_dial(), dahdi_call(), destroy_endpoint(), find_gtalk(), g726_open(), generic_http_callback(), gtalk_request(), handle_response_peerpoke(), initreqprep(), jb_reset(), jingle_request(), mwi_event_cb(), notify_message(), ogg_vorbis_close(), ogg_vorbis_read(), ogg_vorbis_write(), parse_register_contact(), pbx_builtin_importvar(), phase_e_handler(), process_sdp_a_image(), pvt_destructor(), read_samples(), real_ctx(), record_exec(), recordthread(), rpt(), rtp_socket(), sched_hash(), send_signaling(), session_do(), setrbi(), setrbi_check(), setrtx(), setrtx_check(), sip_prepare_socket(), skinny_indicate(), skinny_session(), ssl_write(), threadinfo_locate_cb(), transmit_response(), unistim_ss(), usb_list_check(), vmauthenticate(), wav_seek(), and wav_write().
| #define word_in | ( | x, | ||
| c | ||||
| ) |
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 552 of file aesopt.h.
Referenced by aes_decrypt_key128(), and aes_encrypt_key128().
| #define word_out | ( | x, | ||
| c, | ||||
| v | ||||
| ) |
| d_4 | ( | aes_32t | , | |
| t_dec(f, n) | , | |||
| sb_data | , | |||
| u | ||||
| ) |
| d_4 | ( | aes_32t | , | |
| t_dec(i, m) | , | |||
| mm_data | , | |||
| v | ||||
| ) |
| d_4 | ( | aes_32t | , | |
| t_dec(i, l) | , | |||
| isb_data | , | |||
| w | ||||
| ) |
| d_4 | ( | aes_32t | , | |
| t_dec(i, n) | , | |||
| isb_data | , | |||
| v | ||||
| ) |
| d_4 | ( | aes_32t | , | |
| t_dec(f, l) | , | |||
| sb_data | , | |||
| w | ||||
| ) |
| const aes_32t t_dec | ( | r | , | |
| c | ||||
| ) |
1.7.1