| /optee_os/core/lib/libtomcrypt/ |
| H A D | ctr.c | 16 int cipher_idx; member 40 if ((int)iv_len != cipher_descriptor[c->cipher_idx]->block_length) in ltc_ctr_init() 48 if (ctr_start(c->cipher_idx, iv, key1, key1_len, 0, in ltc_ctr_init() 83 assert(src->cipher_idx == dst->cipher_idx); in ltc_ctr_copy_state() 99 int cipher_idx = find_cipher("aes"); in crypto_aes_ctr_alloc_ctx() local 101 if (cipher_idx < 0) in crypto_aes_ctr_alloc_ctx() 109 c->cipher_idx = cipher_idx; in crypto_aes_ctr_alloc_ctx()
|
| H A D | cmac.c | 19 int cipher_idx; member 37 if (omac_init(&hc->state, hc->cipher_idx, key, len) == CRYPT_OK) in ltc_omac_init() 74 assert(src->cipher_idx == dst->cipher_idx); in ltc_omac_copy_state() 90 int cipher_idx = find_cipher(cipher); in crypto_common_cmac_alloc_ctx() local 95 if (cipher_idx < 0) in crypto_common_cmac_alloc_ctx() 103 ctx->cipher_idx = cipher_idx; in crypto_common_cmac_alloc_ctx()
|
| H A D | xts.c | 18 int cipher_idx; member 54 if ((int)iv_len != cipher_descriptor[c->cipher_idx]->block_length) in ltc_xts_init() 63 if (xts_start(c->cipher_idx, key1, key2, key1_len, 0, in ltc_xts_init() 99 assert(src->cipher_idx == dst->cipher_idx); in ltc_xts_copy_state() 116 int cipher_idx = find_cipher("aes"); in crypto_aes_xts_alloc_ctx() local 118 if (cipher_idx < 0) in crypto_aes_xts_alloc_ctx() 126 c->cipher_idx = cipher_idx; in crypto_aes_xts_alloc_ctx()
|
| H A D | cbc.c | 18 int cipher_idx; member 45 if ((int)iv_len != cipher_descriptor[c->cipher_idx]->block_length) in ltc_cbc_init() 56 if (cbc_start(c->cipher_idx, iv, k, kl, 0, &c->state) == CRYPT_OK) in ltc_cbc_init() 90 assert(src->cipher_idx == dst->cipher_idx); in ltc_cbc_copy_state() 104 int cipher_idx, bool des3) in ltc_cbc_alloc_ctx() argument 108 if (cipher_idx < 0) in ltc_cbc_alloc_ctx() 116 c->cipher_idx = cipher_idx; in ltc_cbc_alloc_ctx()
|
| H A D | ecb.c | 18 int cipher_idx; member 54 if (ecb_start(c->cipher_idx, k, kl, 0, &c->state) == CRYPT_OK) in ltc_ecb_init() 88 assert(src->cipher_idx == dst->cipher_idx); in ltc_ecb_copy_state() 102 int cipher_idx, bool des3) in ltc_ecb_alloc_ctx() argument 106 if (cipher_idx < 0) in ltc_ecb_alloc_ctx() 114 c->cipher_idx = cipher_idx; in ltc_ecb_alloc_ctx()
|
| /optee_os/core/lib/libtomcrypt/src/hashes/chc/ |
| H A D | chc.c | 16 static int cipher_idx=UNDEFED_HASH, /* which cipher */ variable 69 cipher_idx = cipher; in chc_register() 88 if ((err = cipher_is_valid(cipher_idx)) != CRYPT_OK) { in chc_init() 92 if (cipher_blocksize != cipher_descriptor[cipher_idx]->block_length) { in chc_init() 102 if ((err = cipher_descriptor[cipher_idx]->setup(buf, cipher_blocksize, 0, key)) != CRYPT_OK) { in chc_init() 108 cipher_descriptor[cipher_idx]->ecb_encrypt(buf, md->chc.state, key); in chc_init() 133 …if ((err = cipher_descriptor[cipher_idx]->setup(md->chc.state, cipher_blocksize, 0, key)) != CRYPT… in s_chc_compress() 138 cipher_descriptor[cipher_idx]->ecb_encrypt(buf, T[0], key); in s_chc_compress() 175 if ((err = cipher_is_valid(cipher_idx)) != CRYPT_OK) { in chc_process() 178 if (cipher_blocksize != cipher_descriptor[cipher_idx]->block_length) { in chc_process() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/mac/omac/ |
| H A D | omac_process.c | 27 if ((err = cipher_is_valid(omac->cipher_idx)) != CRYPT_OK) { in omac_process() 38 unsigned long blklen = cipher_descriptor[omac->cipher_idx]->block_length; in omac_process() 47 …if ((err = cipher_descriptor[omac->cipher_idx]->ecb_encrypt(omac->prev, omac->prev, &omac->key)) !… in omac_process() 62 …if ((err = cipher_descriptor[omac->cipher_idx]->ecb_encrypt(omac->block, omac->prev, &omac->key)) … in omac_process()
|
| H A D | omac_done.c | 27 if ((err = cipher_is_valid(omac->cipher_idx)) != CRYPT_OK) { in omac_done() 56 …if ((err = cipher_descriptor[omac->cipher_idx]->ecb_encrypt(omac->block, omac->block, &omac->key))… in omac_done() 59 cipher_descriptor[omac->cipher_idx]->done(&omac->key); in omac_done()
|
| H A D | omac_init.c | 80 omac->cipher_idx = cipher; in omac_init()
|
| /optee_os/core/lib/libtomcrypt/src/mac/pmac/ |
| H A D | pmac_done.c | 18 if ((err = cipher_is_valid(pmac->cipher_idx)) != CRYPT_OK) { in pmac_done() 44 …if ((err = cipher_descriptor[pmac->cipher_idx]->ecb_encrypt(pmac->checksum, pmac->checksum, &pmac-… in pmac_done() 47 cipher_descriptor[pmac->cipher_idx]->done(&pmac->key); in pmac_done()
|
| H A D | pmac_process.c | 28 if ((err = cipher_is_valid(pmac->cipher_idx)) != CRYPT_OK) { in pmac_process() 45 … if ((err = cipher_descriptor[pmac->cipher_idx]->ecb_encrypt(Z, Z, &pmac->key)) != CRYPT_OK) { in pmac_process() 64 … if ((err = cipher_descriptor[pmac->cipher_idx]->ecb_encrypt(Z, Z, &pmac->key)) != CRYPT_OK) { in pmac_process()
|
| H A D | pmac_init.c | 122 pmac->cipher_idx = cipher; in pmac_init()
|
| /optee_os/core/lib/libtomcrypt/src/headers/ |
| H A D | tomcrypt_mac.h | 32 int cipher_idx, member 71 int cipher_idx, /* cipher idx */ member
|