/external/dropbear/libtomcrypt/src/modes/lrw/ |
D | lrw_process.c | 29 …rocess(const unsigned char *pt, unsigned char *ct, unsigned long len, int mode, symmetric_LRW *lrw) in lrw_process() argument 39 LTC_ARGCHK(lrw != NULL); in lrw_process() 47 XMEMCPY(prod, lrw->pad, 16); in lrw_process() 51 lrw->IV[x] = (lrw->IV[x] + 1) & 255; in lrw_process() 52 if (lrw->IV[x]) { in lrw_process() 63 …*((LTC_FAST_TYPE *)(lrw->pad + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][lrw->IV[x]][y])) ^ *((LTC_FA… in lrw_process() 67 lrw->pad[y] ^= lrw->PC[x][lrw->IV[x]][y] ^ lrw->PC[x][(lrw->IV[x]-1)&255][y]; in lrw_process() 72 gcm_gf_mult(lrw->tweak, lrw->IV, lrw->pad); in lrw_process() 88 if ((err = cipher_descriptor[lrw->cipher].ecb_encrypt(ct, ct, &lrw->key)) != CRYPT_OK) { in lrw_process() 92 if ((err = cipher_descriptor[lrw->cipher].ecb_decrypt(ct, ct, &lrw->key)) != CRYPT_OK) { in lrw_process()
|
D | lrw_test.c | 73 symmetric_LRW lrw; in lrw_test() 86 … if ((err = lrw_start(idx, tests[x].IV, tests[x].key, 16, tests[x].tweak, 0, &lrw)) != CRYPT_OK) { in lrw_test() 91 if (XMEMCMP(tests[x].expected_tweak, lrw.pad, 16)) { in lrw_test() 92 lrw_done(&lrw); in lrw_test() 97 if ((err = lrw_encrypt(tests[x].P, buf[0], 16, &lrw)) != CRYPT_OK) { in lrw_test() 98 lrw_done(&lrw); in lrw_test() 103 lrw_done(&lrw); in lrw_test() 108 if ((err = lrw_setiv(tests[x].IV, 16, &lrw)) != CRYPT_OK) { in lrw_test() 109 lrw_done(&lrw); in lrw_test() 113 if ((err = lrw_decrypt(buf[0], buf[1], 16, &lrw)) != CRYPT_OK) { in lrw_test() [all …]
|
D | lrw_setiv.c | 27 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw) in lrw_setiv() argument 35 LTC_ARGCHK(lrw != NULL); in lrw_setiv() 41 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) { in lrw_setiv() 46 XMEMCPY(lrw->IV, IV, 16); in lrw_setiv() 49 …if (cipher_descriptor[lrw->cipher].accel_lrw_encrypt != NULL && cipher_descriptor[lrw->cipher].acc… in lrw_setiv() 55 XMEMCPY(T, &lrw->PC[0][IV[0]][0], 16); in lrw_setiv() 59 *((LTC_FAST_TYPE *)(T + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][IV[x]][y])); in lrw_setiv() 63 T[y] ^= lrw->PC[x][IV[x]][y]; in lrw_setiv() 67 XMEMCPY(lrw->pad, T, 16); in lrw_setiv() 69 gcm_gf_mult(lrw->tweak, IV, lrw->pad); in lrw_setiv()
|
D | lrw_start.c | 36 symmetric_LRW *lrw) in lrw_start() argument 47 LTC_ARGCHK(lrw != NULL); in lrw_start() 64 if ((err = cipher_descriptor[cipher].setup(key, keylen, num_rounds, &lrw->key)) != CRYPT_OK) { in lrw_start() 67 lrw->cipher = cipher; in lrw_start() 70 XMEMCPY(lrw->tweak, tweak, 16); in lrw_start() 78 gcm_gf_mult(tweak, B, &lrw->PC[0][y][0]); in lrw_start() 85 t = lrw->PC[x-1][y][15]; in lrw_start() 87 lrw->PC[x][y][z] = lrw->PC[x-1][y][z-1]; in lrw_start() 89 lrw->PC[x][y][0] = gcm_shift_table[t<<1]; in lrw_start() 90 lrw->PC[x][y][1] ^= gcm_shift_table[(t<<1)+1]; in lrw_start() [all …]
|
D | lrw_decrypt.c | 27 int lrw_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_LRW *lrw) in lrw_decrypt() argument 33 LTC_ARGCHK(lrw != NULL); in lrw_decrypt() 35 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) { in lrw_decrypt() 39 if (cipher_descriptor[lrw->cipher].accel_lrw_decrypt != NULL) { in lrw_decrypt() 40 …return cipher_descriptor[lrw->cipher].accel_lrw_decrypt(ct, pt, len, lrw->IV, lrw->tweak, &lrw->ke… in lrw_decrypt() 43 return lrw_process(ct, pt, len, LRW_DECRYPT, lrw); in lrw_decrypt()
|
D | lrw_encrypt.c | 27 int lrw_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_LRW *lrw) in lrw_encrypt() argument 33 LTC_ARGCHK(lrw != NULL); in lrw_encrypt() 35 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) { in lrw_encrypt() 39 if (cipher_descriptor[lrw->cipher].accel_lrw_encrypt != NULL) { in lrw_encrypt() 40 …return cipher_descriptor[lrw->cipher].accel_lrw_encrypt(pt, ct, len, lrw->IV, lrw->tweak, &lrw->ke… in lrw_encrypt() 43 return lrw_process(pt, ct, len, LRW_ENCRYPT, lrw); in lrw_encrypt()
|
D | lrw_done.c | 25 int lrw_done(symmetric_LRW *lrw) in lrw_done() argument 29 LTC_ARGCHK(lrw != NULL); in lrw_done() 31 if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) { in lrw_done() 34 cipher_descriptor[lrw->cipher].done(&lrw->key); in lrw_done()
|
D | lrw_getiv.c | 27 int lrw_getiv(unsigned char *IV, unsigned long *len, symmetric_LRW *lrw) in lrw_getiv() argument 31 LTC_ARGCHK(lrw != NULL); in lrw_getiv() 37 XMEMCPY(IV, lrw->IV, 16); in lrw_getiv()
|
/external/dropbear/libtomcrypt/ |
D | Android.mk | 65 src/modes/lrw/lrw_decrypt.c src/modes/lrw/lrw_done.c src/modes/lrw/lrw_encrypt.c \ 66 src/modes/lrw/lrw_getiv.c src/modes/lrw/lrw_process.c src/modes/lrw/lrw_setiv.c \ 67 src/modes/lrw/lrw_start.c src/modes/lrw/lrw_test.c src/modes/ofb/ofb_decrypt.c src/modes/ofb/ofb_do…
|
D | Makefile.in | 156 src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o src/modes/lrw/lrw_encrypt.o \ 157 src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o src/modes/lrw/lrw_setiv.o \ 158 src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_do…
|
D | makefile.msvc | 63 src/modes/lrw/lrw_decrypt.obj src/modes/lrw/lrw_done.obj src/modes/lrw/lrw_encrypt.obj \ 64 src/modes/lrw/lrw_getiv.obj src/modes/lrw/lrw_process.obj src/modes/lrw/lrw_setiv.obj \ 65 src/modes/lrw/lrw_start.obj src/modes/lrw/lrw_test.obj src/modes/ofb/ofb_decrypt.obj src/modes/ofb/…
|
D | makefile.icc | 153 src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o src/modes/lrw/lrw_encrypt.o \ 154 src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o src/modes/lrw/lrw_setiv.o \ 155 src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_do…
|
D | makefile.unix | 99 src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o src/modes/lrw/lrw_encrypt.o \ 100 src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o src/modes/lrw/lrw_setiv.o \ 101 src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_do…
|
D | makefile.shared | 158 src/modes/lrw/lrw_decrypt.o src/modes/lrw/lrw_done.o src/modes/lrw/lrw_encrypt.o \ 159 src/modes/lrw/lrw_getiv.o src/modes/lrw/lrw_process.o src/modes/lrw/lrw_setiv.o \ 160 src/modes/lrw/lrw_start.o src/modes/lrw/lrw_test.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_do…
|
D | crypt.tex | 1041 \index{lrw\_start()} 1049 symmetric_LRW *lrw); 1058 \index{lrw\_encrypt()} \index{lrw\_decrypt()} 1063 symmetric_LRW *lrw); 1068 symmetric_LRW *lrw); 1076 \index{lrw\_getiv()} \index{lrw\_setiv()} 1080 symmetric_LRW *lrw); 1084 symmetric_LRW *lrw); 1091 \index{lrw\_done()} 1093 int lrw_done(symmetric_LRW *lrw); [all …]
|
D | changes | 140 v1.10 -- Free ecb/cbc/ctr/lrw structures in timing code by calling the "done" function
|
/external/dropbear/libtomcrypt/src/headers/ |
D | tomcrypt_cipher.h | 802 symmetric_LRW *lrw); 803 int lrw_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_LRW *lrw); 804 int lrw_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_LRW *lrw); 805 int lrw_getiv(unsigned char *IV, unsigned long *len, symmetric_LRW *lrw); 806 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw); 807 int lrw_done(symmetric_LRW *lrw); 811 …ocess(const unsigned char *pt, unsigned char *ct, unsigned long len, int mode, symmetric_LRW *lrw);
|
/external/dropbear/libtomcrypt/demos/ |
D | tv_gen.c | 705 symmetric_LRW lrw; in lrw_gen() local 714 if ((err = lrw_start(find_cipher("aes"), iv, key, 16, tweak, 0, &lrw)) != CRYPT_OK) { in lrw_gen() 724 if ((err = lrw_encrypt(buf, buf, x, &lrw)) != CRYPT_OK) { in lrw_gen() 737 if ((err = lrw_setiv(iv, 16, &lrw)) != CRYPT_OK) { in lrw_gen() 749 if ((err = lrw_decrypt(buf, buf, x, &lrw)) != CRYPT_OK) { in lrw_gen() 760 lrw_done(&lrw); in lrw_gen()
|
/external/dropbear/libtomcrypt/testprof/ |
D | x86_prof.c | 517 symmetric_LRW lrw; in time_cipher4() local 525 lrw_start(x, pt, key, cipher_descriptor[x].min_key_length, key, 0, &lrw); in time_cipher4() 533 #define DO1 lrw_encrypt(pt, pt, sizeof(pt), &lrw); in time_cipher4() 552 #define DO1 lrw_decrypt(pt, pt, sizeof(pt), &lrw); in time_cipher4() 569 lrw_done(&lrw); in time_cipher4()
|