Home
last modified time | relevance | path

Searched refs:IV (Results 1 – 25 of 52) sorted by relevance

123

/optee_os/core/lib/libtomcrypt/src/modes/f8/
A Df8_encrypt.c39 if (f8->blocklen < 0 || f8->blocklen > (int)sizeof(f8->IV) || in f8_encrypt()
40 f8->padlen < 0 || f8->padlen > (int)sizeof(f8->IV)) { in f8_encrypt()
52 f8->IV[x] ^= f8->MIV[x] ^ buf[x]; in f8_encrypt()
54 … if ((err = cipher_descriptor[f8->cipher]->ecb_encrypt(f8->IV, f8->IV, &f8->key)) != CRYPT_OK) { in f8_encrypt()
66 …TYPE_PTR_CAST(&ct[x])) = *(LTC_FAST_TYPE_PTR_CAST(&pt[x])) ^ *(LTC_FAST_TYPE_PTR_CAST(&f8->IV[x])); in f8_encrypt()
67 …*(LTC_FAST_TYPE_PTR_CAST(&f8->IV[x])) ^= *(LTC_FAST_TYPE_PTR_CAST(&f8->MIV[x])) ^ *(LTC_FAST_TYPE_… in f8_encrypt()
69 … if ((err = cipher_descriptor[f8->cipher]->ecb_encrypt(f8->IV, f8->IV, &f8->key)) != CRYPT_OK) { in f8_encrypt()
85 f8->IV[x] ^= f8->MIV[x] ^ buf[x]; in f8_encrypt()
87 … if ((err = cipher_descriptor[f8->cipher]->ecb_encrypt(f8->IV, f8->IV, &f8->key)) != CRYPT_OK) { in f8_encrypt()
92 *ct++ = *pt++ ^ f8->IV[f8->padlen++]; in f8_encrypt()
A Df8_getiv.c26 int f8_getiv(unsigned char *IV, unsigned long *len, const symmetric_F8 *f8) in f8_getiv() argument
28 LTC_ARGCHK(IV != NULL); in f8_getiv()
35 XMEMCPY(IV, f8->IV, f8->blocklen); in f8_getiv()
A Df8_setiv.c26 int f8_setiv(const unsigned char *IV, unsigned long len, symmetric_F8 *f8) in f8_setiv() argument
30 LTC_ARGCHK(IV != NULL); in f8_setiv()
43 return cipher_descriptor[f8->cipher]->ecb_encrypt(IV, f8->IV, &f8->key); in f8_setiv()
/optee_os/core/lib/libtomcrypt/src/modes/lrw/
A Dlrw_setiv.c26 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw) in lrw_setiv() argument
33 LTC_ARGCHK(IV != NULL); in lrw_setiv()
45 XMEMCPY(lrw->IV, IV, 16); in lrw_setiv()
54 XMEMCPY(T, &lrw->PC[0][IV[0]][0], 16); in lrw_setiv()
58 *(LTC_FAST_TYPE_PTR_CAST(T + y)) ^= *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][IV[x]][y])); in lrw_setiv()
62 T[y] ^= lrw->PC[x][IV[x]][y]; in lrw_setiv()
68 gcm_gf_mult(lrw->tweak, IV, lrw->pad); in lrw_setiv()
A Dlrw_process.c50 lrw->IV[x] = (lrw->IV[x] + 1) & 255; in lrw_process()
51 if (lrw->IV[x]) { in lrw_process()
62 …) ^= *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][lrw->IV[x]][y])) ^ *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][… in lrw_process()
66 lrw->pad[y] ^= lrw->PC[x][lrw->IV[x]][y] ^ lrw->PC[x][(lrw->IV[x]-1)&255][y]; in lrw_process()
71 gcm_gf_mult(lrw->tweak, lrw->IV, lrw->pad); in lrw_process()
A Dlrw_getiv.c26 int lrw_getiv(unsigned char *IV, unsigned long *len, const symmetric_LRW *lrw) in lrw_getiv() argument
28 LTC_ARGCHK(IV != NULL); in lrw_getiv()
36 XMEMCPY(IV, lrw->IV, 16); in lrw_getiv()
/optee_os/core/lib/libtomcrypt/src/mac/f9/
A Df9_process.c46 *(LTC_FAST_TYPE_PTR_CAST(&(f9->IV[x]))) ^= *(LTC_FAST_TYPE_PTR_CAST(&(in[x]))); in f9_process()
48 cipher_descriptor[f9->cipher]->ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_process()
50 *(LTC_FAST_TYPE_PTR_CAST(&(f9->ACC[x]))) ^= *(LTC_FAST_TYPE_PTR_CAST(&(f9->IV[x]))); in f9_process()
60 cipher_descriptor[f9->cipher]->ecb_encrypt(f9->IV, f9->IV, &f9->key); in f9_process()
62 f9->ACC[x] ^= f9->IV[x]; in f9_process()
66 f9->IV[f9->buflen++] ^= *in++; in f9_process()
/optee_os/core/lib/libtomcrypt/src/modes/cfb/
A Dcfb_start.c30 int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key, in cfb_start() argument
35 LTC_ARGCHK(IV != NULL); in cfb_start()
48 cfb->IV[x] = IV[x]; in cfb_start()
58 return cipher_descriptor[cfb->cipher]->ecb_encrypt(cfb->IV, cfb->IV, &cfb->key); in cfb_start()
A Dcfb_getiv.c26 int cfb_getiv(unsigned char *IV, unsigned long *len, const symmetric_CFB *cfb) in cfb_getiv() argument
28 LTC_ARGCHK(IV != NULL); in cfb_getiv()
35 XMEMCPY(IV, cfb->IV, cfb->blocklen); in cfb_getiv()
A Dcfb_setiv.c26 int cfb_setiv(const unsigned char *IV, unsigned long len, symmetric_CFB *cfb) in cfb_setiv() argument
30 LTC_ARGCHK(IV != NULL); in cfb_setiv()
43 return cipher_descriptor[cfb->cipher]->ecb_encrypt(IV, cfb->IV, &cfb->key); in cfb_setiv()
/optee_os/core/lib/libtomcrypt/src/modes/cbc/
A Dcbc_encrypt.c41 if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV)) { in cbc_encrypt()
55 …return cipher_descriptor[cbc->cipher]->accel_cbc_encrypt(pt, ct, len / cbc->blocklen, cbc->IV, &cb… in cbc_encrypt()
61 …*(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) ^= *(LTC_FAST_TYPE_PTR_CAST((unsigned char… in cbc_encrypt()
65 cbc->IV[x] ^= pt[x]; in cbc_encrypt()
70 if ((err = cipher_descriptor[cbc->cipher]->ecb_encrypt(cbc->IV, ct, &cbc->key)) != CRYPT_OK) { in cbc_encrypt()
77 …*(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) = *(LTC_FAST_TYPE_PTR_CAST((unsigned char … in cbc_encrypt()
81 cbc->IV[x] = ct[x]; in cbc_encrypt()
A Dcbc_decrypt.c47 …if (cbc->blocklen < 1 || cbc->blocklen > (int)sizeof(cbc->IV) || cbc->blocklen > (int)sizeof(tmp))… in cbc_decrypt()
61 …return cipher_descriptor[cbc->cipher]->accel_cbc_decrypt(ct, pt, len / cbc->blocklen, cbc->IV, &cb… in cbc_decrypt()
72 …tmpy = *(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) ^ *(LTC_FAST_TYPE_PTR_CAST((unsigne… in cbc_decrypt()
73 …*(LTC_FAST_TYPE_PTR_CAST((unsigned char *)cbc->IV + x)) = *(LTC_FAST_TYPE_PTR_CAST((unsigned char … in cbc_decrypt()
78 tmpy = tmp[x] ^ cbc->IV[x]; in cbc_decrypt()
79 cbc->IV[x] = ct[x]; in cbc_decrypt()
A Dcbc_setiv.c27 int cbc_setiv(const unsigned char *IV, unsigned long len, symmetric_CBC *cbc) in cbc_setiv() argument
29 LTC_ARGCHK(IV != NULL); in cbc_setiv()
34 XMEMCPY(cbc->IV, IV, len); in cbc_setiv()
A Dcbc_getiv.c26 int cbc_getiv(unsigned char *IV, unsigned long *len, const symmetric_CBC *cbc) in cbc_getiv() argument
28 LTC_ARGCHK(IV != NULL); in cbc_getiv()
35 XMEMCPY(IV, cbc->IV, cbc->blocklen); in cbc_getiv()
A Dcbc_start.c29 int cbc_start(int cipher, const unsigned char *IV, const unsigned char *key, in cbc_start() argument
34 LTC_ARGCHK(IV != NULL); in cbc_start()
52 cbc->IV[x] = IV[x]; in cbc_start()
/optee_os/core/lib/libtomcrypt/src/mac/xcbc/
A Dxcbc_process.c49 *(LTC_FAST_TYPE_PTR_CAST(&(xcbc->IV[x]))) ^= *(LTC_FAST_TYPE_PTR_CAST(&(in[x]))); in xcbc_process()
51 cipher_descriptor[xcbc->cipher]->ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); in xcbc_process()
60 cipher_descriptor[xcbc->cipher]->ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); in xcbc_process()
63 xcbc->IV[xcbc->buflen++] ^= *in++; in xcbc_process()
A Dxcbc_done.c45 xcbc->IV[x] ^= xcbc->K[1][x]; in xcbc_done()
48 xcbc->IV[xcbc->buflen] ^= 0x80; in xcbc_done()
51 xcbc->IV[x] ^= xcbc->K[2][x]; in xcbc_done()
56 cipher_descriptor[xcbc->cipher]->ecb_encrypt(xcbc->IV, xcbc->IV, &xcbc->key); in xcbc_done()
61 out[x] = xcbc->IV[x]; in xcbc_done()
/optee_os/core/lib/libtomcrypt/src/modes/ofb/
A Dofb_encrypt.c38 if (ofb->blocklen < 0 || ofb->blocklen > (int)sizeof(ofb->IV) || in ofb_encrypt()
39 ofb->padlen < 0 || ofb->padlen > (int)sizeof(ofb->IV)) { in ofb_encrypt()
45 …if ((err = cipher_descriptor[ofb->cipher]->ecb_encrypt(ofb->IV, ofb->IV, &ofb->key)) != CRYPT_OK) { in ofb_encrypt()
50 *ct++ = *pt++ ^ ofb->IV[(ofb->padlen)++]; in ofb_encrypt()
A Dofb_getiv.c26 int ofb_getiv(unsigned char *IV, unsigned long *len, const symmetric_OFB *ofb) in ofb_getiv() argument
28 LTC_ARGCHK(IV != NULL); in ofb_getiv()
35 XMEMCPY(IV, ofb->IV, ofb->blocklen); in ofb_getiv()
A Dofb_setiv.c26 int ofb_setiv(const unsigned char *IV, unsigned long len, symmetric_OFB *ofb) in ofb_setiv() argument
30 LTC_ARGCHK(IV != NULL); in ofb_setiv()
43 return cipher_descriptor[ofb->cipher]->ecb_encrypt(IV, ofb->IV, &ofb->key); in ofb_setiv()
A Dofb_start.c30 int ofb_start(int cipher, const unsigned char *IV, const unsigned char *key, in ofb_start() argument
35 LTC_ARGCHK(IV != NULL); in ofb_start()
47 ofb->IV[x] = IV[x]; in ofb_start()
/optee_os/core/lib/libtomcrypt/
A Daes_accel.c137 unsigned long blocks, unsigned char *IV, in aes_cbc_encrypt_nblocks() argument
142 LTC_ARGCHK(IV); in aes_cbc_encrypt_nblocks()
146 blocks, IV); in aes_cbc_encrypt_nblocks()
152 unsigned long blocks, unsigned char *IV, in aes_cbc_decrypt_nblocks() argument
157 LTC_ARGCHK(IV); in aes_cbc_decrypt_nblocks()
161 blocks, IV); in aes_cbc_decrypt_nblocks()
167 unsigned long blocks, unsigned char *IV, in aes_ctr_encrypt_nblocks() argument
172 LTC_ARGCHK(IV); in aes_ctr_encrypt_nblocks()
181 skey->rijndael.Nr, blocks, IV); in aes_ctr_encrypt_nblocks()
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/
A Dgcm_add_iv.c27 const unsigned char *IV, unsigned long IVlen) in gcm_add_iv() argument
34 LTC_ARGCHK(IV != NULL); in gcm_add_iv()
61 *(LTC_FAST_TYPE_PTR_CAST(&gcm->X[y])) ^= *(LTC_FAST_TYPE_PTR_CAST(&IV[x + y])); in gcm_add_iv()
66 IV += x; in gcm_add_iv()
72 gcm->buf[gcm->buflen++] = *IV++; in gcm_add_iv()
/optee_os/core/lib/libtomcrypt/src/modes/ctr/
A Dctr_setiv.c26 int ctr_setiv(const unsigned char *IV, unsigned long len, symmetric_CTR *ctr) in ctr_setiv() argument
30 LTC_ARGCHK(IV != NULL); in ctr_setiv()
43 XMEMCPY(ctr->ctr, IV, len); in ctr_setiv()
47 return cipher_descriptor[ctr->cipher]->ecb_encrypt(IV, ctr->pad, &ctr->key); in ctr_setiv()
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_cipher.h265 unsigned char IV[MAXBLOCKSIZE], member
283 unsigned char IV[MAXBLOCKSIZE]; member
297 unsigned char IV[MAXBLOCKSIZE]; member
335 unsigned char IV[16], member
363 unsigned char IV[MAXBLOCKSIZE], member
540 const unsigned char *IV, unsigned long IVlen,
872 int cfb_start(int cipher, const unsigned char *IV, const unsigned char *key,
908 const unsigned char *IV,
926 const unsigned char *IV,
943 int f8_start( int cipher, const unsigned char *IV,
[all …]

Completed in 17 milliseconds

123