Sat Aug 6 00:39:33 2011

Asterisk developer's documentation


aesopt.h File Reference

#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(x, tab, vf, rf, c)
#define FOUR_TABLES   4
#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(x, op, tab, vf, rf, c)
#define ONE_TABLE   1
#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(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)
 d_4 (aes_32t, t_dec(f, n), sb_data, u)
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 250 of file aesopt.h.

#define ALGORITHM_BYTE_ORDER   PLATFORM_BYTE_ORDER

Definition at line 311 of file aesopt.h.

#define ARRAYS

Definition at line 384 of file aesopt.h.

#define BPOLY   0x1b

Definition at line 572 of file aesopt.h.

#define BRG_BIG_ENDIAN   4321

Definition at line 162 of file aesopt.h.

#define BRG_LITTLE_ENDIAN   1234

Definition at line 161 of file aesopt.h.

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

Definition at line 249 of file aesopt.h.

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

Definition at line 949 of file aesopt.h.

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

Definition at line 950 of file aesopt.h.

#define dec_fmvars   aes_32t g2

Definition at line 692 of file aesopt.h.

Referenced by aes_encrypt().

#define DEC_ROUND   FOUR_TABLES

Definition at line 464 of file aesopt.h.

Referenced by aes_decrypt_key128().

#define DEC_UNROLL   FULL

Definition at line 360 of file aesopt.h.

#define DECRYPTION

Definition at line 267 of file aesopt.h.

#define DECRYPTION_KEY_SCHEDULE

Definition at line 268 of file aesopt.h.

#define ENC_ROUND   FOUR_TABLES

Definition at line 448 of file aesopt.h.

#define ENC_UNROLL   FULL

Definition at line 352 of file aesopt.h.

#define ENCRYPTION

Definition at line 262 of file aesopt.h.

#define ENCRYPTION_KEY_SCHEDULE

Definition at line 263 of file aesopt.h.

#define FF_TABLES

Definition at line 373 of file aesopt.h.

#define FIXED_TABLES

Definition at line 411 of file aesopt.h.

#define FL4_SET

Definition at line 625 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 674 of file aesopt.h.

#define FOUR_TABLES   4

Definition at line 239 of file aesopt.h.

#define FT4_SET

Definition at line 618 of file aesopt.h.

#define FULL   2

Definition at line 242 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 693 of file aesopt.h.

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

Definition at line 578 of file aesopt.h.

#define IL4_SET

Definition at line 642 of file aesopt.h.

#define IM4_SET

Definition at line 654 of file aesopt.h.

#define inv_mcol (  )     four_tables(x,t_use(i,m),vf1,rf1,0)

Definition at line 697 of file aesopt.h.

Referenced by aes_decrypt_key128().

#define IT4_SET

Definition at line 635 of file aesopt.h.

#define KEY_SCHED   FOUR_TABLES

Definition at line 484 of file aesopt.h.

#define LAST_DEC_ROUND   FOUR_TABLES

Definition at line 472 of file aesopt.h.

#define LAST_ENC_ROUND   FOUR_TABLES

Definition at line 456 of file aesopt.h.

#define LS4_SET

Definition at line 653 of file aesopt.h.

#define ls_box ( x,
 )     four_tables(x,t_use(f,l),vf1,rf2,c)

Definition at line 707 of file aesopt.h.

#define m1   0x80808080

Definition at line 576 of file aesopt.h.

Referenced by sms_process(), and transtime().

#define m2   0x7f7f7f7f

Definition at line 577 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 662 of file aesopt.h.

#define NO_TABLES   0

Definition at line 237 of file aesopt.h.

Referenced by aes_decrypt_key128().

#define NONE   0

Definition at line 240 of file aesopt.h.

Referenced by __sip_autodestruct(), __sip_show_channels(), handle_request_subscribe(), handle_response(), notify_extenstate_update(), sip_alloc(), sip_show_channel(), sip_show_history(), and transmit_state_notify().

#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 668 of file aesopt.h.

#define ONE_TABLE   1

Definition at line 238 of file aesopt.h.

#define PARTIAL   1

Definition at line 241 of file aesopt.h.

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

Definition at line 493 of file aesopt.h.

#define rf1 ( r,
 )     (r)

Definition at line 681 of file aesopt.h.

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

Definition at line 682 of file aesopt.h.

#define s ( x,
 )     x[c]

Definition at line 399 of file aesopt.h.

