/mbedtls-3.5.0/tests/suites/ |
D | test_suite_aria.function | 24 unsigned char output[MBEDTLS_ARIA_BLOCKSIZE] = { 0 }; 32 ((void) output); 41 output)); 52 output)); 65 unsigned char output[ARIA_MAX_DATASIZE]; 69 memset(output, 0x00, sizeof(output)); 77 output + i) == 0); 80 ASSERT_COMPARE(output, expected_output->len, 93 unsigned char output[ARIA_MAX_DATASIZE]; 97 memset(output, 0x00, sizeof(output)); [all …]
|
D | test_suite_des.function | 20 unsigned char output[100]; 23 memset(output, 0x00, 100); 28 TEST_ASSERT(mbedtls_des_crypt_ecb(&ctx, src_str->x, output) == 0); 30 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 8, dst->len) == 0); 40 unsigned char output[100]; 43 memset(output, 0x00, 100); 48 TEST_ASSERT(mbedtls_des_crypt_ecb(&ctx, src_str->x, output) == 0); 50 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 8, dst->len) == 0); 61 unsigned char output[100]; 64 memset(output, 0x00, 100); [all …]
|
D | test_suite_gcm.function | 5 * and check that the output matches the expected output. 18 uint8_t *output = NULL; 36 ASSERT_ALLOC(output, n1); 38 TEST_EQUAL(0, mbedtls_gcm_update(ctx, input->x, n1, output, n1, &olen)); 40 ASSERT_COMPARE(output, olen, expected_output->x, n1); 41 mbedtls_free(output); 42 output = NULL; 44 ASSERT_ALLOC(output, n2); 46 TEST_EQUAL(0, mbedtls_gcm_update(ctx, input->x + n1, n2, output, n2, &olen)); 48 ASSERT_COMPARE(output, olen, expected_output->x + n1, n2); [all …]
|
D | test_suite_shax.function | 10 unsigned char output[41]; 12 memset(output, 0x00, 41); 15 TEST_ASSERT(mbedtls_sha1(src_str->x, src_str->len, output) == 0); 17 TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x, 20, hash->len) == 0); 44 unsigned char output[57]; 46 memset(output, 0x00, 57); 49 TEST_EQUAL(mbedtls_sha256(src_str->x, src_str->len, output, 1), 0); 51 TEST_EQUAL(mbedtls_test_hexcmp(output, hash->x, 28, hash->len), 0); 58 unsigned char output[65]; 60 memset(output, 0x00, 65); [all …]
|
D | test_suite_camellia.function | 50 unsigned char output[100]; 53 memset(output, 0x00, 100); 60 output) == 0); 62 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 16, dst->len) == 0); 74 unsigned char output[100]; 77 memset(output, 0x00, 100); 84 output) == 0); 86 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 16, dst->len) == 0); 98 unsigned char output[100]; 101 memset(output, 0x00, 100); [all …]
|
D | test_suite_aes.function | 19 unsigned char output[16]; 40 plaintext, output) == 0); 41 ASSERT_COMPARE(ciphertext, 16, output, 16); 46 ciphertext, output) == 0); 47 ASSERT_COMPARE(plaintext, 16, output, 16); 70 unsigned char output[100]; 73 memset(output, 0x00, 100); 79 TEST_ASSERT(mbedtls_aes_crypt_ecb(&ctx, MBEDTLS_AES_ENCRYPT, src_str->x, output) == 0); 81 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 16, dst->len) == 0); 93 unsigned char output[100]; [all …]
|
D | test_suite_chacha20.function | 17 unsigned char output[375]; 20 memset(output, 0x00, sizeof(output)); 30 output) == 0); 32 ASSERT_COMPARE(output, expected_output_str->len, 44 memset(output, 0x00, sizeof(output)); 45 TEST_ASSERT(mbedtls_chacha20_update(&ctx, src_str->len, src_str->x, output) == 0); 47 ASSERT_COMPARE(output, expected_output_str->len, 58 memset(output, 0x00, sizeof(output)); 59 TEST_ASSERT(mbedtls_chacha20_update(&ctx, 1, src_str->x, output) == 0); 61 src_str->x + 1, output + 1) == 0); [all …]
|
D | test_suite_ccm.function | 5 * and check that the output matches the expected output. 18 uint8_t *output = NULL; 35 ASSERT_ALLOC(output, n1); 37 TEST_EQUAL(0, mbedtls_ccm_update(ctx, input->x, n1, output, n1, &olen)); 39 ASSERT_COMPARE(output, olen, expected_output->x, n1); 40 mbedtls_free(output); 41 output = NULL; 43 ASSERT_ALLOC(output, n2); 45 TEST_EQUAL(0, mbedtls_ccm_update(ctx, input->x + n1, n2, output, n2, &olen)); 47 ASSERT_COMPARE(output, olen, expected_output->x + n1, n2); [all …]
|
D | test_suite_mdx.function | 11 unsigned char output[16]; 14 memset(output, 0x00, sizeof(output)); 18 ret = mbedtls_md5(src_str, strlen((char *) src_str), output); 21 TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x, 22 sizeof(output), hash->len) == 0); 31 unsigned char output[20]; 34 memset(output, 0x00, sizeof(output)); 38 ret = mbedtls_ripemd160(src_str, strlen((char *) src_str), output); 41 TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x, 42 sizeof(output), hash->len) == 0);
|
D | test_suite_psa_crypto_op_fail.function | 51 uint8_t output[PSA_HASH_MAX_SIZE] = { 0 }; 60 output, sizeof(output), &length)); 63 output, sizeof(output))); 82 uint8_t output[PSA_MAC_MAX_SIZE] = { 0 }; 103 output, sizeof(output), &length)); 107 output, sizeof(output))); 128 uint8_t output[64] = { 0 }; 149 output, sizeof(output), &length)); 153 output, sizeof(output), &length)); 174 uint8_t output[64] = { 0 }; [all …]
|
D | test_suite_md.function | 160 unsigned char output[MBEDTLS_MD_MAX_SIZE] = { 0 }; 168 TEST_EQUAL(0, mbedtls_md(md_info, src, src_len, output)); 170 ASSERT_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len); 180 unsigned char output[MBEDTLS_MD_MAX_SIZE] = { 0 }; 188 TEST_EQUAL(0, mbedtls_md(md_info, src_str->x, src_str->len, output)); 191 ASSERT_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len); 204 unsigned char output[MBEDTLS_MD_MAX_SIZE] = { 0 }; 232 TEST_EQUAL(0, mbedtls_md_finish(&ctx, output)); 233 ASSERT_COMPARE(output, mbedtls_md_get_size(md_info), hash->x, hash->len); 236 memset(output, 0x00, sizeof(output)); [all …]
|
D | test_suite_chachapoly.function | 18 unsigned char output[265]; 33 input_str->x, output, mac) == 0); 35 TEST_ASSERT(memcmp(output_str->x, output, output_str->len) == 0); 52 unsigned char output[265]; 67 mac_str->x, input_str->x, output); 71 TEST_ASSERT(memcmp(output_str->x, output, output_str->len) == 0); 86 unsigned char output[1]; 96 memset(output, 0x00, sizeof(output)); 104 TEST_ASSERT(mbedtls_chachapoly_update(&ctx, input_len, input, output) 115 TEST_ASSERT(mbedtls_chachapoly_update(&ctx, input_len, input, output) [all …]
|
D | test_suite_pkcs1_v21.function | 16 unsigned char output[256]; 30 memset(output, 0x00, sizeof(output)); 48 output) == result); 50 ASSERT_COMPARE(output, ctx.len, result_str->x, result_str->len); 65 unsigned char output[64]; 82 memset(output, 0x00, sizeof(output)); 106 output, 107 sizeof(output)) == result); 109 ASSERT_COMPARE(output, output_len, result_str->x, result_str->len); 127 unsigned char output[512]; [all …]
|
/mbedtls-3.5.0/tests/src/drivers/ |
D | test_driver_cipher.c | 51 uint8_t *output, in mbedtls_test_transparent_cipher_encrypt() argument 62 memcpy(output, in mbedtls_test_transparent_cipher_encrypt() 80 output, output_size, output_length); in mbedtls_test_transparent_cipher_encrypt() 85 output, output_size, output_length); in mbedtls_test_transparent_cipher_encrypt() 98 uint8_t *output, in mbedtls_test_transparent_cipher_decrypt() argument 109 memcpy(output, in mbedtls_test_transparent_cipher_decrypt() 127 output, output_size, output_length); in mbedtls_test_transparent_cipher_decrypt() 132 output, output_size, output_length); in mbedtls_test_transparent_cipher_decrypt() 243 uint8_t *output, in mbedtls_test_transparent_cipher_update() argument 254 memcpy(output, in mbedtls_test_transparent_cipher_update() [all …]
|
D | test_driver_asymmetric_encryption.c | 40 uint8_t *output, size_t output_size, size_t *output_length) in mbedtls_test_transparent_asymmetric_encrypt() argument 49 memcpy(output, in mbedtls_test_transparent_asymmetric_encrypt() 67 output, output_size, output_length); in mbedtls_test_transparent_asymmetric_encrypt() 72 output, output_size, output_length); in mbedtls_test_transparent_asymmetric_encrypt() 82 uint8_t *output, size_t output_size, size_t *output_length) in mbedtls_test_transparent_asymmetric_decrypt() argument 91 memcpy(output, in mbedtls_test_transparent_asymmetric_decrypt() 109 output, output_size, output_length); in mbedtls_test_transparent_asymmetric_decrypt() 114 output, output_size, output_length); in mbedtls_test_transparent_asymmetric_decrypt() 127 uint8_t *output, size_t output_size, size_t *output_length) in mbedtls_test_opaque_asymmetric_encrypt() argument 137 (void) output; in mbedtls_test_opaque_asymmetric_encrypt() [all …]
|
D | test_driver_pake.c | 69 uint8_t *output, in mbedtls_test_transparent_pake_output() argument 74 mbedtls_test_driver_pake_hooks.hits.output++; in mbedtls_test_transparent_pake_output() 81 memcpy(output, in mbedtls_test_transparent_pake_output() 97 operation, step, output, output_size, output_length); in mbedtls_test_transparent_pake_output() 101 operation, step, output, output_size, output_length); in mbedtls_test_transparent_pake_output() 105 (void) output; in mbedtls_test_transparent_pake_output() 151 uint8_t *output, size_t output_size, size_t *output_length) in mbedtls_test_transparent_pake_get_implicit_key() argument 164 operation, output, output_size, output_length); in mbedtls_test_transparent_pake_get_implicit_key() 168 operation, output, output_size, output_length); in mbedtls_test_transparent_pake_get_implicit_key() 171 (void) output; in mbedtls_test_transparent_pake_get_implicit_key()
|
/mbedtls-3.5.0/library/ |
D | nist_kw.c | 139 unsigned char *output, size_t *out_len, size_t out_size) in mbedtls_nist_kw_wrap() argument 170 memcpy(output, NIST_KW_ICV1, KW_SEMIBLOCK_LENGTH); in mbedtls_nist_kw_wrap() 171 memmove(output + KW_SEMIBLOCK_LENGTH, input, in_len); in mbedtls_nist_kw_wrap() 193 memcpy(output, NIST_KW_ICV2, KW_SEMIBLOCK_LENGTH / 2); in mbedtls_nist_kw_wrap() 194 MBEDTLS_PUT_UINT32_BE((in_len & 0xffffffff), output, in mbedtls_nist_kw_wrap() 197 memcpy(output + KW_SEMIBLOCK_LENGTH, input, in_len); in mbedtls_nist_kw_wrap() 198 memset(output + KW_SEMIBLOCK_LENGTH + in_len, 0, padlen); in mbedtls_nist_kw_wrap() 206 memcpy(inbuff, output, 16); in mbedtls_nist_kw_wrap() 208 inbuff, 16, output, &olen); in mbedtls_nist_kw_wrap() 213 unsigned char *R2 = output + KW_SEMIBLOCK_LENGTH; in mbedtls_nist_kw_wrap() [all …]
|
D | cipher.c | 520 size_t ilen, unsigned char *output, size_t *olen) in mbedtls_cipher_update() argument 552 ctx->operation, input, output))) { in mbedtls_cipher_update() 563 output, ilen, olen); in mbedtls_cipher_update() 571 output, ilen, olen); in mbedtls_cipher_update() 579 ilen, input, output); in mbedtls_cipher_update() 583 if (input == output && in mbedtls_cipher_update() 619 ctx->unprocessed_data, output))) { in mbedtls_cipher_update() 624 output += block_size; in mbedtls_cipher_update() 659 output))) { in mbedtls_cipher_update() 675 input, output))) { in mbedtls_cipher_update() [all …]
|
D | des.c | 608 unsigned char output[8]) in mbedtls_des_crypt_ecb() 627 MBEDTLS_PUT_UINT32_BE(Y, output, 0); in mbedtls_des_crypt_ecb() 628 MBEDTLS_PUT_UINT32_BE(X, output, 4); in mbedtls_des_crypt_ecb() 643 unsigned char *output) in mbedtls_des_crypt_cbc() argument 654 mbedtls_xor(output, input, iv, 8); in mbedtls_des_crypt_cbc() 656 ret = mbedtls_des_crypt_ecb(ctx, output, output); in mbedtls_des_crypt_cbc() 660 memcpy(iv, output, 8); in mbedtls_des_crypt_cbc() 663 output += 8; in mbedtls_des_crypt_cbc() 669 ret = mbedtls_des_crypt_ecb(ctx, input, output); in mbedtls_des_crypt_cbc() 674 mbedtls_xor(output, output, iv, 8); in mbedtls_des_crypt_cbc() [all …]
|
D | cipher_wrap.c | 116 const unsigned char *input, unsigned char *output) in aes_crypt_ecb_wrap() argument 118 return mbedtls_aes_crypt_ecb((mbedtls_aes_context *) ctx, operation, input, output); in aes_crypt_ecb_wrap() 123 unsigned char *iv, const unsigned char *input, unsigned char *output) in aes_crypt_cbc_wrap() argument 126 output); in aes_crypt_cbc_wrap() 133 const unsigned char *input, unsigned char *output) in aes_crypt_cfb128_wrap() argument 136 input, output); in aes_crypt_cfb128_wrap() 142 unsigned char *iv, const unsigned char *input, unsigned char *output) in aes_crypt_ofb_wrap() argument 145 iv, input, output); in aes_crypt_ofb_wrap() 152 const unsigned char *input, unsigned char *output) in aes_crypt_ctr_wrap() argument 155 stream_block, input, output); in aes_crypt_ctr_wrap() [all …]
|
D | chachapoly.c | 170 unsigned char *output) in mbedtls_chachapoly_update() argument 191 ret = mbedtls_chacha20_update(&ctx->chacha20_ctx, len, input, output); in mbedtls_chachapoly_update() 196 ret = mbedtls_poly1305_update(&ctx->poly1305_ctx, output, len); in mbedtls_chachapoly_update() 206 ret = mbedtls_chacha20_update(&ctx->chacha20_ctx, len, input, output); in mbedtls_chachapoly_update() 262 unsigned char *output, in chachapoly_crypt_and_tag() argument 277 ret = mbedtls_chachapoly_update(ctx, length, input, output); in chachapoly_crypt_and_tag() 294 unsigned char *output, in mbedtls_chachapoly_encrypt_and_tag() argument 299 input, output, tag); in mbedtls_chachapoly_encrypt_and_tag() 309 unsigned char *output) in mbedtls_chachapoly_auth_decrypt() argument 318 aad, aad_len, input, output, check_tag)) != 0) { in mbedtls_chachapoly_auth_decrypt() [all …]
|
/mbedtls-3.5.0/tests/src/ |
D | random.c | 42 unsigned char *output, in mbedtls_test_rnd_std_rand() argument 53 output[i] = rand(); in mbedtls_test_rnd_std_rand() 60 arc4random_buf(output, len); in mbedtls_test_rnd_std_rand() 67 unsigned char *output, in mbedtls_test_rnd_zero_rand() argument 74 memset(output, 0, len); in mbedtls_test_rnd_zero_rand() 80 unsigned char *output, in mbedtls_test_rnd_buffer_rand() argument 87 return mbedtls_test_rnd_std_rand(NULL, output, len); in mbedtls_test_rnd_buffer_rand() 96 memcpy(output, info->buf, use_len); in mbedtls_test_rnd_buffer_rand() 104 output + use_len, in mbedtls_test_rnd_buffer_rand() 115 unsigned char *output, in mbedtls_test_rnd_pseudo_rand() argument [all …]
|
/mbedtls-3.5.0/3rdparty/everest/library/ |
D | Hacl_Curve25519.c | 41 inline static void Hacl_Bignum_Fproduct_copy_from_wide_(uint64_t *output, uint128_t *input) in Hacl_Bignum_Fproduct_copy_from_wide_() argument 47 output[i] = (uint64_t)xi; in Hacl_Bignum_Fproduct_copy_from_wide_() 52 Hacl_Bignum_Fproduct_sum_scalar_multiplication_(uint128_t *output, uint64_t *input, uint64_t s) in Hacl_Bignum_Fproduct_sum_scalar_multiplication_() argument 57 uint128_t xi = output[i]; in Hacl_Bignum_Fproduct_sum_scalar_multiplication_() 59 output[i] = xi + (uint128_t)yi * s; in Hacl_Bignum_Fproduct_sum_scalar_multiplication_() 78 inline static void Hacl_Bignum_Fmul_shift_reduce(uint64_t *output) in Hacl_Bignum_Fmul_shift_reduce() argument 80 uint64_t tmp = output[4U]; in Hacl_Bignum_Fmul_shift_reduce() 87 uint64_t z = output[ctr - (uint32_t)1U]; in Hacl_Bignum_Fmul_shift_reduce() 88 output[ctr] = z; in Hacl_Bignum_Fmul_shift_reduce() 91 output[0U] = tmp; in Hacl_Bignum_Fmul_shift_reduce() [all …]
|
/mbedtls-3.5.0/3rdparty/everest/library/legacy/ |
D | Hacl_Curve25519.c | 45 Hacl_Bignum_Fproduct_copy_from_wide_(uint64_t *output, FStar_UInt128_uint128 *input) in Hacl_Bignum_Fproduct_copy_from_wide_() argument 51 output[i] = FStar_UInt128_uint128_to_uint64(xi); in Hacl_Bignum_Fproduct_copy_from_wide_() 57 FStar_UInt128_uint128 *output, in Hacl_Bignum_Fproduct_sum_scalar_multiplication_() argument 65 FStar_UInt128_uint128 xi = output[i]; in Hacl_Bignum_Fproduct_sum_scalar_multiplication_() 67 output[i] = FStar_UInt128_add_mod(xi, FStar_UInt128_mul_wide(yi, s)); in Hacl_Bignum_Fproduct_sum_scalar_multiplication_() 86 inline static void Hacl_Bignum_Fmul_shift_reduce(uint64_t *output) in Hacl_Bignum_Fmul_shift_reduce() argument 88 uint64_t tmp = output[4U]; in Hacl_Bignum_Fmul_shift_reduce() 95 uint64_t z = output[ctr - (uint32_t)1U]; in Hacl_Bignum_Fmul_shift_reduce() 96 output[ctr] = z; in Hacl_Bignum_Fmul_shift_reduce() 99 output[0U] = tmp; in Hacl_Bignum_Fmul_shift_reduce() [all …]
|
/mbedtls-3.5.0/include/mbedtls/ |
D | aes.h | 255 unsigned char output[16]); 305 unsigned char *output); 350 unsigned char *output); 400 unsigned char *output); 444 unsigned char *output); 499 unsigned char *output); 583 unsigned char *output); 600 unsigned char output[16]); 616 unsigned char output[16]);
|