Home
last modified time | relevance | path

Searched refs:cipher_descriptor (Results 1 – 25 of 73) sorted by relevance

123

/external/dropbear/libtomcrypt/demos/
Dtv_gen.c170 for (x = 0; cipher_descriptor[x].name != NULL; x++) { in cipher_gen()
171 fprintf(out, "Cipher: %s\n", cipher_descriptor[x].name); in cipher_gen()
177 case 0: kl = cipher_descriptor[x].min_key_length; break; in cipher_gen()
178 … case 1: kl = (cipher_descriptor[x].min_key_length + cipher_descriptor[x].max_key_length)/2; break; in cipher_gen()
179 case 2: kl = cipher_descriptor[x].max_key_length; break; in cipher_gen()
181 if ((err = cipher_descriptor[x].keysize(&kl)) != CRYPT_OK) { in cipher_gen()
198 if ((err = cipher_descriptor[x].setup(key, kl, 0, &skey)) != CRYPT_OK) { in cipher_gen()
203 for (z = 0; (int)z < cipher_descriptor[x].block_length; z++) { in cipher_gen()
207 cipher_descriptor[x].ecb_encrypt(pt, pt, &skey); in cipher_gen()
209 for (z = 0; (int)z < cipher_descriptor[x].block_length; z++) { in cipher_gen()
[all …]
/external/dropbear/libtomcrypt/src/mac/xcbc/
Dxcbc_init.c41 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) { in xcbc_init()
52 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) { in xcbc_init()
58 for (x = 0; x < cipher_descriptor[cipher].block_length; x++) { in xcbc_init()
61 cipher_descriptor[cipher].ecb_encrypt(xcbc->K[y], xcbc->K[y], skey); in xcbc_init()
65 …err = cipher_descriptor[cipher].setup(xcbc->K[0], cipher_descriptor[cipher].block_length, 0, &xcbc… in xcbc_init()
68 zeromem(xcbc->IV, cipher_descriptor[cipher].block_length); in xcbc_init()
69 xcbc->blocksize = cipher_descriptor[cipher].block_length; in xcbc_init()
73 cipher_descriptor[cipher].done(skey); in xcbc_init()
Dxcbc_process.c41 if ((xcbc->blocksize > cipher_descriptor[xcbc->cipher].block_length) || (xcbc->blocksize < 0) || in xcbc_process()
52 cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); in xcbc_process()
61 cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); in xcbc_process()
Dxcbc_done.c37 if ((xcbc->blocksize > cipher_descriptor[xcbc->cipher].block_length) || (xcbc->blocksize < 0) || in xcbc_done()
57 cipher_descriptor[xcbc->cipher].ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); in xcbc_done()
58 cipher_descriptor[xcbc->cipher].done(&xcbc->key); in xcbc_done()
/external/dropbear/libtomcrypt/src/modes/ecb/
Decb_decrypt.c37 if (len % cipher_descriptor[ecb->cipher].block_length) { in ecb_decrypt()
42 if (cipher_descriptor[ecb->cipher].accel_ecb_decrypt != NULL) { in ecb_decrypt()
43 …return cipher_descriptor[ecb->cipher].accel_ecb_decrypt(ct, pt, len / cipher_descriptor[ecb->ciphe… in ecb_decrypt()
46 if ((err = cipher_descriptor[ecb->cipher].ecb_decrypt(ct, pt, &ecb->key)) != CRYPT_OK) { in ecb_decrypt()
49 pt += cipher_descriptor[ecb->cipher].block_length; in ecb_decrypt()
50 ct += cipher_descriptor[ecb->cipher].block_length; in ecb_decrypt()
51 len -= cipher_descriptor[ecb->cipher].block_length; in ecb_decrypt()
Decb_encrypt.c37 if (len % cipher_descriptor[ecb->cipher].block_length) { in ecb_encrypt()
42 if (cipher_descriptor[ecb->cipher].accel_ecb_encrypt != NULL) { in ecb_encrypt()
43 …return cipher_descriptor[ecb->cipher].accel_ecb_encrypt(pt, ct, len / cipher_descriptor[ecb->ciphe… in ecb_encrypt()
46 if ((err = cipher_descriptor[ecb->cipher].ecb_encrypt(pt, ct, &ecb->key)) != CRYPT_OK) { in ecb_encrypt()
49 pt += cipher_descriptor[ecb->cipher].block_length; in ecb_encrypt()
50 ct += cipher_descriptor[ecb->cipher].block_length; in ecb_encrypt()
51 len -= cipher_descriptor[ecb->cipher].block_length; in ecb_encrypt()
/external/dropbear/libtomcrypt/src/encauth/ccm/
Dccm_memory.c75 if (cipher_descriptor[cipher].block_length != 16) { in ccm_memory()
91 if (cipher_descriptor[cipher].accel_ccm_memory != NULL) { in ccm_memory()
92 return cipher_descriptor[cipher].accel_ccm_memory( in ccm_memory()
133 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, skey)) != CRYPT_OK) { in ccm_memory()
170 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { in ccm_memory()
195 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { in ccm_memory()
205 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { in ccm_memory()
241 if ((err = cipher_descriptor[cipher].ecb_encrypt(ctr, CTRPAD, skey)) != CRYPT_OK) { in ccm_memory()
250 if ((err = cipher_descriptor[cipher].ecb_encrypt(PAD, PAD, skey)) != CRYPT_OK) { in ccm_memory()
261 if ((err = cipher_descriptor[cipher].ecb_encrypt(ctr, CTRPAD, skey)) != CRYPT_OK) { in ccm_memory()
[all …]
/external/dropbear/libtomcrypt/src/hashes/chc/
Dchc.c51 kl = cipher_descriptor[cipher].block_length; in chc_register()
59 if ((err = cipher_descriptor[cipher].keysize(&kl)) != CRYPT_OK) { in chc_register()
63 if (kl != cipher_descriptor[cipher].block_length) { in chc_register()
74 hash_descriptor[idx].blocksize = cipher_descriptor[cipher].block_length; in chc_register()
78 cipher_blocksize = cipher_descriptor[cipher].block_length; in chc_register()
100 if (cipher_blocksize != cipher_descriptor[cipher_idx].block_length) { in chc_init()
110 if ((err = cipher_descriptor[cipher_idx].setup(buf, cipher_blocksize, 0, key)) != CRYPT_OK) { in chc_init()
116 cipher_descriptor[cipher_idx].ecb_encrypt(buf, md->chc.state, key); in chc_init()
141 …if ((err = cipher_descriptor[cipher_idx].setup(md->chc.state, cipher_blocksize, 0, key)) != CRYPT_… in chc_compress()
146 cipher_descriptor[cipher_idx].ecb_encrypt(buf, T[0], key); in chc_compress()
[all …]
/external/dropbear/libtomcrypt/src/modes/f8/
Df8_start.c51 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) { in f8_start()
59 f8->blocklen = cipher_descriptor[cipher].block_length; in f8_start()
75 if ((err = cipher_descriptor[cipher].setup(tkey, keylen, num_rounds, &f8->key)) != CRYPT_OK) { in f8_start()
80 if ((err = cipher_descriptor[f8->cipher].ecb_encrypt(IV, f8->MIV, &f8->key)) != CRYPT_OK) { in f8_start()
81 cipher_descriptor[f8->cipher].done(&f8->key); in f8_start()
88 cipher_descriptor[f8->cipher].done(&f8->key); in f8_start()
91 return cipher_descriptor[cipher].setup(key, keylen, num_rounds, &f8->key); in f8_start()
/external/dropbear/libtomcrypt/src/mac/f9/
Df9_init.c40 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) { in f9_init()
45 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &f9->key)) != CRYPT_OK) { in f9_init()
55 zeromem(f9->IV, cipher_descriptor[cipher].block_length); in f9_init()
56 zeromem(f9->ACC, cipher_descriptor[cipher].block_length); in f9_init()
57 f9->blocksize = cipher_descriptor[cipher].block_length; in f9_init()
Df9_done.c37 if ((f9->blocksize > cipher_descriptor[f9->cipher].block_length) || (f9->blocksize < 0) || in f9_done()
44 cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_done()
52 if ((err = cipher_descriptor[f9->cipher].setup(f9->akey, f9->keylen, 0, &f9->key)) != CRYPT_OK) { in f9_done()
57 cipher_descriptor[f9->cipher].ecb_encrypt(f9->ACC, f9->ACC, &f9->key); in f9_done()
58 cipher_descriptor[f9->cipher].done(&f9->key); in f9_done()
Df9_process.c38 if ((f9->blocksize > cipher_descriptor[f9->cipher].block_length) || (f9->blocksize < 0) || in f9_process()
49 cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_process()
61 cipher_descriptor[f9->cipher].ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_process()
/external/dropbear/libtomcrypt/testprof/
Dx86_prof.c27 …fprintf(stderr, "%-20s: Schedule at %6lu\n", cipher_descriptor[results[x].id].name, (unsigned long… in tally_results()
32 …-20s[%3d]: Encrypt at %5lu, Decrypt at %5lu\n", cipher_descriptor[results[x].id].name, cipher_desc… in tally_results()
266 for (x = 0; cipher_descriptor[x].name != NULL; x++) { in time_keysched()
269 func = cipher_descriptor[x].setup; in time_keysched()
270 kl = cipher_descriptor[x].min_key_length; in time_keysched()
301 for (x = 0; cipher_descriptor[x].name != NULL; x++) { in time_cipher()
302 ecb_start(x, key, cipher_descriptor[x].min_key_length, 0, &ecb); in time_cipher()
305 if ((err = cipher_descriptor[x].test()) != CRYPT_OK) { in time_cipher()
306 …fprintf(stderr, "\n\nERROR: Cipher %s failed self-test %s\n", cipher_descriptor[x].name, error_to_… in time_cipher()
348 results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); in time_cipher()
[all …]
/external/dropbear/libtomcrypt/src/mac/omac/
Domac_init.c42 if (cipher_descriptor[cipher].block_length % sizeof(LTC_FAST_TYPE)) { in omac_init()
48 switch (cipher_descriptor[cipher].block_length) { in omac_init()
58 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &omac->key)) != CRYPT_OK) { in omac_init()
65 zeromem(omac->Lu[0], cipher_descriptor[cipher].block_length); in omac_init()
66 …if ((err = cipher_descriptor[cipher].ecb_encrypt(omac->Lu[0], omac->Lu[0], &omac->key)) != CRYPT_O… in omac_init()
/external/dropbear/libtomcrypt/src/misc/crypt/
Dcrypt_register_cipher.c32 if (cipher_descriptor[x].name != NULL && cipher_descriptor[x].ID == cipher->ID) { in register_cipher()
40 if (cipher_descriptor[x].name == NULL) { in register_cipher()
41 XMEMCPY(&cipher_descriptor[x], cipher, sizeof(struct ltc_cipher_descriptor)); in register_cipher()
Dcrypt_unregister_cipher.c32 if (XMEMCMP(&cipher_descriptor[x], cipher, sizeof(struct ltc_cipher_descriptor)) == 0) { in unregister_cipher()
33 cipher_descriptor[x].name = NULL; in unregister_cipher()
34 cipher_descriptor[x].ID = 255; in unregister_cipher()
Dcrypt_find_cipher_any.c36 if (cipher_descriptor[x].name == NULL) { in find_cipher_any()
39 …if (blocklen <= (int)cipher_descriptor[x].block_length && keylen <= (int)cipher_descriptor[x].max_… in find_cipher_any()
/external/dropbear/libtomcrypt/src/modes/cfb/
Dcfb_start.c47 cfb->blocklen = cipher_descriptor[cipher].block_length; in cfb_start()
52 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &cfb->key)) != CRYPT_OK) { in cfb_start()
58 return cipher_descriptor[cfb->cipher].ecb_encrypt(cfb->IV, cfb->IV, &cfb->key); in cfb_start()
/external/dropbear/libtomcrypt/src/encauth/ocb/
Docb_init.c62 ocb->block_len = cipher_descriptor[cipher].block_length; in ocb_init()
73 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &ocb->key)) != CRYPT_OK) { in ocb_init()
79 if ((err = cipher_descriptor[cipher].ecb_encrypt(ocb->L, ocb->L, &ocb->key)) != CRYPT_OK) { in ocb_init()
87 if ((err = cipher_descriptor[cipher].ecb_encrypt(ocb->R, ocb->R, &ocb->key)) != CRYPT_OK) { in ocb_init()
Ds_ocb_done.c54 if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length || in s_ocb_done()
87 if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(X, Y, &ocb->key)) != CRYPT_OK) { in s_ocb_done()
118 … if ((err = cipher_descriptor[ocb->cipher].ecb_encrypt(ocb->checksum, X, &ocb->key)) != CRYPT_OK) { in s_ocb_done()
121 cipher_descriptor[ocb->cipher].done(&ocb->key); in s_ocb_done()
Docb_decrypt.c40 LTC_ARGCHK(cipher_descriptor[ocb->cipher].ecb_decrypt != NULL); in ocb_decrypt()
43 if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) { in ocb_decrypt()
54 if ((err = cipher_descriptor[ocb->cipher].ecb_decrypt(tmp, pt, &ocb->key)) != CRYPT_OK) { in ocb_decrypt()
/external/dropbear/libtomcrypt/src/modes/ctr/
Dctr_start.c50 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &ctr->key)) != CRYPT_OK) { in ctr_start()
55 ctr->blocklen = cipher_descriptor[cipher].block_length; in ctr_start()
84 return cipher_descriptor[ctr->cipher].ecb_encrypt(ctr->ctr, ctr->pad, &ctr->key); in ctr_start()
/external/dropbear/libtomcrypt/src/encauth/gcm/
Dgcm_process.c65 … if ((err = cipher_descriptor[gcm->cipher].ecb_encrypt(gcm->Y, gcm->buf, &gcm->K)) != CRYPT_OK) { in gcm_process()
94 … if ((err = cipher_descriptor[gcm->cipher].ecb_encrypt(gcm->Y, gcm->buf, &gcm->K)) != CRYPT_OK) { in gcm_process()
112 … if ((err = cipher_descriptor[gcm->cipher].ecb_encrypt(gcm->Y, gcm->buf, &gcm->K)) != CRYPT_OK) { in gcm_process()
130 … if ((err = cipher_descriptor[gcm->cipher].ecb_encrypt(gcm->Y, gcm->buf, &gcm->K)) != CRYPT_OK) { in gcm_process()
Dgcm_init.c50 if (cipher_descriptor[cipher].block_length != 16) { in gcm_init()
55 if ((err = cipher_descriptor[cipher].setup(key, keylen, 0, &gcm->K)) != CRYPT_OK) { in gcm_init()
61 if ((err = cipher_descriptor[cipher].ecb_encrypt(B, gcm->H, &gcm->K)) != CRYPT_OK) { in gcm_init()
/external/dropbear/libtomcrypt/src/modes/cbc/
Dcbc_decrypt.c61 if (cipher_descriptor[cbc->cipher].accel_cbc_decrypt != NULL) { in cbc_decrypt()
62 …return cipher_descriptor[cbc->cipher].accel_cbc_decrypt(ct, pt, len / cbc->blocklen, cbc->IV, &cbc… in cbc_decrypt()
66 if ((err = cipher_descriptor[cbc->cipher].ecb_decrypt(ct, tmp, &cbc->key)) != CRYPT_OK) { in cbc_decrypt()

123