/optee_os/core/lib/libtomcrypt/src/modes/ctr/ |
A D | ctr_encrypt.c | 26 ctr->ctr[x] = (ctr->ctr[x] + 1) & 0xff; in ctr_increment_counter() 27 if (ctr->ctr[x]) in ctr_increment_counter() 32 ctr->ctr[x] = (ctr->ctr[x] + 1) & 0xff; in ctr_increment_counter() 33 if (ctr->ctr[x]) { in ctr_increment_counter() 54 if (ctr->padlen == ctr->blocklen) { in _ctr_encrypt() 56 …if ((err = cipher_descriptor[ctr->cipher]->ecb_encrypt(ctr->ctr, ctr->pad, &ctr->key)) != CRYPT_OK… in _ctr_encrypt() 70 ctr->padlen = ctr->blocklen; in _ctr_encrypt() 107 if ((ctr->blocklen < 1) || (ctr->blocklen > (int)sizeof(ctr->ctr)) || in ctr_encrypt() 120 … if ((ctr->padlen == 0 || ctr->padlen == ctr->blocklen) && len >= (unsigned long)ctr->blocklen) { in ctr_encrypt() 121 …if ((err = cipher_descriptor[ctr->cipher]->accel_ctr_encrypt(pt, ct, len/ctr->blocklen, ctr->ctr, … in ctr_encrypt() [all …]
|
A D | ctr_start.c | 41 LTC_ARGCHK(ctr != NULL); in ctr_start() 55 ctr->ctrlen = cipher_descriptor[cipher]->block_length - ctr->ctrlen; in ctr_start() 65 ctr->cipher = cipher; in ctr_start() 66 ctr->padlen = 0; in ctr_start() 69 ctr->ctr[x] = IV[x]; in ctr_start() 77 ctr->ctr[x] = (ctr->ctr[x] + (unsigned char)1) & (unsigned char)255; in ctr_start() 78 if (ctr->ctr[x] != (unsigned char)0) { in ctr_start() 84 for (x = ctr->blocklen-1; x >= ctr->ctrlen; x--) { in ctr_start() 85 ctr->ctr[x] = (ctr->ctr[x] + (unsigned char)1) & (unsigned char)255; in ctr_start() 86 if (ctr->ctr[x] != (unsigned char)0) { in ctr_start() [all …]
|
A D | ctr_setiv.c | 26 int ctr_setiv(const unsigned char *IV, unsigned long len, symmetric_CTR *ctr) in ctr_setiv() argument 31 LTC_ARGCHK(ctr != NULL); in ctr_setiv() 34 if ((err = cipher_is_valid(ctr->cipher)) != CRYPT_OK) { in ctr_setiv() 38 if (len != (unsigned long)ctr->blocklen) { in ctr_setiv() 43 XMEMCPY(ctr->ctr, IV, len); in ctr_setiv() 46 ctr->padlen = 0; in ctr_setiv() 47 return cipher_descriptor[ctr->cipher]->ecb_encrypt(IV, ctr->pad, &ctr->key); in ctr_setiv()
|
A D | ctr_getiv.c | 26 int ctr_getiv(unsigned char *IV, unsigned long *len, const symmetric_CTR *ctr) in ctr_getiv() argument 30 LTC_ARGCHK(ctr != NULL); in ctr_getiv() 31 if ((unsigned long)ctr->blocklen > *len) { in ctr_getiv() 32 *len = ctr->blocklen; in ctr_getiv() 35 XMEMCPY(IV, ctr->ctr, ctr->blocklen); in ctr_getiv() 36 *len = ctr->blocklen; in ctr_getiv()
|
A D | ctr_done.c | 23 int ctr_done(symmetric_CTR *ctr) in ctr_done() argument 26 LTC_ARGCHK(ctr != NULL); in ctr_done() 28 if ((err = cipher_is_valid(ctr->cipher)) != CRYPT_OK) { in ctr_done() 31 cipher_descriptor[ctr->cipher]->done(&ctr->key); in ctr_done()
|
A D | ctr_test.c | 52 symmetric_CTR ctr; in ctr_test() 62 …IV, tests[x].key, tests[x].keylen, 0, CTR_COUNTER_BIG_ENDIAN|LTC_CTR_RFC3686, &ctr)) != CRYPT_OK) { in ctr_test() 65 if ((err = ctr_encrypt(tests[x].pt, buf, tests[x].msglen, &ctr)) != CRYPT_OK) { in ctr_test() 68 ctr_done(&ctr); in ctr_test()
|
A D | ctr_decrypt.c | 27 int ctr_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CTR *ctr) in ctr_decrypt() argument 31 LTC_ARGCHK(ctr != NULL); in ctr_decrypt() 33 return ctr_encrypt(ct, pt, len, ctr); in ctr_decrypt()
|
/optee_os/core/crypto/ |
A D | sm4-ctr.c | 20 uint8_t ctr[16]; member 41 if (key1_len != 16 || iv_len != sizeof(c->ctr)) in sm4_ctr_init() 45 memcpy(c->ctr, iv, sizeof(c->ctr)); in sm4_ctr_init() 56 sm4_crypt_ctr(&c->state, len, c->ctr, data, dst); in sm4_ctr_update() 66 memzero_explicit(&c->ctr, sizeof(c->ctr)); in sm4_ctr_final() 81 memcpy(dst->ctr, src->ctr, sizeof(src->ctr)); in sm4_ctr_copy_state()
|
A D | aes-gcm.c | 85 memcpy(state->ctr, nonce, nonce_len); in __gcm_init() 91 memcpy(state->ctr, state->hash_state, sizeof(state->ctr)); in __gcm_init() 96 state->ctr, state->buf_tag); in __gcm_init() 117 state->ctr, state->buf_cryp); in __gcm_init() 216 ek->rounds, state->ctr, in __gcm_update_payload() 241 ek->rounds, state->ctr, in __gcm_update_payload() 350 c = TEE_U64_FROM_BIG_ENDIAN(state->ctr[1]) + 1; in internal_aes_gcm_inc_ctr() 351 state->ctr[1] = TEE_U64_TO_BIG_ENDIAN(c); in internal_aes_gcm_inc_ctr() 354 state->ctr[0] = TEE_U64_TO_BIG_ENDIAN(c); in internal_aes_gcm_inc_ctr() 363 state->ctr[1] = TEE_U64_TO_BIG_ENDIAN(c); in internal_aes_gcm_dec_ctr() [all …]
|
A D | sm4.c | 249 void sm4_crypt_ctr(struct sm4_context *ctx, size_t length, uint8_t ctr[16], in sm4_crypt_ctr() 258 memcpy(temp, ctr, 16); in sm4_crypt_ctr() 259 sm4_one_round(ctx->sk, ctr, ctr); in sm4_crypt_ctr() 261 output[i] = (uint8_t)(input[i] ^ ctr[i]); in sm4_crypt_ctr() 262 memcpy(ctr, temp, 16); in sm4_crypt_ctr() 264 if (++ctr[i - 1]) in sm4_crypt_ctr()
|
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/ |
A D | ccm_memory.c | 50 unsigned char PAD[16], ctr[16], CTRPAD[16], ptTag[16], b, *pt_real; in ccm_memory() local 216 ctr[x++] = (unsigned char)L-1; in ccm_memory() 220 ctr[x++] = nonce[y]; in ccm_memory() 224 ctr[x++] = 0; in ccm_memory() 239 ctr[z] = (ctr[z] + 1) & 255; in ccm_memory() 240 if (ctr[z]) break; in ccm_memory() 259 ctr[z] = (ctr[z] + 1) & 255; in ccm_memory() 260 if (ctr[z]) break; in ccm_memory() 283 ctr[z] = (ctr[z] + 1) & 255; in ccm_memory() 284 if (ctr[z]) break; in ccm_memory() [all …]
|
A D | ccm_process.c | 54 ccm->ctr[z] = (ccm->ctr[z] + 1) & 255; in ccm_process() 55 if (ccm->ctr[z]) break; in ccm_process() 57 …if ((err = cipher_descriptor[ccm->cipher]->ecb_encrypt(ccm->ctr, ccm->CTRPAD, &ccm->K)) != CRYPT_O… in ccm_process()
|
A D | ccm_reset.c | 23 zeromem(ccm->ctr, sizeof(ccm->ctr)); in ccm_reset()
|
A D | ccm_add_nonce.c | 95 ccm->ctr[x++] = (unsigned char)ccm->L-1; in ccm_add_nonce() 99 ccm->ctr[x++] = nonce[y]; in ccm_add_nonce() 103 ccm->ctr[x++] = 0; in ccm_add_nonce()
|
/optee_os/out/arm/core/lib/libtomcrypt/src/modes/ctr/ |
A D | .ctr_encrypt.o.cmd | 1 …ctr/ctr_encrypt.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarc…
|
A D | .ctr_getiv.o.cmd | 1 …ctr/ctr_getiv.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch6…
|
A D | .ctr_setiv.o.cmd | 1 …ctr/ctr_setiv.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch6…
|
A D | .ctr_start.o.cmd | 1 …ctr/ctr_start.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch6…
|
A D | .ctr_decrypt.o.cmd | 1 …ctr/ctr_decrypt.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarc…
|
A D | .ctr_done.o.cmd | 1 …ctr/ctr_done.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64…
|
/optee_os/out/arm/core/crypto/ |
A D | .sm4-ctr.o.cmd | 1 …ctr.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64/bin/aarc…
|
/optee_os/out/arm/core/lib/libtomcrypt/ |
A D | .ctr.o.cmd | 1 …ctr.o := /usr/bin/ccache /home/test/workspace/code/optee_3.16/build/../toolchains/aarch64/bin/aarc…
|
/optee_os/lib/libmbedtls/mbedtls/library/ |
A D | ccm.c | 135 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, ctr, \ 160 unsigned char ctr[16]; in ccm_auth_crypt() local 257 ctr[0] = q - 1; in ccm_auth_crypt() 258 memcpy( ctr + 1, iv, iv_len ); in ccm_auth_crypt() 259 memset( ctr + 1 + iv_len, 0, q ); in ccm_auth_crypt() 260 ctr[15] = 1; in ccm_auth_crypt() 301 if( ++ctr[15-i] != 0 ) in ccm_auth_crypt() 309 ctr[15-i] = 0; in ccm_auth_crypt()
|
/optee_os/core/arch/arm/crypto/ |
A D | aes-gcm-ce.c | 53 enc_key->rounds, state->ctr, k); in internal_aes_gcm_set_key() 109 ce_aes_ecb_encrypt(buf_cryp, (const uint8_t *)state->ctr, in encrypt_pl() 126 ek->rounds, 1, (uint8_t *)state->ctr, 1); in decrypt_pl() 159 (uint8_t *)state->ctr, ek->rounds); in update_payload_2block() 162 state->ctr, NULL, ek->rounds, ks); in update_payload_2block() 167 state->ctr, ek->data, ek->rounds); in update_payload_2block()
|
/optee_os/core/arch/arm/include/crypto/ |
A D | ghash-ce-core.h | 30 uint64_t ctr[], const uint64_t rk[], int rounds, 37 uint64_t ctr[], const uint64_t rk[], int rounds);
|