Searched refs:ofb (Results 1 – 7 of 7) sorted by relevance
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/ofb/ |
A D | ofb_encrypt.c | 20 int ofb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_OFB *ofb) in ofb_encrypt() argument 25 LTC_ARGCHK(ofb != NULL); in ofb_encrypt() 26 if ((err = cipher_is_valid(ofb->cipher)) != CRYPT_OK) { in ofb_encrypt() 31 if (ofb->blocklen < 0 || ofb->blocklen > (int)sizeof(ofb->IV) || in ofb_encrypt() 32 ofb->padlen < 0 || ofb->padlen > (int)sizeof(ofb->IV)) { in ofb_encrypt() 37 if (ofb->padlen == ofb->blocklen) { in ofb_encrypt() 38 …if ((err = cipher_descriptor[ofb->cipher]->ecb_encrypt(ofb->IV, ofb->IV, &ofb->key)) != CRYPT_OK) { in ofb_encrypt() 41 ofb->padlen = 0; in ofb_encrypt() 43 *ct++ = *pt++ ^ ofb->IV[(ofb->padlen)++]; in ofb_encrypt()
|
A D | ofb_setiv.c | 19 int ofb_setiv(const unsigned char *IV, unsigned long len, symmetric_OFB *ofb) in ofb_setiv() argument 24 LTC_ARGCHK(ofb != NULL); in ofb_setiv() 26 if ((err = cipher_is_valid(ofb->cipher)) != CRYPT_OK) { in ofb_setiv() 30 if (len != (unsigned long)ofb->blocklen) { in ofb_setiv() 35 ofb->padlen = 0; in ofb_setiv() 36 return cipher_descriptor[ofb->cipher]->ecb_encrypt(IV, ofb->IV, &ofb->key); in ofb_setiv()
|
A D | ofb_start.c | 24 int keylen, int num_rounds, symmetric_OFB *ofb) in ofb_start() argument 30 LTC_ARGCHK(ofb != NULL); in ofb_start() 37 ofb->cipher = cipher; in ofb_start() 38 ofb->blocklen = cipher_descriptor[cipher]->block_length; in ofb_start() 39 for (x = 0; x < ofb->blocklen; x++) { in ofb_start() 40 ofb->IV[x] = IV[x]; in ofb_start() 44 ofb->padlen = ofb->blocklen; in ofb_start() 45 return cipher_descriptor[cipher]->setup(key, keylen, num_rounds, &ofb->key); in ofb_start()
|
A D | ofb_getiv.c | 19 int ofb_getiv(unsigned char *IV, unsigned long *len, const symmetric_OFB *ofb) in ofb_getiv() argument 23 LTC_ARGCHK(ofb != NULL); in ofb_getiv() 24 if ((unsigned long)ofb->blocklen > *len) { in ofb_getiv() 25 *len = ofb->blocklen; in ofb_getiv() 28 XMEMCPY(IV, ofb->IV, ofb->blocklen); in ofb_getiv() 29 *len = ofb->blocklen; in ofb_getiv()
|
A D | ofb_done.c | 16 int ofb_done(symmetric_OFB *ofb) in ofb_done() argument 19 LTC_ARGCHK(ofb != NULL); in ofb_done() 21 if ((err = cipher_is_valid(ofb->cipher)) != CRYPT_OK) { in ofb_done() 24 cipher_descriptor[ofb->cipher]->done(&ofb->key); in ofb_done()
|
A D | ofb_decrypt.c | 20 int ofb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_OFB *ofb) in ofb_decrypt() argument 24 LTC_ARGCHK(ofb != NULL); in ofb_decrypt() 25 return ofb_encrypt(ct, pt, len, ofb); in ofb_decrypt()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_cipher.h | 895 int keylen, int num_rounds, symmetric_OFB *ofb); 896 int ofb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, symmetric_OFB *ofb); 897 int ofb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_OFB *ofb); 898 int ofb_getiv(unsigned char *IV, unsigned long *len, const symmetric_OFB *ofb); 899 int ofb_setiv(const unsigned char *IV, unsigned long len, symmetric_OFB *ofb); 900 int ofb_done(symmetric_OFB *ofb);
|
Completed in 12 milliseconds