Lines Matching refs:chipertext

88     uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL);  variable
92 TEST_ASSERT_NOT_NULL(chipertext);
103 mbedtls_aes_crypt_cbc(&ctx, MBEDTLS_AES_ENCRYPT, SZ, nonce, plaintext, chipertext);
104 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, chipertext + SZ - 32, 32);
109 mbedtls_aes_crypt_cbc(&ctx, MBEDTLS_AES_DECRYPT, SZ, nonce, chipertext, decryptedtext);
115 free(chipertext);
137 uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); variable
141 TEST_ASSERT_NOT_NULL(chipertext);
152 mbedtls_aes_crypt_cbc(&ctx, MBEDTLS_AES_ENCRYPT, SZ, nonce, plaintext, chipertext);
153 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, chipertext + SZ - 32, 32);
158 mbedtls_aes_crypt_cbc(&ctx, MBEDTLS_AES_DECRYPT, SZ, nonce, chipertext, decryptedtext);
164 free(chipertext);
186 uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); variable
190 TEST_ASSERT_NOT_NULL(chipertext);
201 mbedtls_aes_crypt_ctr(&ctx, SZ, &nc_off, nonce, stream_block, plaintext, chipertext);
202 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, chipertext + SZ - 32, 32);
207 mbedtls_aes_crypt_ctr(&ctx, SZ, &nc_off, nonce, stream_block, chipertext, decryptedtext);
213 free(chipertext);
234 uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); variable
238 TEST_ASSERT_NOT_NULL(chipertext);
249 mbedtls_aes_crypt_ofb(&ctx, SZ, &nc_off, nonce, plaintext, chipertext);
250 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, chipertext + SZ - 32, 32);
255 mbedtls_aes_crypt_ofb(&ctx, SZ, &nc_off, nonce, chipertext, decryptedtext);
261 free(chipertext);
281 uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); variable
285 TEST_ASSERT_NOT_NULL(chipertext);
296 mbedtls_aes_crypt_cfb8(&ctx, MBEDTLS_AES_ENCRYPT, SZ, nonce, plaintext, chipertext);
297 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, chipertext + SZ - 32, 32);
301 mbedtls_aes_crypt_cfb8(&ctx, MBEDTLS_AES_DECRYPT, SZ, nonce, chipertext, decryptedtext);
307 free(chipertext);
328 uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); variable
332 TEST_ASSERT_NOT_NULL(chipertext);
343 mbedtls_aes_crypt_cfb128(&ctx, MBEDTLS_AES_ENCRYPT, SZ, &nc_off, nonce, plaintext, chipertext);
344 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, chipertext + SZ - 32, 32);
349 …mbedtls_aes_crypt_cfb128(&ctx, MBEDTLS_AES_DECRYPT, SZ, &nc_off, nonce, chipertext, decryptedtext);
355 free(chipertext);
404 …uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_DMA | MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); in aes_ctr_stream_test() local
408 TEST_ASSERT_NOT_NULL(chipertext); in aes_ctr_stream_test()
422 memset(chipertext, 0x0, SZ); in aes_ctr_stream_test()
432 stream_block, plaintext + idx, chipertext + idx ); in aes_ctr_stream_test()
435 ESP_LOG_BUFFER_HEXDUMP("actual ", chipertext, SZ, ESP_LOG_DEBUG); in aes_ctr_stream_test()
437 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher, chipertext, SZ); in aes_ctr_stream_test()
447 stream_block, chipertext + idx, decryptedtext + idx ); in aes_ctr_stream_test()
455 free(chipertext); in aes_ctr_stream_test()
508 …uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_DMA | MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); variable
512 TEST_ASSERT_NOT_NULL(chipertext);
532 mbedtls_aes_crypt_ofb(&ctx, length, &offset, iv, plaintext + idx, chipertext + idx);
535 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher, chipertext, SZ);
544 mbedtls_aes_crypt_ofb(&ctx, length, &offset, iv, chipertext + idx, decryptedtext + idx);
551 free(chipertext);
598 …uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_DMA | MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); variable
602 TEST_ASSERT_NOT_NULL(chipertext);
619 … mbedtls_aes_crypt_cfb8(&ctx, MBEDTLS_AES_ENCRYPT, length, iv, plaintext + idx, chipertext + idx);
622 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher, chipertext, SZ);
628 …mbedtls_aes_crypt_cfb8(&ctx, MBEDTLS_AES_DECRYPT, length, iv, chipertext + idx, decryptedtext + id…
636 free(chipertext);
683 …uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_DMA | MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL); variable
687 TEST_ASSERT_NOT_NULL(chipertext);
706 …es_crypt_cfb128(&ctx, MBEDTLS_AES_ENCRYPT, length, &offset, iv, plaintext + idx, chipertext + idx);
709 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher, chipertext, SZ);
716 …mbedtls_aes_crypt_cfb128(&ctx, MBEDTLS_AES_DECRYPT, length, &offset, iv, chipertext + idx, decrypt…
723 free(chipertext);
807 uint8_t *chipertext = heap_caps_malloc(SZ, MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL); variable
811 TEST_ASSERT_NOT_NULL(chipertext);
822 mbedtls_aes_crypt_ofb(&ctx, SZ, &nc_off, nonce, plaintext, chipertext);
823 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_end, chipertext + SZ - 32, 32);
829 mbedtls_aes_crypt_ofb(&ctx, SZ, &nc_off, nonce, chipertext, decryptedtext);
835 free(chipertext);
861 uint8_t *chipertext = heap_caps_malloc(SZ + ALIGNMENT_SIZE_BYTES, output_buf_caps); in aes_ctr_alignment_test() local
865 TEST_ASSERT_NOT_NULL(chipertext); in aes_ctr_alignment_test()
880 … mbedtls_aes_crypt_ctr(&ctx, SZ, &offset, nonce, stream_block, plaintext + i, chipertext + i); in aes_ctr_alignment_test()
881 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_ctr_end, chipertext + i + SZ - 32, 32); in aes_ctr_alignment_test()
887 … mbedtls_aes_crypt_ctr(&ctx, SZ, &offset, nonce, stream_block, chipertext + i, decryptedtext); in aes_ctr_alignment_test()
895 free(chipertext); in aes_ctr_alignment_test()
1486 uint8_t *chipertext = heap_caps_malloc(SZ, output_buf_caps); in aes_ext_flash_ctr_test() local
1489 TEST_ASSERT_NOT_NULL(chipertext); in aes_ext_flash_ctr_test()
1500 mbedtls_aes_crypt_ctr(&ctx, SZ, &offset, nonce, stream_block, long_input, chipertext); in aes_ext_flash_ctr_test()
1501 TEST_ASSERT_EQUAL_HEX8_ARRAY(expected_cipher_long_input_end, chipertext + SZ - 32, 32); in aes_ext_flash_ctr_test()
1507 mbedtls_aes_crypt_ctr(&ctx, SZ, &offset, nonce, stream_block, chipertext, decryptedtext); in aes_ext_flash_ctr_test()
1512 free(chipertext); in aes_ext_flash_ctr_test()