関数 | |
static uint32 | F (uint32 X, uint32 Y, uint32 Z) |
static uint32 | G (uint32 X, uint32 Y, uint32 Z) |
static uint32 | H (uint32 X, uint32 Y, uint32 Z) |
static uint32 | lshift (uint32 x, int s) |
static void | mdfour64 (uint32 *M) |
static void | copy64 (uint32 *M, const unsigned char *in) |
static void | copy4 (unsigned char *out, uint32 x) |
void | mdfour (unsigned char *out, const unsigned char *in, int n) |
変数 | |
static uint32 | A |
static uint32 | B |
static uint32 | C |
static uint32 | D |
static uint32 F | ( | uint32 | X, | |
uint32 | Y, | |||
uint32 | Z | |||
) | [static] |
static uint32 G | ( | uint32 | X, | |
uint32 | Y, | |||
uint32 | Z | |||
) | [static] |
static uint32 H | ( | uint32 | X, | |
uint32 | Y, | |||
uint32 | Z | |||
) | [static] |
static uint32 lshift | ( | uint32 | x, | |
int | s | |||
) | [static] |
static void mdfour64 | ( | uint32 * | M | ) | [static] |
参照元 mdfour().
00057 { 00058 int j; 00059 uint32 AA, BB, CC, DD; 00060 uint32 X[16]; 00061 00062 for (j=0;j<16;j++) 00063 X[j] = M[j]; 00064 00065 AA = A; BB = B; CC = C; DD = D; 00066 00067 ROUND1(A,B,C,D, 0, 3); ROUND1(D,A,B,C, 1, 7); 00068 ROUND1(C,D,A,B, 2, 11); ROUND1(B,C,D,A, 3, 19); 00069 ROUND1(A,B,C,D, 4, 3); ROUND1(D,A,B,C, 5, 7); 00070 ROUND1(C,D,A,B, 6, 11); ROUND1(B,C,D,A, 7, 19); 00071 ROUND1(A,B,C,D, 8, 3); ROUND1(D,A,B,C, 9, 7); 00072 ROUND1(C,D,A,B, 10, 11); ROUND1(B,C,D,A, 11, 19); 00073 ROUND1(A,B,C,D, 12, 3); ROUND1(D,A,B,C, 13, 7); 00074 ROUND1(C,D,A,B, 14, 11); ROUND1(B,C,D,A, 15, 19); 00075 00076 ROUND2(A,B,C,D, 0, 3); ROUND2(D,A,B,C, 4, 5); 00077 ROUND2(C,D,A,B, 8, 9); ROUND2(B,C,D,A, 12, 13); 00078 ROUND2(A,B,C,D, 1, 3); ROUND2(D,A,B,C, 5, 5); 00079 ROUND2(C,D,A,B, 9, 9); ROUND2(B,C,D,A, 13, 13); 00080 ROUND2(A,B,C,D, 2, 3); ROUND2(D,A,B,C, 6, 5); 00081 ROUND2(C,D,A,B, 10, 9); ROUND2(B,C,D,A, 14, 13); 00082 ROUND2(A,B,C,D, 3, 3); ROUND2(D,A,B,C, 7, 5); 00083 ROUND2(C,D,A,B, 11, 9); ROUND2(B,C,D,A, 15, 13); 00084 00085 ROUND3(A,B,C,D, 0, 3); ROUND3(D,A,B,C, 8, 9); 00086 ROUND3(C,D,A,B, 4, 11); ROUND3(B,C,D,A, 12, 15); 00087 ROUND3(A,B,C,D, 2, 3); ROUND3(D,A,B,C, 10, 9); 00088 ROUND3(C,D,A,B, 6, 11); ROUND3(B,C,D,A, 14, 15); 00089 ROUND3(A,B,C,D, 1, 3); ROUND3(D,A,B,C, 9, 9); 00090 ROUND3(C,D,A,B, 5, 11); ROUND3(B,C,D,A, 13, 15); 00091 ROUND3(A,B,C,D, 3, 3); ROUND3(D,A,B,C, 11, 9); 00092 ROUND3(C,D,A,B, 7, 11); ROUND3(B,C,D,A, 15, 15); 00093 00094 A += AA; B += BB; C += CC; D += DD; 00095 00096 A &= 0xFFFFFFFF; B &= 0xFFFFFFFF; 00097 C &= 0xFFFFFFFF; D &= 0xFFFFFFFF; 00098 00099 for (j=0;j<16;j++) 00100 X[j] = 0; 00101 }
static void copy64 | ( | uint32 * | M, | |
const unsigned char * | in | |||
) | [static] |
static void copy4 | ( | unsigned char * | out, | |
uint32 | x | |||
) | [static] |
void mdfour | ( | unsigned char * | out, | |
const unsigned char * | in, | |||
int | n | |||
) |
参照先 A・B・buf・C・copy4()・copy64()・D・mdfour64().
参照元 decrypt_trustdom_secret()・do_filehash()・do_reseed()・E_md4hash()・generate_random_buffer()・ntlm_password_check()・SMBsesskeygen_ntv1().
00122 { 00123 unsigned char buf[128]; 00124 uint32 M[16]; 00125 uint32 b = n * 8; 00126 int i; 00127 00128 A = 0x67452301; 00129 B = 0xefcdab89; 00130 C = 0x98badcfe; 00131 D = 0x10325476; 00132 00133 while (n > 64) { 00134 copy64(M, in); 00135 mdfour64(M); 00136 in += 64; 00137 n -= 64; 00138 } 00139 00140 for (i=0;i<128;i++) 00141 buf[i] = 0; 00142 memcpy(buf, in, n); 00143 buf[n] = 0x80; 00144 00145 if (n <= 55) { 00146 copy4(buf+56, b); 00147 copy64(M, buf); 00148 mdfour64(M); 00149 } else { 00150 copy4(buf+120, b); 00151 copy64(M, buf); 00152 mdfour64(M); 00153 copy64(M, buf+64); 00154 mdfour64(M); 00155 } 00156 00157 for (i=0;i<128;i++) 00158 buf[i] = 0; 00159 copy64(M, buf); 00160 00161 copy4(out, A); 00162 copy4(out+4, B); 00163 copy4(out+8, C); 00164 copy4(out+12, D); 00165 00166 A = B = C = D = 0; 00167 }
uint32 A [static] |
uint32 B [static] |
uint32 C [static] |
uint32 D [static] |
参照元 disk_quotas()・get_smb_linux_gen_quota()・get_smb_linux_v1_quota()・get_smb_linux_v2_quota()・get_smb_linux_xfs_quota()・mdfour()・mdfour64()・sys_get_linux_gen_quota()・sys_get_linux_v1_quota()・sys_get_linux_v2_quota()・sys_get_xfs_quota()・sys_set_linux_gen_quota()・sys_set_linux_v1_quota()・sys_set_linux_v2_quota()・sys_set_xfs_quota()・vfs_get_ntquota()・vfs_set_ntquota().