Home
last modified time | relevance | path

Searched refs:md (Results 1 – 25 of 190) sorted by relevance

12345678

/external/dropbear/libtomcrypt/src/hashes/
Dmd2.c60 static void md2_update_chksum(hash_state *md) in md2_update_chksum() argument
64 L = md->md2.chksum[15]; in md2_update_chksum()
70 L = (md->md2.chksum[j] ^= PI_SUBST[(int)(md->md2.buf[j] ^ L)] & 255); in md2_update_chksum()
74 static void md2_compress(hash_state *md) in md2_compress() argument
81 md->md2.X[16+j] = md->md2.buf[j]; in md2_compress()
82 md->md2.X[32+j] = md->md2.X[j] ^ md->md2.X[16+j]; in md2_compress()
90 t = (md->md2.X[k] ^= PI_SUBST[(int)(t & 255)]); in md2_compress()
101 int md2_init(hash_state *md) in md2_init() argument
103 LTC_ARGCHK(md != NULL); in md2_init()
106 zeromem(md->md2.X, sizeof(md->md2.X)); in md2_init()
[all …]
Dsha1.c45 static int _sha1_compress(hash_state *md, unsigned char *buf) in _sha1_compress() argument
47 static int sha1_compress(hash_state *md, unsigned char *buf) in _sha1_compress()
61 a = md->sha1.state[0]; in _sha1_compress()
62 b = md->sha1.state[1]; in _sha1_compress()
63 c = md->sha1.state[2]; in _sha1_compress()
64 d = md->sha1.state[3]; in _sha1_compress()
65 e = md->sha1.state[4]; in _sha1_compress()
141 md->sha1.state[0] = md->sha1.state[0] + a; in _sha1_compress()
142 md->sha1.state[1] = md->sha1.state[1] + b; in _sha1_compress()
143 md->sha1.state[2] = md->sha1.state[2] + c; in _sha1_compress()
[all …]
Dmd4.c76 static int _md4_compress(hash_state *md, unsigned char *buf) in _md4_compress() argument
78 static int md4_compress(hash_state *md, unsigned char *buf) in _md4_compress()
85 a = md->md4.state[0]; in _md4_compress()
86 b = md->md4.state[1]; in _md4_compress()
87 c = md->md4.state[2]; in _md4_compress()
88 d = md->md4.state[3]; in _md4_compress()
151 md->md4.state[0] = md->md4.state[0] + a; in _md4_compress()
152 md->md4.state[1] = md->md4.state[1] + b; in _md4_compress()
153 md->md4.state[2] = md->md4.state[2] + c; in _md4_compress()
154 md->md4.state[3] = md->md4.state[3] + d; in _md4_compress()
[all …]
Dmd5.c101 static int _md5_compress(hash_state *md, unsigned char *buf) in _md5_compress() argument
103 static int md5_compress(hash_state *md, unsigned char *buf) in _md5_compress()
117 a = md->md5.state[0]; in _md5_compress()
118 b = md->md5.state[1]; in _md5_compress()
119 c = md->md5.state[2]; in _md5_compress()
120 d = md->md5.state[3]; in _md5_compress()
210 md->md5.state[0] = md->md5.state[0] + a; in _md5_compress()
211 md->md5.state[1] = md->md5.state[1] + b; in _md5_compress()
212 md->md5.state[2] = md->md5.state[2] + c; in _md5_compress()
213 md->md5.state[3] = md->md5.state[3] + d; in _md5_compress()
[all …]
Drmd256.c78 static int _rmd256_compress(hash_state *md, unsigned char *buf) in _rmd256_compress() argument
80 static int rmd256_compress(hash_state *md, unsigned char *buf) in _rmd256_compress()
92 aa = md->rmd256.state[0]; in _rmd256_compress()
93 bb = md->rmd256.state[1]; in _rmd256_compress()
94 cc = md->rmd256.state[2]; in _rmd256_compress()
95 dd = md->rmd256.state[3]; in _rmd256_compress()
96 aaa = md->rmd256.state[4]; in _rmd256_compress()
97 bbb = md->rmd256.state[5]; in _rmd256_compress()
98 ccc = md->rmd256.state[6]; in _rmd256_compress()
99 ddd = md->rmd256.state[7]; in _rmd256_compress()
[all …]
Drmd128.c84 static int _rmd128_compress(hash_state *md, unsigned char *buf) in _rmd128_compress() argument
86 static int rmd128_compress(hash_state *md, unsigned char *buf) in _rmd128_compress()
98 aa = aaa = md->rmd128.state[0]; in _rmd128_compress()
99 bb = bbb = md->rmd128.state[1]; in _rmd128_compress()
100 cc = ccc = md->rmd128.state[2]; in _rmd128_compress()
101 dd = ddd = md->rmd128.state[3]; in _rmd128_compress()
248 ddd += cc + md->rmd128.state[1]; /* final result for MDbuf[0] */ in _rmd128_compress()
249 md->rmd128.state[1] = md->rmd128.state[2] + dd + aaa; in _rmd128_compress()
250 md->rmd128.state[2] = md->rmd128.state[3] + aa + bbb; in _rmd128_compress()
251 md->rmd128.state[3] = md->rmd128.state[0] + bb + ccc; in _rmd128_compress()
[all …]
Drmd320.c98 static int _rmd320_compress(hash_state *md, unsigned char *buf) in _rmd320_compress() argument
100 static int rmd320_compress(hash_state *md, unsigned char *buf) in _rmd320_compress()
112 aa = md->rmd320.state[0]; in _rmd320_compress()
113 bb = md->rmd320.state[1]; in _rmd320_compress()
114 cc = md->rmd320.state[2]; in _rmd320_compress()
115 dd = md->rmd320.state[3]; in _rmd320_compress()
116 ee = md->rmd320.state[4]; in _rmd320_compress()
117 aaa = md->rmd320.state[5]; in _rmd320_compress()
118 bbb = md->rmd320.state[6]; in _rmd320_compress()
119 ccc = md->rmd320.state[7]; in _rmd320_compress()
[all …]
Drmd160.c104 static int _rmd160_compress(hash_state *md, unsigned char *buf) in _rmd160_compress() argument
106 static int rmd160_compress(hash_state *md, unsigned char *buf) in _rmd160_compress()
118 aa = aaa = md->rmd160.state[0]; in _rmd160_compress()
119 bb = bbb = md->rmd160.state[1]; in _rmd160_compress()
120 cc = ccc = md->rmd160.state[2]; in _rmd160_compress()
121 dd = ddd = md->rmd160.state[3]; in _rmd160_compress()
122 ee = eee = md->rmd160.state[4]; in _rmd160_compress()
305 ddd += cc + md->rmd160.state[1]; /* final result for md->rmd160.state[0] */ in _rmd160_compress()
306 md->rmd160.state[1] = md->rmd160.state[2] + dd + eee; in _rmd160_compress()
307 md->rmd160.state[2] = md->rmd160.state[3] + ee + aaa; in _rmd160_compress()
[all …]
Dtiger.c613 static int _tiger_compress(hash_state *md, unsigned char *buf) in _tiger_compress() argument
615 static int tiger_compress(hash_state *md, unsigned char *buf) in _tiger_compress()
625 a = md->tiger.state[0]; in _tiger_compress()
626 b = md->tiger.state[1]; in _tiger_compress()
627 c = md->tiger.state[2]; in _tiger_compress()
636 md->tiger.state[0] = a ^ md->tiger.state[0]; in _tiger_compress()
637 md->tiger.state[1] = b - md->tiger.state[1]; in _tiger_compress()
638 md->tiger.state[2] = c + md->tiger.state[2]; in _tiger_compress()
644 static int tiger_compress(hash_state *md, unsigned char *buf) in tiger_compress() argument
647 err = _tiger_compress(md, buf); in tiger_compress()
[all …]
/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_hash.h196 int chc_init(hash_state * md);
197 int chc_process(hash_state * md, const unsigned char *in, unsigned long inlen);
198 int chc_done(hash_state * md, unsigned char *hash);
204 int whirlpool_init(hash_state * md);
205 int whirlpool_process(hash_state * md, const unsigned char *in, unsigned long inlen);
206 int whirlpool_done(hash_state * md, unsigned char *hash);
212 int sha512_init(hash_state * md);
213 int sha512_process(hash_state * md, const unsigned char *in, unsigned long inlen);
214 int sha512_done(hash_state * md, unsigned char *hash);
223 int sha384_init(hash_state * md);
[all …]
/external/dropbear/libtomcrypt/src/hashes/chc/
Dchc.c87 int chc_init(hash_state *md) in chc_init() argument
93 LTC_ARGCHK(md != NULL); in chc_init()
116 cipher_descriptor[cipher_idx].ecb_encrypt(buf, md->chc.state, key); in chc_init()
119 md->chc.length = 0; in chc_init()
120 md->chc.curlen = 0; in chc_init()
121 zeromem(md->chc.buf, sizeof(md->chc.buf)); in chc_init()
132 static int chc_compress(hash_state *md, unsigned char *buf) in chc_compress() argument
141 …if ((err = cipher_descriptor[cipher_idx].setup(md->chc.state, cipher_blocksize, 0, key)) != CRYPT_… in chc_compress()
148 md->chc.state[x] ^= T[0][x] ^ T[1][x]; in chc_compress()
159 int _chc_process(hash_state * md, const unsigned char *buf, unsigned long len);
[all …]
/external/dropbear/libtomcrypt/src/hashes/whirl/
Dwhirl.c57 static int _whirlpool_compress(hash_state *md, unsigned char *buf) in _whirlpool_compress() argument
59 static int whirlpool_compress(hash_state *md, unsigned char *buf) in _whirlpool_compress()
67 K[0][x] = md->whirlpool.state[x]; in _whirlpool_compress()
105 md->whirlpool.state[x] ^= T[0][x] ^ T[2][x]; in _whirlpool_compress()
113 static int whirlpool_compress(hash_state *md, unsigned char *buf) in whirlpool_compress() argument
116 err = _whirlpool_compress(md, buf); in whirlpool_compress()
128 int whirlpool_init(hash_state * md) in whirlpool_init() argument
130 LTC_ARGCHK(md != NULL); in whirlpool_init()
131 zeromem(&md->whirlpool, sizeof(md->whirlpool)); in whirlpool_init()
150 int whirlpool_done(hash_state * md, unsigned char *out) in whirlpool_done() argument
[all …]
/external/wpa_supplicant/
Dsha256.c165 static void sha256_init(struct sha256_state *md);
166 static int sha256_process(struct sha256_state *md, const unsigned char *in,
168 static int sha256_done(struct sha256_state *md, unsigned char *out);
231 static int sha256_compress(struct sha256_state *md, unsigned char *buf) in sha256_compress() argument
239 S[i] = md->state[i]; in sha256_compress()
267 md->state[i] = md->state[i] + S[i]; in sha256_compress()
274 static void sha256_init(struct sha256_state *md) in sha256_init() argument
276 md->curlen = 0; in sha256_init()
277 md->length = 0; in sha256_init()
278 md->state[0] = 0x6A09E667UL; in sha256_init()
[all …]
/external/dropbear/libtomcrypt/src/hashes/sha2/
Dsha512.c94 static int _sha512_compress(hash_state * md, unsigned char *buf) in _sha512_compress() argument
96 static int sha512_compress(hash_state * md, unsigned char *buf) in _sha512_compress()
104 S[i] = md->sha512.state[i]; in _sha512_compress()
153 md->sha512.state[i] = md->sha512.state[i] + S[i]; in _sha512_compress()
161 static int sha512_compress(hash_state * md, unsigned char *buf) in sha512_compress() argument
164 err = _sha512_compress(md, buf); in sha512_compress()
175 int sha512_init(hash_state * md) in sha512_init() argument
177 LTC_ARGCHK(md != NULL); in sha512_init()
178 md->sha512.curlen = 0; in sha512_init()
179 md->sha512.length = 0; in sha512_init()
[all …]
Dsha384.c39 int sha384_init(hash_state * md) in sha384_init() argument
41 LTC_ARGCHK(md != NULL); in sha384_init()
43 md->sha512.curlen = 0; in sha384_init()
44 md->sha512.length = 0; in sha384_init()
45 md->sha512.state[0] = CONST64(0xcbbb9d5dc1059ed8); in sha384_init()
46 md->sha512.state[1] = CONST64(0x629a292a367cd507); in sha384_init()
47 md->sha512.state[2] = CONST64(0x9159015a3070dd17); in sha384_init()
48 md->sha512.state[3] = CONST64(0x152fecd8f70e5939); in sha384_init()
49 md->sha512.state[4] = CONST64(0x67332667ffc00b31); in sha384_init()
50 md->sha512.state[5] = CONST64(0x8eb44a8768581511); in sha384_init()
[all …]
Dsha224.c40 int sha224_init(hash_state * md) in sha224_init() argument
42 LTC_ARGCHK(md != NULL); in sha224_init()
44 md->sha256.curlen = 0; in sha224_init()
45 md->sha256.length = 0; in sha224_init()
46 md->sha256.state[0] = 0xc1059ed8UL; in sha224_init()
47 md->sha256.state[1] = 0x367cd507UL; in sha224_init()
48 md->sha256.state[2] = 0x3070dd17UL; in sha224_init()
49 md->sha256.state[3] = 0xf70e5939UL; in sha224_init()
50 md->sha256.state[4] = 0xffc00b31UL; in sha224_init()
51 md->sha256.state[5] = 0x68581511UL; in sha224_init()
[all …]
Dsha256.c69 static int _sha256_compress(hash_state * md, unsigned char *buf) in _sha256_compress() argument
71 static int sha256_compress(hash_state * md, unsigned char *buf) in _sha256_compress()
82 S[i] = md->sha256.state[i]; in _sha256_compress()
186 md->sha256.state[i] = md->sha256.state[i] + S[i]; in _sha256_compress()
192 static int sha256_compress(hash_state * md, unsigned char *buf) in sha256_compress() argument
195 err = _sha256_compress(md, buf); in sha256_compress()
206 int sha256_init(hash_state * md) in sha256_init() argument
208 LTC_ARGCHK(md != NULL); in sha256_init()
210 md->sha256.curlen = 0; in sha256_init()
211 md->sha256.length = 0; in sha256_init()
[all …]
/external/qemu/telephony/
Dmodem_driver.c43 ModemDriver* md = _md; in modem_driver_unsol() local
46 qemu_chr_write(md->cs, (const uint8_t*)message, len); in modem_driver_unsol()
52 ModemDriver* md = _md; in modem_driver_can_read() local
53 int ret = sizeof(md->in_buff) - md->in_pos; in modem_driver_can_read()
62 ModemDriver* md = _md; in modem_driver_read() local
83 if (md->in_sms) { in modem_driver_read()
87 md->in_buff[ md->in_pos ] = c; in modem_driver_read()
88 md->in_pos++; in modem_driver_read()
89 md->in_sms = 0; in modem_driver_read()
96 if (md->in_pos == 0) /* skip empty lines */ in modem_driver_read()
[all …]
/external/openssl/crypto/hmac/
Dhmac.c65 const EVP_MD *md, ENGINE *impl) in HMAC_Init_ex() argument
70 if (md != NULL) in HMAC_Init_ex()
73 ctx->md=md; in HMAC_Init_ex()
76 md=ctx->md; in HMAC_Init_ex()
81 j=EVP_MD_block_size(md); in HMAC_Init_ex()
85 EVP_DigestInit_ex(&ctx->md_ctx,md, impl); in HMAC_Init_ex()
105 EVP_DigestInit_ex(&ctx->i_ctx,md, impl); in HMAC_Init_ex()
106 EVP_DigestUpdate(&ctx->i_ctx,pad,EVP_MD_block_size(md)); in HMAC_Init_ex()
110 EVP_DigestInit_ex(&ctx->o_ctx,md, impl); in HMAC_Init_ex()
111 EVP_DigestUpdate(&ctx->o_ctx,pad,EVP_MD_block_size(md)); in HMAC_Init_ex()
[all …]
/external/openssl/crypto/evp/
Dbio_ok.c153 EVP_MD_CTX md; member
193 EVP_MD_CTX_init(&ctx->md); in ok_new()
204 EVP_MD_CTX_cleanup(&((BIO_OK_CTX *)a->ptr)->md); in ok_free()
347 EVP_MD *md; in ok_ctrl() local
410 md=ptr; in ok_ctrl()
411 EVP_DigestInit_ex(&ctx->md, md, NULL); in ok_ctrl()
418 *ppmd=ctx->md.digest; in ok_ctrl()
461 EVP_MD_CTX *md; in sig_out() local
464 md=&ctx->md; in sig_out()
466 if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return; in sig_out()
[all …]
/external/openssl/crypto/conf/
Dconf_mod.c110 static void module_free(CONF_MODULE *md);
209 CONF_MODULE *md; in module_run() local
212 md = module_find(name); in module_run()
215 if (!md && !(flags & CONF_MFLAGS_NO_DSO)) in module_run()
216 md = module_load_dso(cnf, name, value, flags); in module_run()
218 if (!md) in module_run()
228 ret = module_init(md, name, value, cnf); in module_run()
253 CONF_MODULE *md; in module_load_dso() local
275 md = module_add(dso, name, ifunc, ffunc); in module_load_dso()
277 if (!md) in module_load_dso()
[all …]
/external/libpcap/
Dpcap-dag.c132 if(dag_stop_stream(p->fd, p->md.dag_stream) < 0) in dag_platform_close()
135 if(dag_detach_stream(p->fd, p->md.dag_stream) < 0) in dag_platform_close()
192 int flags = p->md.dag_offset_flags; in dag_read()
196 while (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size) { in dag_read()
223 p->md.dag_mem_top = dag_advance_stream(p->fd, p->md.dag_stream, &(p->md.dag_mem_bottom)); in dag_read()
226 p->md.dag_mem_top = dag_offset(p->fd, &(p->md.dag_mem_bottom), flags); in dag_read()
229 if (nonblocking && (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size)) in dag_read()
236 p->md.dag_timeout && in dag_read()
237 (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size)) in dag_read()
246 while (p->md.dag_mem_top - p->md.dag_mem_bottom >= dag_record_size) { in dag_read()
[all …]
/external/openssl/crypto/sha/
Dsha512t.c77 { unsigned char md[SHA512_DIGEST_LENGTH]; in main() local
93 EVP_Digest ("abc",3,md,NULL,EVP_sha512(),NULL); in main()
94 if (memcmp(md,app_c1,sizeof(app_c1))) in main()
105 "mnopqrst""nopqrstu",112,md,NULL,EVP_sha512(),NULL); in main()
106 if (memcmp(md,app_c2,sizeof(app_c2))) in main()
127 EVP_DigestFinal_ex (&evp,md,NULL); in main()
130 if (memcmp(md,app_c3,sizeof(app_c3))) in main()
142 EVP_Digest ("abc",3,md,NULL,EVP_sha384(),NULL); in main()
143 if (memcmp(md,app_d1,sizeof(app_d1))) in main()
154 "mnopqrst""nopqrstu",112,md,NULL,EVP_sha384(),NULL); in main()
[all …]
Dsha256t.c58 { unsigned char md[SHA256_DIGEST_LENGTH]; in main() local
64 EVP_Digest ("abc",3,md,NULL,EVP_sha256(),NULL); in main()
65 if (memcmp(md,app_b1,sizeof(app_b1))) in main()
74 "ijkljklm""klmnlmno""mnopnopq",56,md,NULL,EVP_sha256(),NULL); in main()
75 if (memcmp(md,app_b2,sizeof(app_b2))) in main()
92 EVP_DigestFinal_ex (&evp,md,NULL); in main()
95 if (memcmp(md,app_b3,sizeof(app_b3))) in main()
107 EVP_Digest ("abc",3,md,NULL,EVP_sha224(),NULL); in main()
108 if (memcmp(md,addenum_1,sizeof(addenum_1))) in main()
117 "ijkljklm""klmnlmno""mnopnopq",56,md,NULL,EVP_sha224(),NULL); in main()
[all …]
/external/dropbear/libtomcrypt/src/pk/pkcs1/
Dpkcs_1_mgf1.c36 hash_state *md; in pkcs_1_mgf1() local
51 md = XMALLOC(sizeof(hash_state)); in pkcs_1_mgf1()
53 if (md == NULL || buf == NULL) { in pkcs_1_mgf1()
54 if (md != NULL) { in pkcs_1_mgf1()
55 XFREE(md); in pkcs_1_mgf1()
72 if ((err = hash_descriptor[hash_idx].init(md)) != CRYPT_OK) { in pkcs_1_mgf1()
75 if ((err = hash_descriptor[hash_idx].process(md, seed, seedlen)) != CRYPT_OK) { in pkcs_1_mgf1()
78 if ((err = hash_descriptor[hash_idx].process(md, buf, 4)) != CRYPT_OK) { in pkcs_1_mgf1()
81 if ((err = hash_descriptor[hash_idx].done(md, buf)) != CRYPT_OK) { in pkcs_1_mgf1()
95 zeromem(md, sizeof(hash_state)); in pkcs_1_mgf1()
[all …]

12345678