Home
last modified time | relevance | path

Searched refs:TC_AES_BLOCK_SIZE (Results 1 – 11 of 11) sorted by relevance

/mcuboot-3.6.0/ext/tinycrypt/lib/source/
Dcbc_mode.c42 uint8_t buffer[TC_AES_BLOCK_SIZE]; in tc_cbc_mode_encrypt()
51 (inlen % TC_AES_BLOCK_SIZE) != 0 || in tc_cbc_mode_encrypt()
52 (outlen % TC_AES_BLOCK_SIZE) != 0 || in tc_cbc_mode_encrypt()
53 outlen != inlen + TC_AES_BLOCK_SIZE) { in tc_cbc_mode_encrypt()
58 (void)_copy(buffer, TC_AES_BLOCK_SIZE, iv, TC_AES_BLOCK_SIZE); in tc_cbc_mode_encrypt()
60 (void)_copy(out, TC_AES_BLOCK_SIZE, iv, TC_AES_BLOCK_SIZE); in tc_cbc_mode_encrypt()
61 out += TC_AES_BLOCK_SIZE; in tc_cbc_mode_encrypt()
65 if (m == TC_AES_BLOCK_SIZE) { in tc_cbc_mode_encrypt()
67 (void)_copy(out, TC_AES_BLOCK_SIZE, in tc_cbc_mode_encrypt()
68 buffer, TC_AES_BLOCK_SIZE); in tc_cbc_mode_encrypt()
[all …]
Dctr_prng.c78 uint8_t temp[TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE]; in tc_ctr_prng_update()
84 uint8_t output_block[TC_AES_BLOCK_SIZE]; in tc_ctr_prng_update()
90 if (blocklen > TC_AES_BLOCK_SIZE) { in tc_ctr_prng_update()
91 blocklen = TC_AES_BLOCK_SIZE; in tc_ctr_prng_update()
113 memcpy(ctx->V, &(temp[TC_AES_KEY_SIZE]), TC_AES_BLOCK_SIZE); in tc_ctr_prng_update()
125 uint8_t personalization_buf[TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE] = {0U}; in tc_ctr_prng_init()
126 uint8_t seed_material[TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE]; in tc_ctr_prng_init()
127 uint8_t zeroArr[TC_AES_BLOCK_SIZE] = {0U}; in tc_ctr_prng_init()
172 uint8_t additional_input_buf[TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE] = {0U}; in tc_ctr_prng_reseed()
173 uint8_t seed_material[TC_AES_KEY_SIZE + TC_AES_BLOCK_SIZE]; in tc_ctr_prng_reseed()
[all …]
Dcmac_mode.c82 uint8_t *x = in + (TC_AES_BLOCK_SIZE - 1); in gf_double()
87 out += (TC_AES_BLOCK_SIZE - 1); in gf_double()
114 _set(s->iv, 0, TC_AES_BLOCK_SIZE); in tc_cmac_setup()
145 _set(s->iv, 0, TC_AES_BLOCK_SIZE); in tc_cmac_init()
148 _set(s->leftover, 0, TC_AES_BLOCK_SIZE); in tc_cmac_init()
180 size_t remaining_space = TC_AES_BLOCK_SIZE - s->leftover_offset; in tc_cmac_update()
197 for (i = 0; i < TC_AES_BLOCK_SIZE; ++i) { in tc_cmac_update()
204 while (data_length > TC_AES_BLOCK_SIZE) { in tc_cmac_update()
205 for (i = 0; i < TC_AES_BLOCK_SIZE; ++i) { in tc_cmac_update()
209 data += TC_AES_BLOCK_SIZE; in tc_cmac_update()
[all …]
Dctr_mode.c42 uint8_t buffer[TC_AES_BLOCK_SIZE]; in tc_ctr_mode()
43 uint8_t nonce[TC_AES_BLOCK_SIZE]; in tc_ctr_mode()
82 n = (n + 1) % TC_AES_BLOCK_SIZE; in tc_ctr_mode()
Dccm_mode.c97 uint8_t buffer[TC_AES_BLOCK_SIZE]; in ccm_ctr_mode()
98 uint8_t nonce[TC_AES_BLOCK_SIZE]; in ccm_ctr_mode()
119 if ((i % (TC_AES_BLOCK_SIZE)) == 0) { in ccm_ctr_mode()
128 *out++ = buffer[i % (TC_AES_BLOCK_SIZE)] ^ *in++; in ccm_ctr_mode()
/mcuboot-3.6.0/ext/tinycrypt/lib/include/tinycrypt/
Dcmac_mode.h114 uint8_t iv[TC_AES_BLOCK_SIZE];
116 uint8_t K1[TC_AES_BLOCK_SIZE];
118 uint8_t K2[TC_AES_BLOCK_SIZE];
120 uint8_t leftover[TC_AES_BLOCK_SIZE];
Daes.h61 #define TC_AES_BLOCK_SIZE (Nb*Nk) macro
Dctr_prng.h72 uint8_t V[TC_AES_BLOCK_SIZE];
/mcuboot-3.6.0/ext/tinycrypt/tests/
Dtest_cbc_mode.c116 (void)memcpy(iv_buffer, iv, TC_AES_BLOCK_SIZE); in test_1_and_2()
119 if (tc_cbc_mode_encrypt(encrypted, sizeof(plaintext) + TC_AES_BLOCK_SIZE, in test_1_and_2()
134 p = &encrypted[TC_AES_BLOCK_SIZE]; in test_1_and_2()
135 length = ((unsigned int) sizeof(encrypted)) - TC_AES_BLOCK_SIZE; in test_1_and_2()
137 if (tc_cbc_mode_decrypt(decrypted, length - TC_AES_BLOCK_SIZE, p, length, in test_1_and_2()
Dtest_ctr_mode.c90 if (tc_ctr_mode(&out[TC_AES_BLOCK_SIZE], sizeof(plaintext), plaintext, in test_1_and_2()
108 if (tc_ctr_mode(decrypted, sizeof(decrypted), &out[TC_AES_BLOCK_SIZE], in test_1_and_2()
/mcuboot-3.6.0/boot/bootutil/include/bootutil/crypto/
Daes_ctr.h38 #define BOOTUTIL_CRYPTO_AES_CTR_BLOCK_SIZE TC_AES_BLOCK_SIZE