Ruby
2.0.0p594(2014-10-27revision48167)
|
Go to the source code of this file.
Data Structures | |
union | C_block |
Macros | |
#define | _PASSWORD_EFMT1 '_' |
#define | MUST_ALIGN |
#define | LONG_IS_32_BITS |
#define | STATIC static |
#define | TO_SIX_BIT(rslt, src) |
#define | ZERO(d, d0, d1) ((d0) = 0, (d1) = 0) |
#define | LOAD(d, d0, d1, bl) ((d0) = (bl).b32.i0, (d1) = (bl).b32.i1) |
#define | LOADREG(d, d0, d1, s, s0, s1) ((d0) = (s0), (d1) = (s1)) |
#define | OR(d, d0, d1, bl) ((d0) |= (bl).b32.i0, (d1) |= (bl).b32.i1) |
#define | STORE(s, s0, s1, bl) ((bl).b32.i0 = (s0), (bl).b32.i1 = (s1)) |
#define | DCL_BLOCK(d, d0, d1) long d0, d1 |
#define | LGCHUNKBITS 2 |
#define | CHUNKBITS (1<<LGCHUNKBITS) |
#define | PERM6464(d, d0, d1, cpp, p) { C_block tblk; permute((cpp),&tblk,(p),8); LOAD ((d),(d0),(d1),tblk); } |
#define | PERM3264(d, d0, d1, cpp, p) { C_block tblk; permute((cpp),&tblk,(p),4); LOAD ((d),(d0),(d1),tblk); } |
#define | KS_SIZE 16 |
#define | SALT salt |
#define | SPTAB(t, i) (*(long *)((unsigned char *)(t) + (i)*(sizeof(long)/4))) |
#define | DOXOR(x, y, i) k=B.b[(i)]; (x)^=SPTAB(SPE[0][(i)],k); (y)^=SPTAB(SPE[1][(i)],k); |
#define | CRUNCH(p0, p1, q0, q1) |
Functions | |
int | des_setkey () |
int | des_cipher () |
STATIC void | init_des () |
STATIC void | init_perm () |
STATIC void | permute () |
ZERO (D, D0, D1) | |
OR (D, D0, D1,*tp) | |
while (--chars_in > 0) | |
STORE (D, D0, D1,*out) | |
for (i=0;i< 8;i++) | |
if (des_setkey((char *) keyblock.b)) | |
for (i=salt_size;--i >=0;) | |
if (des_cipher((char *)&constdatablock,(char *)&rsltblock, salt, num_iter)) | |
TO_SIX_BIT (salt, L0) | |
LOAD (L, L0, L1, B) | |
LOADREG (R, R0, R1, L, L0, L1) | |
STORE (L, L0, L1, B) | |
PERM3264 (L, L0, L1, B.b,(C_block *) IE3264) | |
PERM3264 (R, R0, R1, B.b+4,(C_block *) IE3264) | |
if (num_iter >=0) | |
while (--num_iter >=0) | |
PERM6464 (L, L0, L1, B.b,(C_block *) CF6464) | |
return (0) | |
return (des_setkey((char *) keyblock.b)) | |
if (des_cipher((char *)&cblock,(char *)&cblock, 0L,(flag?-1:1))) | |
Variables | |
STATIC void unsigned char * | cp |
C_block * | out = B.b[0] |
register C_block * | p = (1<<CHUNKBITS) |
int | chars_in |
register C_block * | tp |
register int | t |
do | |
static unsigned char | IP [] |
static unsigned char | ExpandTr [] |
static unsigned char | PC1 [] |
static unsigned char | Rotates [] |
static unsigned char | PC2 [] |
static unsigned char | S [8][64] |
static unsigned char | P32Tr [] |
static unsigned char | CIFP [] |
static unsigned char | itoa64 [] |
static unsigned char | a64toi [128] |
static C_block | PC1ROT [64/CHUNKBITS][1<< CHUNKBITS] |
static C_block | PC2ROT [2][64/CHUNKBITS][1<< CHUNKBITS] |
static C_block | IE3264 [32/CHUNKBITS][1<< CHUNKBITS] |
static long | SPE [2][8][64] |
static C_block | CF6464 [64/CHUNKBITS][1<< CHUNKBITS] |
static C_block | constdatablock |
static char | cryptresult [1+4+4+11+1] |
char *register const char * | key |
register const char * | setting |
register long | i |
long | salt = 0 |
int | num_iter |
int | salt_size |
C_block | keyblock |
C_block | rsltblock |
encp = salt_size | |
int const char * | in |
register C_block * | kp |
register int | ks_inc = -(int)sizeof(*kp) |
register int | loop_count |
C_block | B |
L0 = salt | |
B | b [0] = in[0] |
R0 & | R1 = (R1 >> 1) & 0x55555555L |
L1 = R0 | R1 | |
else | |
STATIC void C_block | perm [64/CHUNKBITS][1<< CHUNKBITS] |
int | chars_out |
int register char * | block |
int | flag |
C_block | cblock |
#define CHUNKBITS (1<<LGCHUNKBITS) |
#define CRUNCH | ( | p0, | |
p1, | |||
q0, | |||
q1 | |||
) |
Referenced by while().
#define KS_SIZE 16 |
Referenced by while().
#define STORE | ( | s, | |
s0, | |||
s1, | |||
bl | |||
) | ((bl).b32.i0 = (s0), (bl).b32.i1 = (s1)) |
#define TO_SIX_BIT | ( | rslt, | |
src | |||
) |
Definition at line 259 of file crypt.c.
Referenced by init_des().
for | ( | ) |
Definition at line 511 of file crypt.c.
References C_block::b, i, and t.
if | ( | des_setkey((char *) keyblock.b) | ) |
Definition at line 516 of file crypt.c.
References _PASSWORD_EFMT1, C_block::b, des_cipher(), des_setkey(), i, NULL, and t.
if | ( | des_cipher((char *)&constdatablock,(char *)&rsltblock,salt, num_iter) | ) |
if | ( | des_cipher((char *)&cblock,(char *)&cblock, 0L,(flag?-1:1)) | ) |
Definition at line 963 of file crypt.c.
References C_block::b, and i.
Definition at line 759 of file crypt.c.
References i, init_perm(), perm, and TO_SIX_BIT.
Referenced by init_des().
OR | ( | D | , |
D0 | , | ||
D1 | , | ||
* | tp | ||
) |
return | ( | 0 | ) |
return | ( | des_setkey((char *) keyblock.b) | ) |
STORE | ( | D | , |
D0 | , | ||
D1 | , | ||
* | out | ||
) |
while | ( | -- | chars_in, |
0 | |||
) |
while | ( | --num_iter >= | 0 | ) |
ZERO | ( | D | , |
D0 | , | ||
D1 | |||
) |
int register char* block |
Definition at line 949 of file crypt.c.
Referenced by define_final(), define_final0(), eval_string_with_cref(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_data_to_ary(), iseq_set_sequence(), new_insn_send(), proc_new(), rb_funcall_with_block(), rb_iseq_parameters(), rb_method_call_with_block(), rb_mod_refine(), rb_proc_call_with_block(), rb_proc_s_new(), rb_yield_refine_block(), SHA1_Transform(), vm_invoke_block(), and yield_under().
C_block cblock |
|
static |
Definition at line 307 of file crypt.c.
Referenced by BSD__ultoa(), BSD_vfprintf(), code_page_installed(), enc_set_filesystem_encoding(), filecp(), fole_s_set_code_page(), main(), ole_init_cp(), ole_vstr2wc(), options(), rb_file_expand_path_internal(), rb_locale_charmap(), ruby__sfvextra(), set_ole_codepage(), str_gsub(), strio_ungetbyte(), VpAddAbs(), and VpSubAbs().
do |
else |
encp = salt_size |
Definition at line 564 of file crypt.c.
Referenced by parser_tokadd_string().
|
static |
register long i |
Definition at line 639 of file crypt.c.
Referenced by ossl_cipher_update(), ossl_dh_initialize(), ossl_dsa_initialize(), ossl_pkcs12_initialize(), ossl_pkcs7_add_data(), ossl_pkcs7_initialize(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_s_read_smime(), ossl_pkcs7_s_sign(), ossl_pkcs7_s_write_smime(), ossl_pkcs7_verify(), ossl_rsa_initialize(), ossl_ssl_session_initialize(), ossl_x509_initialize(), ossl_x509crl_initialize(), and ossl_x509req_initialize().
|
static |
|
static |
C_block keyblock |
kp |
char * out = B.b[0] |
Definition at line 308 of file crypt.c.
Referenced by console_dev(), fetch_token(), gc_profile_report(), open_ifs_socket(), ossl_dh_export(), ossl_dh_to_text(), ossl_dsa_export(), ossl_dsa_to_text(), ossl_pkcs7_add_data(), ossl_pkcs7_decrypt(), ossl_pkcs7_s_read_smime(), ossl_pkcs7_s_write_smime(), ossl_pkcs7_to_pem(), ossl_pkcs7_verify(), ossl_rsa_export(), ossl_rsa_to_text(), ossl_spki_print(), ossl_ssl_session_to_pem(), ossl_ssl_session_to_text(), ossl_x509_get_signature_algorithm(), ossl_x509_to_pem(), ossl_x509_to_text(), ossl_x509attr_get_oid(), ossl_x509crl_get_signature_algorithm(), ossl_x509crl_to_der(), ossl_x509crl_to_pem(), ossl_x509crl_to_text(), ossl_x509ext_get_oid(), ossl_x509ext_get_value(), ossl_x509name_to_s(), ossl_x509req_get_signature_algorithm(), ossl_x509req_to_pem(), ossl_x509req_to_text(), rb_ary_times(), rb_f_printf(), rb_obj_display(), and report_bug().
|
static |
|
static |
|
static |
Definition at line 904 of file crypt.c.
Referenced by check_exec_redirect(), init_des(), rb_io_open(), rb_io_s_sysopen(), rb_open_file(), rb_scan_open_args(), rb_sysopen(), rb_tmp_class_path(), and run_exec_open().
|
static |
|
static |
Definition at line 382 of file crypt.c.
Referenced by ruby_dtoa().
long salt = 0 |
Definition at line 507 of file crypt.c.
Referenced by ossl_cipher_pkcs5_keyivgen().
tp |
Definition at line 311 of file crypt.c.
Referenced by date_strftime_with_tmx(), ole_invoke2(), rb_str_rstrip_bang(), rb_strftime_with_timespec(), rb_tracepoint_disable(), rb_tracepoint_enable(), rb_tracepoint_enabled_p(), tp_alloc(), tp_call_trace(), tp_mark(), tpptr(), tracepoint_disable_m(), tracepoint_enable_m(), tracepoint_inspect(), and tracepoint_new().