Home
last modified time | relevance | path

Searched refs:hash_len (Results 1 – 17 of 17) sorted by relevance

/openthread-3.5.0/third_party/mbedtls/repo/library/
Dhkdf.c58 size_t hash_len; in mbedtls_hkdf_extract() local
65 hash_len = mbedtls_md_get_size( md ); in mbedtls_hkdf_extract()
67 if( hash_len == 0 ) in mbedtls_hkdf_extract()
73 salt_len = hash_len; in mbedtls_hkdf_extract()
83 size_t hash_len; in mbedtls_hkdf_expand() local
97 hash_len = mbedtls_md_get_size( md ); in mbedtls_hkdf_expand()
99 if( prk_len < hash_len || hash_len == 0 ) in mbedtls_hkdf_expand()
110 n = okm_len / hash_len; in mbedtls_hkdf_expand()
112 if( okm_len % hash_len != 0 ) in mbedtls_hkdf_expand()
133 memset( t, 0, hash_len ); in mbedtls_hkdf_expand()
[all …]
Dpk.c234 static inline int pk_hashlen_helper( mbedtls_md_type_t md_alg, size_t *hash_len ) in pk_hashlen_helper() argument
238 if( *hash_len != 0 && md_alg == MBEDTLS_MD_NONE ) in pk_hashlen_helper()
244 if ( *hash_len != 0 && *hash_len != mbedtls_md_get_size( md_info ) ) in pk_hashlen_helper()
247 *hash_len = mbedtls_md_get_size( md_info ); in pk_hashlen_helper()
280 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify_restartable() argument
285 PK_VALIDATE_RET( ( md_alg == MBEDTLS_MD_NONE && hash_len == 0 ) || in mbedtls_pk_verify_restartable()
290 pk_hashlen_helper( md_alg, &hash_len ) != 0 ) in mbedtls_pk_verify_restartable()
305 md_alg, hash, hash_len, sig, sig_len, rs_ctx->rs_ctx ); in mbedtls_pk_verify_restartable()
319 return( ctx->pk_info->verify_func( ctx->pk_ctx, md_alg, hash, hash_len, in mbedtls_pk_verify_restartable()
327 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify() argument
[all …]
Dpk_wrap.c78 const unsigned char *hash, size_t hash_len, in rsa_verify_wrap() argument
86 if( md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len ) in rsa_verify_wrap()
95 (unsigned int) hash_len, hash, sig ) ) != 0 ) in rsa_verify_wrap()
110 const unsigned char *hash, size_t hash_len, in rsa_sign_wrap() argument
117 if( md_alg == MBEDTLS_MD_NONE && UINT_MAX < hash_len ) in rsa_sign_wrap()
124 md_alg, (unsigned int) hash_len, hash, sig ) ); in rsa_sign_wrap()
234 const unsigned char *hash, size_t hash_len,
238 const unsigned char *hash, size_t hash_len,
243 const unsigned char *hash, size_t hash_len, in eckey_verify_wrap() argument
252 ret = ecdsa_verify_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len ); in eckey_verify_wrap()
[all …]
Dx509write_csr.c152 size_t hash_len; in x509write_csr_der_internal() local
227 if( psa_hash_finish( &hash_operation, hash, sizeof( hash ), &hash_len ) in x509write_csr_der_internal()
Dssl_tls.c3508 int ret, hash_len; in mbedtls_ssl_write_finished() local
3522 hash_len = ( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_0 ) ? 36 : 12; in mbedtls_ssl_write_finished()
3525 ssl->verify_data_len = hash_len; in mbedtls_ssl_write_finished()
3526 memcpy( ssl->own_verify_data, ssl->out_msg + 4, hash_len ); in mbedtls_ssl_write_finished()
3529 ssl->out_msglen = 4 + hash_len; in mbedtls_ssl_write_finished()
3633 unsigned int hash_len; in mbedtls_ssl_parse_finished() local
3641 hash_len = 36; in mbedtls_ssl_parse_finished()
3644 hash_len = 12; in mbedtls_ssl_parse_finished()
3664 ssl->in_hslen != mbedtls_ssl_hs_hdr_len( ssl ) + hash_len ) in mbedtls_ssl_parse_finished()
3674 buf, hash_len ) != 0 ) in mbedtls_ssl_parse_finished()
[all …]
Dx509_crt.c2429 size_t hash_len; in x509_crt_check_signature() local
2433 hash_len = mbedtls_md_get_size( md_info ); in x509_crt_check_signature()
2451 if( psa_hash_finish( &hash_operation, hash, sizeof( hash ), &hash_len ) in x509_crt_check_signature()
2465 child->sig_md, hash, hash_len, in x509_crt_check_signature()
2473 child->sig_md, hash, hash_len, in x509_crt_check_signature()
/openthread-3.5.0/third_party/mbedtls/repo/include/mbedtls/
Dpk_internal.h50 const unsigned char *hash, size_t hash_len,
55 const unsigned char *hash, size_t hash_len,
63 const unsigned char *hash, size_t hash_len,
69 const unsigned char *hash, size_t hash_len,
Dpk.h440 const unsigned char *hash, size_t hash_len,
465 const unsigned char *hash, size_t hash_len,
500 const unsigned char *hash, size_t hash_len,
534 const unsigned char *hash, size_t hash_len,
568 const unsigned char *hash, size_t hash_len,
Dssl.h775 size_t hash_len );
/openthread-3.5.0/third_party/mbedtls/repo/tests/suites/
Dtest_suite_hkdf.data1 HKDF extract fails with hash_len of 0
7 HKDF expand fails with hash_len of 0
10 HKDF expand fails with prk_len < hash_len
13 HKDF expand fails with okm_len / hash_len > 255
Dtest_suite_hkdf.function103 void test_hkdf_extract_ret( int hash_len, int ret )
114 fake_md_info.size = hash_len;
130 void test_hkdf_expand_ret( int hash_len, int prk_len, int okm_len, int ret )
141 fake_md_info.size = hash_len;
Dtest_suite_pk.function706 size_t hash_len;
724 hash_len = 0;
729 hash_len = message_str->len;
745 digest, hash_result, hash_len,
886 size_t sig_len, hash_len;
902 hash_len = mbedtls_md_get_size( mbedtls_md_info_from_type( md ) );
903 ASSERT_ALLOC( hash, hash_len );
908 memset( hash, 0x2a, hash_len );
915 hash, hash_len, sig, &sig_len,
923 hash, hash_len, sig, sig_len ) == verify_ret );
[all …]
Dtest_suite_pkcs1_v21.function226 size_t hash_len;
245 hash_len = 0;
250 hash_len = message_str->len;
254 msg_digest_id, hash_len, hash_result,
258 msg_digest_id, hash_len, hash_result,
Dtest_suite_psa_crypto.function1674 size_t hash_len;
1706 hash, sizeof( hash ), &hash_len ) );
1720 hash, sizeof( hash ), &hash_len ) );
1740 hash, sizeof( hash ), &hash_len ),
1747 hash, sizeof( hash ), &hash_len ) );
1749 hash, sizeof( hash ), &hash_len ),
1758 hash, sizeof( hash ), &hash_len ),
1813 size_t hash_len;
1820 hash, expected_size - 1, &hash_len ),
1838 size_t hash_len;
[all …]
Dtest_suite_pk.data238 RSA hash_len overflow (size_t vs unsigned int)
/openthread-3.5.0/third_party/mbedtls/repo/programs/ssl/
Dssl_server2.c1104 size_t hash_len ) in ssl_async_sign() argument
1108 hash, hash_len ) ); in ssl_async_sign()
/openthread-3.5.0/third_party/mbedtls/repo/
DChangeLog278 nonzero. Before, for RSA, hash_len was ignored in favor of the length of