Home
last modified time | relevance | path

Searched refs:iv (Results 1 – 25 of 66) sorted by relevance

123

/hal_espressif-3.5.0/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/
Dsha256.c37 static void compress(unsigned int *iv, const uint8_t *data);
53 s->iv[0] = 0x6a09e667; in tc_sha256_init()
54 s->iv[1] = 0xbb67ae85; in tc_sha256_init()
55 s->iv[2] = 0x3c6ef372; in tc_sha256_init()
56 s->iv[3] = 0xa54ff53a; in tc_sha256_init()
57 s->iv[4] = 0x510e527f; in tc_sha256_init()
58 s->iv[5] = 0x9b05688c; in tc_sha256_init()
59 s->iv[6] = 0x1f83d9ab; in tc_sha256_init()
60 s->iv[7] = 0x5be0cd19; in tc_sha256_init()
78 compress(s->iv, s->leftover); in tc_sha256_update()
[all …]
Dcmac_mode.c114 _set(s->iv, 0, TC_AES_BLOCK_SIZE); in tc_cmac_setup()
115 tc_aes_encrypt(s->iv, s->iv, s->sched); in tc_cmac_setup()
116 gf_double (s->K1, s->iv); in tc_cmac_setup()
145 _set(s->iv, 0, TC_AES_BLOCK_SIZE); in tc_cmac_init()
198 s->iv[i] ^= s->leftover[i]; in tc_cmac_update()
200 tc_aes_encrypt(s->iv, s->iv, s->sched); in tc_cmac_update()
206 s->iv[i] ^= data[i]; in tc_cmac_update()
208 tc_aes_encrypt(s->iv, s->iv, s->sched); in tc_cmac_update()
245 s->iv[i] ^= s->leftover[i] ^ k[i]; in tc_cmac_final()
248 tc_aes_encrypt(tag, s->iv, s->sched); in tc_cmac_final()
Dcbc_mode.c38 unsigned int inlen, const uint8_t *iv, in tc_cbc_mode_encrypt() argument
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()
78 unsigned int inlen, const uint8_t *iv, in tc_cbc_mode_decrypt() argument
103 p = iv; in tc_cbc_mode_decrypt()
/hal_espressif-3.5.0/components/mbedtls/port/aes/block/
Desp_aes.c204 unsigned char iv[16], in esp_aes_crypt_cbc()
210 uint32_t *iv_words = (uint32_t *)iv; in esp_aes_crypt_cbc()
271 unsigned char iv[16], in esp_aes_crypt_cfb128()
289 esp_aes_block(ctx, iv, iv); in esp_aes_crypt_cfb128()
293 *output++ = (unsigned char)( c ^ iv[n] ); in esp_aes_crypt_cfb128()
294 iv[n] = (unsigned char) c; in esp_aes_crypt_cfb128()
301 esp_aes_block(ctx, iv, iv); in esp_aes_crypt_cfb128()
304 iv[n] = *output++ = (unsigned char)( iv[n] ^ *input++ ); in esp_aes_crypt_cfb128()
323 unsigned char iv[16], in esp_aes_crypt_cfb8()
340 memcpy( ov, iv, 16 ); in esp_aes_crypt_cfb8()
[all …]
/hal_espressif-3.5.0/components/mbedtls/test/
Dtest_aes_gcm.c147 uint8_t *iv; member
184 memcpy(iv_buf, cfg->iv, cfg->iv_length); in aes_gcm_test()
225 uint8_t iv[16]; variable
229 memset(iv, 0xB1, sizeof(iv));
273 .iv = iv,
274 .iv_length = sizeof(iv),
307 uint8_t iv[16]; variable
313 memset(iv, 0xA2, sizeof(iv));
344 .iv = iv,
345 .iv_length = sizeof(iv),
[all …]
Dtest_aes.c26 static const uint8_t iv[] = { variable
77 memcpy(nonce, iv, 16);
99 memcpy(nonce, iv, 16);
126 memcpy(nonce, iv, 16);
149 memcpy(nonce, iv, 16);
174 memcpy(nonce, iv, 16);
197 memcpy(nonce, iv, 16);
221 memcpy(nonce, iv, 16);
243 memcpy(nonce, iv, 16);
268 memcpy(nonce, iv, 16);
[all …]
Dtest_aes_perf.c21 uint8_t iv[16]; variable
24 memset(iv, 0xEE, 16);
36 mbedtls_aes_crypt_cbc(&ctx, MBEDTLS_AES_ENCRYPT, CALL_SZ, iv, buf, buf);
/hal_espressif-3.5.0/components/mbedtls/port/aes/dma/
Desp_aes.c698 unsigned char iv[16], in esp_aes_crypt_cbc()
707 if (!iv) { in esp_aes_crypt_cbc()
727 aes_hal_set_iv(iv); in esp_aes_crypt_cbc()
735 aes_hal_read_iv(iv); in esp_aes_crypt_cbc()
747 unsigned char iv[16], in esp_aes_crypt_cfb8()
760 if (!iv) { in esp_aes_crypt_cfb8()
780 aes_hal_set_iv(iv); in esp_aes_crypt_cfb8()
782 aes_hal_read_iv(iv); in esp_aes_crypt_cfb8()
801 memcpy( ov, iv, 16 ); in esp_aes_crypt_cfb8()
803 r = esp_aes_process_dma(ctx, iv, iv, AES_BLOCK_BYTES, NULL); in esp_aes_crypt_cfb8()
[all …]
/hal_espressif-3.5.0/components/esp_hw_support/test/
Dtest_ds.c40 uint8_t iv[ETS_DS_IV_LEN]; member
62 const char iv [32]; variable
66 TEST_ASSERT_EQUAL(ESP_ERR_INVALID_ARG, esp_ds_encrypt_params(NULL, iv, &p_data, key));
81 const char iv [32]; variable
84 TEST_ASSERT_EQUAL(ESP_ERR_INVALID_ARG, esp_ds_encrypt_params(&data, iv, NULL, key));
90 const char iv [32]; variable
93 TEST_ASSERT_EQUAL(ESP_ERR_INVALID_ARG, esp_ds_encrypt_params(&data, iv, &p_data, NULL));
110 esp_err_t r = esp_ds_encrypt_params(&result, t->iv, &p_data,
115 TEST_ASSERT_EQUAL_HEX8_ARRAY(t->iv, result.iv, ETS_DS_IV_LEN);
323 memcpy(ds_data.iv, t->iv, ETS_DS_IV_LEN);
[all …]
Ddigital_signature_test_cases_3072.h47 ….iv = { 0xde, 0x38, 0x70, 0x94, 0x99, 0x2f, 0x4f, 0x87, 0x43, 0x2e, 0x33, 0x7a, 0x6b, 0x32, 0x63, …
72 ….iv = { 0x1a, 0x74, 0x1a, 0x0d, 0x12, 0x6a, 0x41, 0x95, 0xad, 0x9d, 0xcf, 0x50, 0x36, 0xcd, 0xd2, …
97 ….iv = { 0xf8, 0x40, 0x6d, 0xc2, 0x14, 0xcf, 0x51, 0xfa, 0xba, 0x22, 0x6c, 0x84, 0x62, 0xe8, 0x55, …
122 ….iv = { 0x07, 0x26, 0x01, 0x00, 0x07, 0x30, 0x8f, 0x4b, 0x20, 0x54, 0x05, 0x88, 0xcb, 0xf6, 0x05, …
147 ….iv = { 0xc6, 0x09, 0xa6, 0x69, 0x05, 0xf2, 0x42, 0xa4, 0xd4, 0x92, 0x33, 0xc2, 0xe3, 0x09, 0x09, …
172 ….iv = { 0xdc, 0x0f, 0x35, 0x44, 0x22, 0x00, 0x92, 0x16, 0xb6, 0x05, 0x77, 0x21, 0x81, 0x7b, 0x04, …
Ddigital_signature_test_cases_4096.h47 ….iv = { 0xb6, 0xf5, 0xa9, 0x4b, 0x0a, 0xf4, 0x12, 0x77, 0x0b, 0x1b, 0x23, 0x09, 0xc3, 0x0e, 0x98, …
72 ….iv = { 0x97, 0xd4, 0xc6, 0xa6, 0x36, 0xf6, 0x5b, 0x90, 0x2d, 0xbe, 0x19, 0x38, 0x75, 0xcd, 0x08, …
97 ….iv = { 0x56, 0x3b, 0xc1, 0x5a, 0x62, 0xcf, 0xfb, 0xc5, 0x8c, 0xfc, 0x2a, 0x0d, 0xb8, 0x77, 0x0d, …
122 ….iv = { 0x4d, 0x39, 0x4b, 0x5f, 0x64, 0xd7, 0x95, 0xaf, 0x88, 0xe4, 0xab, 0x73, 0xe9, 0x4f, 0x16, …
147 ….iv = { 0x1a, 0x4c, 0x50, 0xba, 0xff, 0xa6, 0x9d, 0x39, 0xfb, 0x57, 0xe3, 0x4f, 0x62, 0xb7, 0xea, …
172 ….iv = { 0xdf, 0xb2, 0x78, 0x21, 0xb1, 0x68, 0x58, 0x7c, 0x12, 0xfb, 0xff, 0x62, 0x6e, 0x20, 0x24, …
/hal_espressif-3.5.0/components/mbedtls/port/aes/
Desp_aes_gcm.c71 memcpy(ctx->J0, ctx->iv, ctx->iv_len); in esp_gcm_derive_J0()
76 esp_gcm_ghash(ctx, ctx->iv, ctx->iv_len, ctx->J0); in esp_gcm_derive_J0()
338 const unsigned char *iv, in esp_aes_gcm_starts() argument
356 if (!iv) { in esp_aes_gcm_starts()
370 ctx->iv = iv; in esp_aes_gcm_starts()
523 const unsigned char *iv, in esp_aes_gcm_crypt_and_tag_partial_hw() argument
534 if ( ( ret = esp_aes_gcm_starts( ctx, mode, iv, iv_len, aad, aad_len ) ) != 0 ) { in esp_aes_gcm_crypt_and_tag_partial_hw()
552 const unsigned char *iv, in esp_aes_gcm_crypt_and_tag() argument
571 …return esp_aes_gcm_crypt_and_tag_partial_hw(ctx, mode, length, iv, iv_len, aad, aad_len, input, ou… in esp_aes_gcm_crypt_and_tag()
593 if (!iv) { in esp_aes_gcm_crypt_and_tag()
[all …]
/hal_espressif-3.5.0/components/wpa_supplicant/src/crypto/
Daes-siv.c129 u8 *iv, *crypt_pw; in aes_siv_encrypt() local
149 iv = out; in aes_siv_encrypt()
152 os_memcpy(iv, v, AES_BLOCK_SIZE); in aes_siv_encrypt()
173 u8 iv[AES_BLOCK_SIZE]; in aes_siv_decrypt() local
191 os_memcpy(iv, iv_crypt, AES_BLOCK_SIZE); in aes_siv_decrypt()
194 iv[8] &= 0x7f; in aes_siv_decrypt()
195 iv[12] &= 0x7f; in aes_siv_decrypt()
197 ret = aes_ctr_encrypt(k2, key_len, iv, out, crypt_len); in aes_siv_decrypt()
Daes-gcm.c192 static void aes_gcm_prepare_j0(const u8 *iv, size_t iv_len, const u8 *H, u8 *J0) in aes_gcm_prepare_j0() argument
198 os_memcpy(J0, iv, iv_len); in aes_gcm_prepare_j0()
207 ghash(H, iv, iv_len, J0); in aes_gcm_prepare_j0()
254 int aes_gcm_ae(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ae() argument
267 aes_gcm_prepare_j0(iv, iv_len, H, J0); in aes_gcm_ae()
288 int aes_gcm_ad(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ad() argument
301 aes_gcm_prepare_j0(iv, iv_len, H, J0); in aes_gcm_ad()
322 int aes_gmac(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gmac() argument
325 return aes_gcm_ae(key, key_len, iv, iv_len, NULL, 0, aad, aad_len, NULL, in aes_gmac()
Daes-cbc.c24 int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len) in aes_128_cbc_encrypt() argument
37 os_memcpy(cbc, iv, AES_BLOCK_SIZE); in aes_128_cbc_encrypt()
60 int aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len) in aes_128_cbc_decrypt() argument
73 os_memcpy(cbc, iv, AES_BLOCK_SIZE); in aes_128_cbc_decrypt()
Daes_wrap.h48 int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
50 int __must_check aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
53 const u8 *iv, size_t iv_len,
58 const u8 *iv, size_t iv_len,
63 const u8 *iv, size_t iv_len,
/hal_espressif-3.5.0/examples/bluetooth/blufi/main/
Dblufi_security.c53 uint8_t iv[16]; member
147 memcpy(iv0, blufi_sec->iv, sizeof(blufi_sec->iv)); in blufi_aes_encrypt()
164 memcpy(iv0, blufi_sec->iv, sizeof(blufi_sec->iv)); in blufi_aes_decrypt()
193 memset(blufi_sec->iv, 0x0, 16); in blufi_security_init()
/hal_espressif-3.5.0/components/bootloader_support/src/secure_boot_v1/
Dsecure_boot.c48 if (image_len % sizeof(digest.iv) != 0) { in secure_boot_generate()
49 image_len = (image_len / sizeof(digest.iv) + 1) * sizeof(digest.iv); in secure_boot_generate()
52 ets_secure_boot_rd_iv((uint32_t *)digest.iv); in secure_boot_generate()
68 for (size_t i = 0; i < image_len; i+= sizeof(digest.iv)) { in secure_boot_generate()
/hal_espressif-3.5.0/components/hal/
Daes_hal.c80 void aes_hal_set_iv(const uint8_t *iv) in aes_hal_set_iv() argument
82 aes_ll_set_iv(iv); in aes_hal_set_iv()
85 void aes_hal_read_iv(uint8_t *iv) in aes_hal_read_iv() argument
87 aes_ll_read_iv(iv); in aes_hal_read_iv()
/hal_espressif-3.5.0/components/mbedtls/port/include/aes/
Desp_aes_gcm.h54 const uint8_t *iv; member
110 const unsigned char *iv,
193 const unsigned char *iv,
228 const unsigned char *iv,
Desp_aes.h162 unsigned char iv[16],
196 unsigned char iv[16],
227 unsigned char iv[16],
282 unsigned char iv[16],
/hal_espressif-3.5.0/examples/protocols/mqtt/ssl_ds/
Dconfigure_ds.py105 iv = os.urandom(16)
121 iv
142 cipher = Cipher(algorithms.AES(aes_key), modes.CBC(iv), backend=default_backend())
145 return c, iv, key_size
173 def generate_csv_file(c, iv, hmac_key_id, key_size, csv_file): argument
179 f.write('esp_ds_iv,data,hex2bin,%s\n' % (iv.hex()))
384 …c, iv, key_size = calculate_ds_parameters(args.privkey, args.priv_key_pass, hmac_key_read, idf_tar…
387 generate_csv_file(c, iv, args.efuse_key_id, key_size, csv_filename)
/hal_espressif-3.5.0/components/hal/esp32c3/include/hal/
Daes_ll.h174 static inline void aes_ll_set_iv(const uint8_t *iv) in aes_ll_set_iv() argument
181 memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); in aes_ll_set_iv()
189 static inline void aes_ll_read_iv(uint8_t *iv) in aes_ll_read_iv() argument
197 memcpy(iv + i * 4, &iv_word, sizeof(iv_word)); in aes_ll_read_iv()
/hal_espressif-3.5.0/components/hal/esp32h2/include/hal/
Daes_ll.h174 static inline void aes_ll_set_iv(const uint8_t *iv) in aes_ll_set_iv() argument
181 memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); in aes_ll_set_iv()
189 static inline void aes_ll_read_iv(uint8_t *iv) in aes_ll_read_iv() argument
197 memcpy(iv + i * 4, &iv_word, sizeof(iv_word)); in aes_ll_read_iv()
/hal_espressif-3.5.0/components/hal/esp32s3/include/hal/
Daes_ll.h174 static inline void aes_ll_set_iv(const uint8_t *iv) in aes_ll_set_iv() argument
181 memcpy(&iv_word, iv + 4 * i, sizeof(iv_word)); in aes_ll_set_iv()
189 static inline void aes_ll_read_iv(uint8_t *iv) in aes_ll_read_iv() argument
197 memcpy(iv + i * 4, &iv_word, sizeof(iv_word)); in aes_ll_read_iv()

123