Referenced by __action_dialoffhook(), __action_dnd(), __action_restart(), __action_showchannels(), __action_transfer(), __action_transferhangup(), __ast_smoother_feed(), __iax2_show_peers(), __queues_show(), _macro_exec(), _sip_show_peer(), _sip_show_peers(), accept_thread(), action_agent_callback_login(), action_agent_logoff(), action_agents(), action_command(), action_coresettings(), action_corestatus(), action_events(), action_extensionstate(), action_getconfig(), action_getvar(), action_hangup(), action_listcommands(), action_logoff(), action_mailboxcount(), action_mailboxstatus(), action_meetmemute(), action_meetmeunmute(), action_originate(), action_ping(), action_redirect(), action_setcdruserfield(), action_setvar(), action_status(), action_timeout(), action_updateconfig(), action_waitevent(), add_sdp(), agent_devicestate(), agent_request(), aji_act_hook(), aji_send_exec(), aji_status_exec(), append_mailbox(), apply_options(), ast_app_parse_options(), ast_applystream(), ast_cli_netstats(), ast_dsp_digitdetect(), ast_dsp_silence(), ast_dtmf_detect_init(), ast_enum_init(), ast_filehelper(), ast_get_enum(), ast_get_txt(), ast_gethostbyname(), ast_lock_path(), ast_log_vsyslog(), ast_mf_detect_init(), ast_ouraddrfor(), ast_playstream(), ast_playtones_start(), ast_readaudio_callback(), ast_readframe(), ast_readvideo_callback(), ast_rtp_reload(), ast_say_number_full_ka(), ast_sched_del(), ast_sched_when(), ast_smoother_free(), ast_smoother_get_flags(), ast_smoother_new(), ast_smoother_read(), ast_smoother_reconfigure(), ast_smoother_reset(), ast_smoother_set_flags(), ast_smoother_test_flag(), ast_udptl_reload(), ast_udptl_write(), ast_unlock_path(), astman_append(), astman_send_ack(), astman_send_error(), astman_send_response(), astman_verify_session_readpermissions(), astman_verify_session_writepermissions(), attempt_reconnect(), au_open(), au_rewrite(), authenticate(), bc_state2str(), build_secret(), change_monitor_action(), check_auth(), check_day(), check_dow(), check_month(), check_tx_freq(), common_exec(), complete_context_add_ignorepat(), complete_context_add_ignorepat_deprecated(), complete_context_add_include(), complete_context_add_include_deprecated(), complete_context_dont_include_deprecated(), complete_context_remove_extension(), complete_context_remove_extension_deprecated(), complete_context_remove_include(), complete_peer_helper(), conf_run(), connect_link(), console_dial(), console_dial_deprecated(), dahdi_action_dialoffhook(), dahdi_action_dndoff(), dahdi_action_dndon(), dahdi_action_restart(), dahdi_action_showchannels(), dahdi_action_transfer(), dahdi_action_transferhangup(), dahdi_call(), dahdi_request(), destroy_endpoint(), destroy_session(), do_housekeeping(), do_message(), do_pause_or_unpause(), dtmf_detect(), dundi_answer_entity(), dundi_answer_query(), dundi_prop_precache(), dundi_show_precache(), exec_exec(), find_closing_quote(), find_gtalk(), find_session(), fn_wrapper(), forward_message(), free_session(), free_signaling_queue_entry(), function_enum(), function_ilink(), function_remote(), g723_read(), g723_write(), g726_16_open(), g726_16_rewrite(), g726_24_open(), g726_24_rewrite(), g726_32_open(), g726_32_rewrite(), g726_40_open(), g726_40_rewrite(), g726_open(), g726_read(), g726_write(), g729_read(), generic_http_callback(), get_button_template(), get_csv(), get_filestream(), get_input(), get_local_address(), get_range(), goertzel_init(), goertzel_reset(), goertzel_result(), goertzel_sample(), goertzel_update(), gsm_read(), gtalk_request(), h263_open(), h263_read(), h264_open(), h264_read(), h264_write(), handle_button_template_req_message(), handle_capabilities_res_message(), handle_enbloc_call_message(), handle_keep_alive_message(), handle_keypad_button_message(), handle_line_state_req_message(), handle_message(), handle_offhook_message(), handle_onhook_message(), handle_open_receive_channel_ack_message(), handle_register_message(), handle_request(), handle_response_peerpoke(), handle_save_dialplan(), handle_server_request_message(), handle_showmanconn(), handle_showmaneventq(), handle_soft_key_event_message(), handle_soft_key_set_req_message(), handle_soft_key_template_req_message(), handle_speed_dial_stat_req_message(), handle_stimulus_message(), handle_time_date_req_message(), handle_unregister_message(), handle_version_req_message(), iax2_show_cache(), ic706_pltocode(), ilbc_read(), init_logger_chain(), initreqprep(), is_float(), is_int(), jb_reset(), kenwood_pltocode(), launch_netscript(), listener(), load_config(), manager_add_queue_member(), manager_dbget(), manager_dbput(), manager_event(), manager_iax2_show_netstats(), manager_iax2_show_peers(), manager_jabber_send(), manager_park(), manager_parking_status(), manager_pause_queue_member(), manager_play_dtmf(), manager_queue_member_count(), manager_queues_show(), manager_queues_status(), manager_remove_queue_member(), manager_sip_show_peer(), manager_sip_show_peers(), meetmemute(), mf_detect(), normalise_history(), ogg_vorbis_close(), ogg_vorbis_open(), ogg_vorbis_read(), ogg_vorbis_rewrite(), ogg_vorbis_write(), open_wrapper(), parkandannounce_exec(), parse_config(), parse_moved_contact(), pause_monitor_action(), pbx_builtin_execiftime(), pbx_builtin_gotoiftime(), pbx_builtin_importvar(), pbx_builtin_wait(), pbx_retrieve_variable(), pcm_read(), pcm_write(), plc_fillin(), plc_init(), plc_rx(), print_uptimestr(), privacy_exec(), process_events(), process_message(), process_sdp_a_image(), pvt_destructor(), queue_set_param(), quit_handler(), random_exec(), rbi_pltocode(), read_frame(), read_samples(), readfile_exec(), real_ctx(), record_exec(), recordthread(), reset_global_eid(), retreive_memory(), rewrite_wrapper(), rpt(), rpt_do_lstats(), rpt_tele_thread(), rtp_socket(), save_history(), sched_context_destroy(), schedule(), send_signaling(), send_sound(), session_do(), set_eventmask(), setrbi(), setrbi_check(), skinny_answer(), skinny_call(), skinny_hangup(), skinny_hold(), skinny_indicate(), skinny_newcall(), skinny_register(), skinny_req_parse(), skinny_session(), skinny_ss(), skinny_unhold(), skinny_unregister(), slinear_read(), smoother_frame_feed(), sms_readfile(), start_monitor_action(), stop_monitor_action(), transmit_callinfo(), transmit_callstate(), transmit_connect(), transmit_dialednumber(), transmit_displaymessage(), transmit_displaynotify(), transmit_displaypromptstatus(), transmit_fake_auth_response(), transmit_lamp_indication(), transmit_response(), transmit_ringer_mode(), transmit_selectsoftkeys(), transmit_speaker_mode(), transmit_tone(), tryexec_exec(), udptl_build_packet(), udptl_rx_packet(), unload_module(), unpause_monitor_action(), vmauthenticate(), vox_read(), vox_write(), wav_close(), wav_open(), wav_read(), wav_rewrite(), wav_seek(), wav_write(), write_stream(), zap_action_dialoffhook(), zap_action_dndoff(), zap_action_dndon(), zap_action_restart(), zap_action_showchannels(), zap_action_transfer(), and zap_action_transferhangup().

#define SAFE_IO

Definition at line 337 of file aesopt.h.

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

Definition at line 764 of file aesopt.h.

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

Definition at line 765 of file aesopt.h.

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

Definition at line 766 of file aesopt.h.

#define vf1 ( x,
r,
 )     (x)

Definition at line 680 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 552 of file aesopt.h.

Referenced by aes_decrypt_key128(), and aes_encrypt_key128().

#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 554 of file aesopt.h.

#define WPOLY   0x011b

Definition at line 571 of file aesopt.h.


Function Documentation

d_4 ( aes_32t  ,
t_dec(i, m)  ,
mm_data  ,
 
)

d_4 ( aes_32t  ,
t_dec(i, l)  ,
isb_data  ,
 
)

d_4 ( aes_32t  ,
t_dec(i, n)  ,
isb_data  ,
 
)

d_4 ( aes_32t  ,
t_dec(f, l)  ,
sb_data  ,
 
)

d_4 ( aes_32t  ,
t_dec(f, n)  ,
sb_data  ,
 
)

const aes_32t t_dec ( ,
 
)


Generated on Sat Aug 6 00:39:33 2011 for Asterisk - the Open Source PBX by  doxygen 1.4.7