Home
last modified time | relevance | path

Searched refs:cbc (Results 1 – 25 of 43) sorted by relevance

12

/external/dropbear/libtomcrypt/src/modes/cbc/
Dcbc_encrypt.c29 int cbc_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_CBC *cbc) in cbc_encrypt() argument
35 LTC_ARGCHK(cbc != NULL); in cbc_encrypt()
37 if ((err = cipher_is_valid(cbc->cipher)) != CRYPT_OK) { in cbc_encrypt()
42 if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV)) { in cbc_encrypt()
46 if (len % cbc->blocklen) { in cbc_encrypt()
50 if (cbc->blocklen % sizeof(LTC_FAST_TYPE)) { in cbc_encrypt()
55 if (cipher_descriptor[cbc->cipher].accel_cbc_encrypt != NULL) { in cbc_encrypt()
56 …return cipher_descriptor[cbc->cipher].accel_cbc_encrypt(pt, ct, len / cbc->blocklen, cbc->IV, &cbc in cbc_encrypt()
61 for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { in cbc_encrypt()
62 … *((LTC_FAST_TYPE*)((unsigned char *)cbc->IV + x)) ^= *((LTC_FAST_TYPE*)((unsigned char *)pt + x)); in cbc_encrypt()
[all …]
Dcbc_decrypt.c29 int cbc_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CBC *cbc) in cbc_decrypt() argument
41 LTC_ARGCHK(cbc != NULL); in cbc_decrypt()
43 if ((err = cipher_is_valid(cbc->cipher)) != CRYPT_OK) { in cbc_decrypt()
48 if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV)) { in cbc_decrypt()
52 if (len % cbc->blocklen) { in cbc_decrypt()
56 if (cbc->blocklen % sizeof(LTC_FAST_TYPE)) { in cbc_decrypt()
61 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()
72 for (x = 0; x < cbc->blocklen; x += sizeof(LTC_FAST_TYPE)) { in cbc_decrypt()
[all …]
Dcbc_getiv.c27 int cbc_getiv(unsigned char *IV, unsigned long *len, symmetric_CBC *cbc) in cbc_getiv() argument
31 LTC_ARGCHK(cbc != NULL); in cbc_getiv()
32 if ((unsigned long)cbc->blocklen > *len) { in cbc_getiv()
33 *len = cbc->blocklen; in cbc_getiv()
36 XMEMCPY(IV, cbc->IV, cbc->blocklen); in cbc_getiv()
37 *len = cbc->blocklen; in cbc_getiv()
Dcbc_start.c31 int keylen, int num_rounds, symmetric_CBC *cbc) in cbc_start() argument
37 LTC_ARGCHK(cbc != NULL); in cbc_start()
45 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &cbc->key)) != CRYPT_OK) { in cbc_start()
50 cbc->blocklen = cipher_descriptor[cipher].block_length; in cbc_start()
51 cbc->cipher = cipher; in cbc_start()
52 for (x = 0; x < cbc->blocklen; x++) { in cbc_start()
53 cbc->IV[x] = IV[x]; in cbc_start()
Dcbc_done.c24 int cbc_done(symmetric_CBC *cbc) in cbc_done() argument
27 LTC_ARGCHK(cbc != NULL); in cbc_done()
29 if ((err = cipher_is_valid(cbc->cipher)) != CRYPT_OK) { in cbc_done()
32 cipher_descriptor[cbc->cipher].done(&cbc->key); in cbc_done()
Dcbc_setiv.c28 int cbc_setiv(const unsigned char *IV, unsigned long len, symmetric_CBC *cbc) in cbc_setiv() argument
31 LTC_ARGCHK(cbc != NULL); in cbc_setiv()
32 if (len != (unsigned long)cbc->blocklen) { in cbc_setiv()
35 XMEMCPY(cbc->IV, IV, len); in cbc_setiv()
/external/wpa_supplicant/
Daes_wrap.c184 u8 cbc[BLOCK_SIZE], pad[BLOCK_SIZE]; in omac1_aes_128_vector() local
191 os_memset(cbc, 0, BLOCK_SIZE); in omac1_aes_128_vector()
204 cbc[i] ^= *pos++; in omac1_aes_128_vector()
212 aes_encrypt(ctx, cbc, cbc); in omac1_aes_128_vector()
222 cbc[i] ^= *pos++; in omac1_aes_128_vector()
229 cbc[left] ^= 0x80; in omac1_aes_128_vector()
234 pad[i] ^= cbc[i]; in omac1_aes_128_vector()
460 u8 cbc[BLOCK_SIZE]; in aes_128_cbc_encrypt() local
467 os_memcpy(cbc, iv, BLOCK_SIZE); in aes_128_cbc_encrypt()
472 cbc[j] ^= pos[j]; in aes_128_cbc_encrypt()
[all …]
Dcrypto_internal.c239 u8 cbc[32]; member
246 u8 cbc[8]; member
274 if (key_len > sizeof(ctx->u.aes.cbc)) { in crypto_cipher_init()
290 os_memcpy(ctx->u.aes.cbc, iv, ctx->u.aes.block_size); in crypto_cipher_init()
298 os_memcpy(ctx->u.des3.cbc, iv, 8); in crypto_cipher_init()
328 ctx->u.aes.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
329 aes_encrypt(ctx->u.aes.ctx_enc, ctx->u.aes.cbc, in crypto_cipher_encrypt()
330 ctx->u.aes.cbc); in crypto_cipher_encrypt()
331 os_memcpy(crypt, ctx->u.aes.cbc, in crypto_cipher_encrypt()
343 ctx->u.des3.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
[all …]
Dcrypto_libtomcrypt.c294 symmetric_CBC cbc; member
345 res = cbc_start(idx, iv, key, key_len, 0, &ctx->u.cbc); in crypto_cipher_init()
371 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt()
395 res = cbc_decrypt(crypt, plain, len, &ctx->u.cbc); in crypto_cipher_decrypt()
409 cbc_done(&ctx->u.cbc); in crypto_cipher_deinit()
/external/wpa_supplicant_6/wpa_supplicant/src/crypto/
Daes_wrap.c187 u8 cbc[BLOCK_SIZE], pad[BLOCK_SIZE]; in omac1_aes_128_vector() local
194 os_memset(cbc, 0, BLOCK_SIZE); in omac1_aes_128_vector()
207 cbc[i] ^= *pos++; in omac1_aes_128_vector()
215 aes_encrypt(ctx, cbc, cbc); in omac1_aes_128_vector()
225 cbc[i] ^= *pos++; in omac1_aes_128_vector()
232 cbc[left] ^= 0x80; in omac1_aes_128_vector()
237 pad[i] ^= cbc[i]; in omac1_aes_128_vector()
478 u8 cbc[BLOCK_SIZE]; in aes_128_cbc_encrypt() local
485 os_memcpy(cbc, iv, BLOCK_SIZE); in aes_128_cbc_encrypt()
490 cbc[j] ^= pos[j]; in aes_128_cbc_encrypt()
[all …]
Dcrypto_internal.c240 u8 cbc[32]; member
247 u8 cbc[8]; member
275 if (key_len > sizeof(ctx->u.aes.cbc)) { in crypto_cipher_init()
291 os_memcpy(ctx->u.aes.cbc, iv, ctx->u.aes.block_size); in crypto_cipher_init()
299 os_memcpy(ctx->u.des3.cbc, iv, 8); in crypto_cipher_init()
329 ctx->u.aes.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
330 aes_encrypt(ctx->u.aes.ctx_enc, ctx->u.aes.cbc, in crypto_cipher_encrypt()
331 ctx->u.aes.cbc); in crypto_cipher_encrypt()
332 os_memcpy(crypt, ctx->u.aes.cbc, in crypto_cipher_encrypt()
344 ctx->u.des3.cbc[j] ^= plain[j]; in crypto_cipher_encrypt()
[all …]
Dcrypto_libtomcrypt.c294 symmetric_CBC cbc; member
345 res = cbc_start(idx, iv, key, key_len, 0, &ctx->u.cbc); in crypto_cipher_init()
371 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc); in crypto_cipher_encrypt()
395 res = cbc_decrypt(crypt, plain, len, &ctx->u.cbc); in crypto_cipher_decrypt()
409 cbc_done(&ctx->u.cbc); in crypto_cipher_deinit()
/external/dropbear/libtomcrypt/testprof/
Dmodes_test.c9 symmetric_CBC cbc; in modes_test() local
42 DO(cbc_start(cipher_idx, iv, key, 16, 0, &cbc)); in modes_test()
44 DO(cbc_getiv(iv2, &l, &cbc)); in modes_test()
49 DO(cbc_encrypt(pt, ct, 64, &cbc)); in modes_test()
52 DO(cbc_setiv(iv2, l, &cbc)); in modes_test()
54 DO(cbc_decrypt(ct, tmp, 64, &cbc)); in modes_test()
/external/tcpdump/tests/
Desp-secrets.txt3 0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840
4 0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043
5 0xd1234567@192.1.2.45 aes256-cbc-hmac96:0xaaaabbbbccccdddd4043434545464649494a4a4c4c4f4f51515252545…
Desp2.gdbinit1 …-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabc…
Desp3.gdbinit1 set args -t -n -E "3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840" -r 08-sunris…
Desp1.gdbinit1 set args -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f5151525254…
/external/openssl/crypto/perlasm/
Dreadme102 There is also a cbc mode function generator in cbc.pl
104 &cbc( $name,
120 &cbc("BF_cbc_encrypt","BF_encrypt","BF_encrypt",1,4,5,3,-1,-1);
122 &cbc("des_ncbc_encrypt","des_encrypt","des_encrypt",0,4,5,3,5,-1);
123 &cbc("des_ede3_cbc_encrypt","des_encrypt3","des_decrypt3",0,6,7,3,4,5);
/external/dropbear/libtomcrypt/
DAndroid.mk56 src/modes/cbc/cbc_decrypt.c src/modes/cbc/cbc_done.c src/modes/cbc/cbc_encrypt.c \
57 src/modes/cbc/cbc_getiv.c src/modes/cbc/cbc_setiv.c src/modes/cbc/cbc_start.c \
DMakefile.in147 src/modes/cbc/cbc_decrypt.o src/modes/cbc/cbc_done.o src/modes/cbc/cbc_encrypt.o \
148 src/modes/cbc/cbc_getiv.o src/modes/cbc/cbc_setiv.o src/modes/cbc/cbc_start.o \
Dmakefile.msvc54 src/modes/cbc/cbc_decrypt.obj src/modes/cbc/cbc_done.obj src/modes/cbc/cbc_encrypt.obj \
55 src/modes/cbc/cbc_getiv.obj src/modes/cbc/cbc_setiv.obj src/modes/cbc/cbc_start.obj \
/external/openssl/include/openssl/
Dmodes.h53 unsigned char ivec[16], cbc128_f cbc);
59 unsigned char ivec[16], cbc128_f cbc);
/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_cipher.h765 int keylen, int num_rounds, symmetric_CBC *cbc);
766 int cbc_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_CBC *cbc);
767 int cbc_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CBC *cbc);
768 int cbc_getiv(unsigned char *IV, unsigned long *len, symmetric_CBC *cbc);
769 int cbc_setiv(const unsigned char *IV, unsigned long len, symmetric_CBC *cbc);
770 int cbc_done(symmetric_CBC *cbc);
/external/openssl/crypto/objects/
Dobjects.txt145 ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc
367 rsadsi 3 2 : RC2-CBC : rc2-cbc
373 : RC2-40-CBC : rc2-40-cbc
374 : RC2-64-CBC : rc2-64-cbc
377 rsadsi 3 7 : DES-EDE3-CBC : des-ede3-cbc
378 rsadsi 3 8 : RC5-CBC : rc5-cbc
402 1 3 6 1 4 1 188 7 1 1 2 : IDEA-CBC : idea-cbc
409 1 3 6 1 4 1 3029 1 2 : BF-CBC : bf-cbc
622 algorithm 7 : DES-CBC : des-cbc
636 : DES-EDE-CBC : des-ede-cbc
[all …]
/external/openssl/crypto/des/
DREADME19 It supports ecb, cbc, ofb, cfb, triple ecb, triple cbc, triple ofb,

12