/mbedtls-latest/tests/suites/ |
D | test_suite_mps.function | 46 unsigned char *tmp; 62 TEST_ASSERT(mbedtls_mps_reader_get(&rd, 100, &tmp, NULL) == 0); 63 TEST_MEMORY_COMPARE(tmp, 100, bufA, 100); 94 unsigned char *tmp; 112 TEST_ASSERT(mbedtls_mps_reader_get(&rd, 100, &tmp, NULL) == 0); 113 TEST_MEMORY_COMPARE(tmp, 100, bufA, 100); 119 TEST_ASSERT(mbedtls_mps_reader_get(&rd, 100, &tmp, NULL) == 0); 120 TEST_MEMORY_COMPARE(tmp, 100, bufB, 100); 153 unsigned char *tmp; 168 TEST_ASSERT(mbedtls_mps_reader_get(&rd, 10, &tmp, NULL) == 0); [all …]
|
D | test_suite_lms.data | 24 # * cp ../framework/data_files/lms_pyhsslms_sha256_m32_h5_lmots_sha256_n32_w8_prv tmp/lms.prv 25 # * cp ../framework/data_files/lms_pyhsslms_sha256_m32_h5_lmots_sha256_n32_w8_pub tmp/lms.pub 29 # private_key = pyhsslms.HssLmsPrivateKey('tmp/lms') 64 # * cp ../framework/data_files/lms_pyhsslms_sha256_m32_h5_lmots_sha256_n32_w8_prv tmp/lms.prv 66 # * hsslms sign tmp/lms.prv message.bin (incorrect signature using leaf node 0) 68 # * hsslms sign tmp/lms.prv message.bin (incorrect signature using leaf node 1) 70 # * hsslms sign tmp/lms.prv message.bin (correct signature using leaf node 2) 78 # * cp ../framework/data_files/lms_pyhsslms_sha256_m32_h5_lmots_sha256_n32_w8 tmp/lms.pub 79 # * hsslms verify tmp/lms message.bin 96 # * cp ../framework/data_files/lms_hash-sigs_sha256_m32_h5_lmots_sha256_n32_w8_prv tmp/lms.prv [all …]
|
D | test_suite_bignum_mod_raw.function | 341 mbedtls_mpi_uint *tmp = NULL; 359 TEST_CALLOC(tmp, limbs); 360 memcpy(tmp, X, bytes); 363 mbedtls_mpi_uint c = mbedtls_mpi_core_sub(tmp, X, N, limbs); 364 TEST_ASSERT(c || mbedtls_mpi_core_lt_ct(tmp, N, limbs)); 375 mbedtls_free(tmp);
|
D | test_suite_cmac.function | 107 unsigned char tmp[16]; 123 buf, 16, tmp)) != 0);
|
/mbedtls-latest/programs/test/ |
D | benchmark.c | 120 mbedtls_strerror(ret, (char *) tmp, sizeof(tmp)); \ 121 mbedtls_printf("FAILED: %s\n", tmp); 520 unsigned char tmp[200]; in main() local 625 memset(tmp, 0xBB, sizeof(tmp)); in main() 633 TIME_AND_TSC("MD5", mbedtls_md5(buf, BUFSIZE, tmp)); in main() 639 TIME_AND_TSC("RIPEMD160", mbedtls_ripemd160(buf, BUFSIZE, tmp)); in main() 645 TIME_AND_TSC("SHA-1", mbedtls_sha1(buf, BUFSIZE, tmp)); in main() 651 TIME_AND_TSC("SHA-256", mbedtls_sha256(buf, BUFSIZE, tmp, 0)); in main() 657 TIME_AND_TSC("SHA-512", mbedtls_sha512(buf, BUFSIZE, tmp, 0)); in main() 662 TIME_AND_TSC("SHA3-224", mbedtls_sha3(MBEDTLS_SHA3_224, buf, BUFSIZE, tmp, 28)); in main() [all …]
|
/mbedtls-latest/scripts/ |
D | bump_version.sh | 73 sed -e "s/ VERSION [0-9.]\{1,\}/ VERSION $VERSION/g" < CMakeLists.txt > tmp 74 mv tmp CMakeLists.txt 77 sed -e "s/ VERSION [0-9.]\{1,\}/ VERSION $VERSION/g" < library/CMakeLists.txt > tmp 78 mv tmp library/CMakeLists.txt 83 …d -e "/mbedcrypto/ s/ SOVERSION [0-9]\{1,\}/ SOVERSION $SO_CRYPTO/g" < library/CMakeLists.txt > tmp 84 mv tmp library/CMakeLists.txt 87 sed -e "s/SOEXT_CRYPTO?=so.[0-9]\{1,\}/SOEXT_CRYPTO?=so.$SO_CRYPTO/g" < library/Makefile > tmp 88 mv tmp library/Makefile 94 sed -e "/mbedx509/ s/ SOVERSION [0-9]\{1,\}/ SOVERSION $SO_X509/g" < library/CMakeLists.txt > tmp 95 mv tmp library/CMakeLists.txt [all …]
|
D | lcov.sh | 47 mkdir Coverage Coverage/tmp 53 COVTMP=$PWD/Coverage/tmp
|
/mbedtls-latest/library/ |
D | ecp.c | 1203 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_mpi(&tmp, &grp->P, (X))); \ 1204 MBEDTLS_MPI_CHK(mbedtls_mpi_safe_cond_assign((X), &tmp, \ 1462 mbedtls_mpi tmp; in ecp_safe_invert_jac() local 1463 mbedtls_mpi_init(&tmp); in ecp_safe_invert_jac() 1468 mbedtls_mpi_free(&tmp); in ecp_safe_invert_jac() 1488 mbedtls_mpi tmp[4]) in ecp_double_jac() 1508 MPI_ECP_SQR(&tmp[1], &P->Z); in ecp_double_jac() 1509 MPI_ECP_ADD(&tmp[2], &P->X, &tmp[1]); in ecp_double_jac() 1510 MPI_ECP_SUB(&tmp[3], &P->X, &tmp[1]); in ecp_double_jac() 1511 MPI_ECP_MUL(&tmp[1], &tmp[2], &tmp[3]); in ecp_double_jac() [all …]
|
D | pkwrite.c | 67 uint8_t tmp[PSA_EXPORT_KEY_PAIR_MAX_SIZE]; in pk_write_rsa_der() local 70 if (psa_export_key(pk->priv_id, tmp, sizeof(tmp), &tmp_len) != PSA_SUCCESS) { in pk_write_rsa_der() 75 mbedtls_platform_zeroize(tmp, sizeof(tmp)); in pk_write_rsa_der() 79 memcpy(*p, tmp, tmp_len); in pk_write_rsa_der() 80 mbedtls_platform_zeroize(tmp, sizeof(tmp)); in pk_write_rsa_der() 169 unsigned char tmp[PK_MAX_EC_KEY_PAIR_SIZE]; in pk_write_ec_private() local 173 status = psa_export_key(pk->priv_id, tmp, sizeof(tmp), &byte_length); in pk_write_ec_private() 179 status = psa_export_key(pk->priv_id, tmp, sizeof(tmp), &byte_length); in pk_write_ec_private() 186 ret = mbedtls_asn1_write_octet_string(p, start, tmp, byte_length); in pk_write_ec_private() 188 mbedtls_platform_zeroize(tmp, sizeof(tmp)); in pk_write_ec_private() [all …]
|
D | ctr_drbg.c | 166 unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN]; in block_cipher_df() local 256 memcpy(tmp + j, chain, MBEDTLS_CTR_DRBG_BLOCKSIZE); in block_cipher_df() 270 status = ctr_drbg_setup_psa_context(&psa_ctx, tmp, MBEDTLS_CTR_DRBG_KEYSIZE); in block_cipher_df() 276 if ((ret = mbedtls_aes_setkey_enc(&aes_ctx, tmp, in block_cipher_df() 281 iv = tmp + MBEDTLS_CTR_DRBG_KEYSIZE; in block_cipher_df() 311 mbedtls_platform_zeroize(tmp, sizeof(tmp)); in block_cipher_df() 335 unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN]; in ctr_drbg_update_internal() local 336 unsigned char *p = tmp; in ctr_drbg_update_internal() 344 memset(tmp, 0, MBEDTLS_CTR_DRBG_SEEDLEN); in ctr_drbg_update_internal() 372 mbedtls_xor(tmp, tmp, data, MBEDTLS_CTR_DRBG_SEEDLEN); in ctr_drbg_update_internal() [all …]
|
D | sha256.c | 342 uint32x4_t tmp, abcd_prev; in mbedtls_internal_sha256_process_many_a64_crypto() local 361 tmp = vaddq_u32(sched0, vld1q_u32(&K[0])); in mbedtls_internal_sha256_process_many_a64_crypto() 363 abcd = vsha256hq_u32(abcd_prev, efgh, tmp); in mbedtls_internal_sha256_process_many_a64_crypto() 364 efgh = vsha256h2q_u32(efgh, abcd_prev, tmp); in mbedtls_internal_sha256_process_many_a64_crypto() 367 tmp = vaddq_u32(sched1, vld1q_u32(&K[4])); in mbedtls_internal_sha256_process_many_a64_crypto() 369 abcd = vsha256hq_u32(abcd_prev, efgh, tmp); in mbedtls_internal_sha256_process_many_a64_crypto() 370 efgh = vsha256h2q_u32(efgh, abcd_prev, tmp); in mbedtls_internal_sha256_process_many_a64_crypto() 373 tmp = vaddq_u32(sched2, vld1q_u32(&K[8])); in mbedtls_internal_sha256_process_many_a64_crypto() 375 abcd = vsha256hq_u32(abcd_prev, efgh, tmp); in mbedtls_internal_sha256_process_many_a64_crypto() 376 efgh = vsha256h2q_u32(efgh, abcd_prev, tmp); in mbedtls_internal_sha256_process_many_a64_crypto() [all …]
|
D | psa_crypto_mac.c | 116 uint8_t tmp[PSA_HASH_MAX_SIZE]; in psa_hmac_finish_internal() local 122 status = psa_hash_finish(&hmac->hash_ctx, tmp, sizeof(tmp), &hash_size); in psa_hmac_finish_internal() 138 status = psa_hash_update(&hmac->hash_ctx, tmp, hash_size); in psa_hmac_finish_internal() 143 status = psa_hash_finish(&hmac->hash_ctx, tmp, sizeof(tmp), &hash_size); in psa_hmac_finish_internal() 148 memcpy(mac, tmp, mac_size); in psa_hmac_finish_internal() 151 mbedtls_platform_zeroize(tmp, hash_size); in psa_hmac_finish_internal() 378 uint8_t tmp[PSA_BLOCK_CIPHER_BLOCK_MAX_SIZE]; in psa_mac_finish_internal() local 379 int ret = mbedtls_cipher_cmac_finish(&operation->ctx.cmac, tmp); in psa_mac_finish_internal() 381 memcpy(mac, tmp, mac_size); in psa_mac_finish_internal() 383 mbedtls_platform_zeroize(tmp, sizeof(tmp)); in psa_mac_finish_internal()
|
D | entropy.c | 128 unsigned char tmp[MBEDTLS_ENTROPY_BLOCK_SIZE]; in entropy_update() local 135 data, len, tmp)) != 0) { in entropy_update() 138 p = tmp; in entropy_update() 168 mbedtls_platform_zeroize(tmp, sizeof(tmp)); in entropy_update()
|
D | aes.c | 1201 unsigned char tmp[16]; in mbedtls_aes_crypt_xts() local 1235 mbedtls_xor(tmp, input, tweak, 16); in mbedtls_aes_crypt_xts() 1237 ret = mbedtls_aes_crypt_ecb(&ctx->crypt, mode, tmp, tmp); in mbedtls_aes_crypt_xts() 1242 mbedtls_xor(output, tmp, tweak, 16); in mbedtls_aes_crypt_xts() 1268 mbedtls_xor(tmp, input, t, leftover); in mbedtls_aes_crypt_xts() 1272 mbedtls_xor(tmp + i, prev_output + i, t + i, 16 - i); in mbedtls_aes_crypt_xts() 1274 ret = mbedtls_aes_crypt_ecb(&ctx->crypt, mode, tmp, tmp); in mbedtls_aes_crypt_xts() 1281 mbedtls_xor(prev_output, tmp, t, 16); in mbedtls_aes_crypt_xts() 1997 unsigned char tmp[16]; in mbedtls_aes_self_test() local 1999 memcpy(tmp, prv, 16); in mbedtls_aes_self_test() [all …]
|
D | bignum_core.c | 103 mbedtls_mpi_uint tmp; in mbedtls_mpi_core_bigendian_to_host() local 106 tmp = mpi_bigendian_to_host(*cur_limb_left); in mbedtls_mpi_core_bigendian_to_host() 108 *cur_limb_right = tmp; in mbedtls_mpi_core_bigendian_to_host() 197 mbedtls_mpi_uint tmp = X[i]; in mbedtls_mpi_core_cond_swap() local 199 Y[i] = mbedtls_ct_mpi_uint_if(swap, tmp, Y[i]); in mbedtls_mpi_core_cond_swap()
|
D | des.c | 989 unsigned char tmp[8]; in mbedtls_des_self_test() local 1000 memcpy(tmp, prv, 8); in mbedtls_des_self_test() 1002 memcpy(buf, tmp, 8); in mbedtls_des_self_test()
|
D | md.c | 1029 unsigned char tmp[MBEDTLS_MD_MAX_SIZE]; in mbedtls_md_hmac_finish() local 1038 if ((ret = mbedtls_md_finish(ctx, tmp)) != 0) { in mbedtls_md_hmac_finish() 1048 if ((ret = mbedtls_md_update(ctx, tmp, in mbedtls_md_hmac_finish()
|
D | ssl_tls.c | 6799 unsigned char *tmp; in tls_prf_generic() local 6815 tmp = mbedtls_calloc(1, tmp_len); in tls_prf_generic() 6816 if (tmp == NULL) { in tls_prf_generic() 6822 memcpy(tmp + md_len, label, nb); in tls_prf_generic() 6823 memcpy(tmp + md_len + nb, random, rlen); in tls_prf_generic() 6837 ret = mbedtls_md_hmac_update(&md_ctx, tmp + md_len, nb); in tls_prf_generic() 6841 ret = mbedtls_md_hmac_finish(&md_ctx, tmp); in tls_prf_generic() 6851 ret = mbedtls_md_hmac_update(&md_ctx, tmp, md_len + nb); in tls_prf_generic() 6864 ret = mbedtls_md_hmac_update(&md_ctx, tmp, md_len); in tls_prf_generic() 6868 ret = mbedtls_md_hmac_finish(&md_ctx, tmp); in tls_prf_generic() [all …]
|
D | sha3.c | 98 #define SWAP(x, y) do { uint64_t tmp = (x); (x) = (y); (y) = tmp; } while (0)
|
/mbedtls-latest/3rdparty/everest/library/ |
D | Hacl_Curve25519.c | 63 inline static void Hacl_Bignum_Fproduct_carry_wide_(uint128_t *tmp) in Hacl_Bignum_Fproduct_carry_wide_() argument 69 uint128_t tctr = tmp[ctr]; in Hacl_Bignum_Fproduct_carry_wide_() 70 uint128_t tctrp1 = tmp[ctr + (uint32_t)1U]; in Hacl_Bignum_Fproduct_carry_wide_() 73 tmp[ctr] = (uint128_t)r0; in Hacl_Bignum_Fproduct_carry_wide_() 74 tmp[ctr + (uint32_t)1U] = tctrp1 + c; in Hacl_Bignum_Fproduct_carry_wide_() 80 uint64_t tmp = output[4U]; in Hacl_Bignum_Fmul_shift_reduce() local 91 output[0U] = tmp; in Hacl_Bignum_Fmul_shift_reduce() 117 uint64_t tmp[5U] = { 0U }; in Hacl_Bignum_Fmul_fmul() local 118 memcpy(tmp, input, (uint32_t)5U * sizeof input[0U]); in Hacl_Bignum_Fmul_fmul() 136 Hacl_Bignum_Fmul_mul_shift_reduce_(t, tmp, input2); in Hacl_Bignum_Fmul_fmul() [all …]
|
/mbedtls-latest/3rdparty/everest/library/legacy/ |
D | Hacl_Curve25519.c | 71 inline static void Hacl_Bignum_Fproduct_carry_wide_(FStar_UInt128_uint128 *tmp) in Hacl_Bignum_Fproduct_carry_wide_() argument 77 FStar_UInt128_uint128 tctr = tmp[ctr]; in Hacl_Bignum_Fproduct_carry_wide_() 78 FStar_UInt128_uint128 tctrp1 = tmp[ctr + (uint32_t)1U]; in Hacl_Bignum_Fproduct_carry_wide_() 81 tmp[ctr] = FStar_UInt128_uint64_to_uint128(r0); in Hacl_Bignum_Fproduct_carry_wide_() 82 tmp[ctr + (uint32_t)1U] = FStar_UInt128_add(tctrp1, c); in Hacl_Bignum_Fproduct_carry_wide_() 88 uint64_t tmp = output[4U]; in Hacl_Bignum_Fmul_shift_reduce() local 99 output[0U] = tmp; in Hacl_Bignum_Fmul_shift_reduce() 129 uint64_t tmp[5U] = { 0U }; in Hacl_Bignum_Fmul_fmul() local 130 memcpy(tmp, input, (uint32_t)5U * sizeof input[0U]); in Hacl_Bignum_Fmul_fmul() 148 Hacl_Bignum_Fmul_mul_shift_reduce_(t, tmp, input2); in Hacl_Bignum_Fmul_fmul() [all …]
|
/mbedtls-latest/tests/docker/bionic/ |
D | Dockerfile | 62 RUN cd /tmp \ 68 && rm -rf /tmp/openssl* 72 RUN cd /tmp \ 78 && rm -rf /tmp/openssl* 83 RUN cd /tmp \ 89 && rm -rf /tmp/openssl* 93 RUN cd /tmp \ 100 && rm -rf /tmp/nettle* 103 RUN cd /tmp \ 109 && rm -rf /tmp/gnutls* [all …]
|
/mbedtls-latest/tests/scripts/ |
D | set_psa_test_dependencies.py | 259 tmp = file_name + '.tmp' 260 with open(tmp, 'w', encoding='utf-8') as new_file: 263 os.replace(tmp, file_name)
|
D | docker_env.sh | 86 -e PYLINTHOME=/tmp/.pylintd \
|
/mbedtls-latest/tests/ |
D | ssl-opt.sh | 457 tmp="${CMD_LINE##*\ force_version=}" 458 tmp="${tmp%%[!-0-9A-Z_a-z]*}" 459 requires_protocol_version "$tmp";; 464 tmp="${CMD_LINE##*\ force_ciphersuite=}" 465 tmp="${tmp%%[!-0-9A-Z_a-z]*}" 466 requires_ciphersuite_enabled "$tmp";; 525 unset tmp
|