/openthread-3.6.0/third_party/mbedtls/repo/programs/hash/ |
D | generic_sum.c | 54 static int generic_wrapper( const mbedtls_md_info_t *md_info, char *filename, unsigned char *sum ) in generic_wrapper() argument 56 int ret = mbedtls_md_file( md_info, filename, sum ); in generic_wrapper() 67 static int generic_print( const mbedtls_md_info_t *md_info, char *filename ) in generic_print() argument 72 if( generic_wrapper( md_info, filename, sum ) != 0 ) in generic_print() 75 for( i = 0; i < mbedtls_md_get_size( md_info ); i++ ) in generic_print() 82 static int generic_check( const mbedtls_md_info_t *md_info, char *filename ) in generic_check() argument 115 if( n < (size_t) 2 * mbedtls_md_get_size( md_info ) + 4 ) in generic_check() 117 mbedtls_printf("No '%s' hash found on line.\n", mbedtls_md_get_name( md_info )); in generic_check() 121 …if( line[2 * mbedtls_md_get_size( md_info )] != ' ' || line[2 * mbedtls_md_get_size( md_info ) + 1… in generic_check() 123 mbedtls_printf("No '%s' hash found on line.\n", mbedtls_md_get_name( md_info )); in generic_check() [all …]
|
/openthread-3.6.0/third_party/mbedtls/repo/library/ |
D | md.c | 272 if( ctx == NULL || ctx->md_info == NULL ) in mbedtls_md_free() 277 switch( ctx->md_info->type ) in mbedtls_md_free() 328 2 * ctx->md_info->block_size ); in mbedtls_md_free() 338 if( dst == NULL || dst->md_info == NULL || in mbedtls_md_clone() 339 src == NULL || src->md_info == NULL || in mbedtls_md_clone() 340 dst->md_info != src->md_info ) in mbedtls_md_clone() 345 switch( src->md_info->type ) in mbedtls_md_clone() 394 int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info ) in mbedtls_md_init_ctx() argument 396 return mbedtls_md_setup( ctx, md_info, 1 ); in mbedtls_md_init_ctx() 409 int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ) in mbedtls_md_setup() argument [all …]
|
D | ecjpake.c | 61 ctx->md_info = NULL; in mbedtls_ecjpake_init() 84 ctx->md_info = NULL; in mbedtls_ecjpake_free() 117 if( ( ctx->md_info = mbedtls_md_info_from_type( hash ) ) == NULL ) in mbedtls_ecjpake_setup() 138 if( ctx->md_info == NULL || in mbedtls_ecjpake_check() 185 static int ecjpake_hash( const mbedtls_md_info_t *md_info, in ecjpake_hash() argument 219 MBEDTLS_MPI_CHK( mbedtls_md( md_info, buf, p - buf, hash ) ); in ecjpake_hash() 223 mbedtls_md_get_size( md_info ) ) ); in ecjpake_hash() 233 static int ecjpake_zkp_read( const mbedtls_md_info_t *md_info, in ecjpake_zkp_read() argument 283 MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_read() 305 static int ecjpake_zkp_write( const mbedtls_md_info_t *md_info, in ecjpake_zkp_write() argument [all …]
|
D | hmac_drbg.c | 66 size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info ); in mbedtls_hmac_drbg_update_ret() 120 const mbedtls_md_info_t * md_info, in mbedtls_hmac_drbg_seed_buf() argument 125 if( ( ret = mbedtls_md_setup( &ctx->md_ctx, md_info, 1 ) ) != 0 ) in mbedtls_hmac_drbg_seed_buf() 138 mbedtls_md_get_size( md_info ) ) ) != 0 ) in mbedtls_hmac_drbg_seed_buf() 140 memset( ctx->V, 0x01, mbedtls_md_get_size( md_info ) ); in mbedtls_hmac_drbg_seed_buf() 245 const mbedtls_md_info_t * md_info, in mbedtls_hmac_drbg_seed() argument 254 if( ( ret = mbedtls_md_setup( &ctx->md_ctx, md_info, 1 ) ) != 0 ) in mbedtls_hmac_drbg_seed() 262 md_size = mbedtls_md_get_size( md_info ); in mbedtls_hmac_drbg_seed() 334 size_t md_len = mbedtls_md_get_size( ctx->md_ctx.md_info ); in mbedtls_hmac_drbg_random_with_add() 430 if( ctx->md_ctx.md_info != NULL ) in mbedtls_hmac_drbg_free() [all …]
|
D | pkcs12.c | 275 const mbedtls_md_info_t *md_info; in mbedtls_pkcs12_derivation() local 291 md_info = mbedtls_md_info_from_type( md_type ); in mbedtls_pkcs12_derivation() 292 if( md_info == NULL ) in mbedtls_pkcs12_derivation() 297 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_pkcs12_derivation() 299 hlen = mbedtls_md_get_size( md_info ); in mbedtls_pkcs12_derivation() 346 if( ( ret = mbedtls_md( md_info, hash_output, hlen, hash_output ) ) != 0 ) in mbedtls_pkcs12_derivation()
|
D | rsa.c | 1103 hlen = mbedtls_md_get_size( md_ctx->md_info ); in mgf_mask() 1155 const mbedtls_md_info_t *md_info; in mbedtls_rsa_rsaes_oaep_encrypt() local 1171 md_info = mbedtls_md_info_from_type( (mbedtls_md_type_t) ctx->hash_id ); in mbedtls_rsa_rsaes_oaep_encrypt() 1172 if( md_info == NULL ) in mbedtls_rsa_rsaes_oaep_encrypt() 1176 hlen = mbedtls_md_get_size( md_info ); in mbedtls_rsa_rsaes_oaep_encrypt() 1193 if( ( ret = mbedtls_md( md_info, label, label_len, p ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() 1202 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() 1355 const mbedtls_md_info_t *md_info; in mbedtls_rsa_rsaes_oaep_decrypt() local 1377 md_info = mbedtls_md_info_from_type( (mbedtls_md_type_t) ctx->hash_id ); in mbedtls_rsa_rsaes_oaep_decrypt() 1378 if( md_info == NULL ) in mbedtls_rsa_rsaes_oaep_decrypt() [all …]
|
D | pkcs5.c | 121 const mbedtls_md_info_t *md_info; in mbedtls_pkcs5_pbes2() local 156 md_info = mbedtls_md_info_from_type( md_type ); in mbedtls_pkcs5_pbes2() 157 if( md_info == NULL ) in mbedtls_pkcs5_pbes2() 190 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 1 ) ) != 0 ) in mbedtls_pkcs5_pbes2() 229 unsigned char md_size = mbedtls_md_get_size( ctx->md_info ); in mbedtls_pkcs5_pbkdf2_hmac()
|
D | psa_crypto_random_impl.h | 193 const mbedtls_md_info_t *md_info = in mbedtls_psa_drbg_seed() 196 md_info, in mbedtls_psa_drbg_seed()
|
D | pkcs11.c | 184 const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); in mbedtls_pkcs11_sign() local 185 if( md_info == NULL ) in mbedtls_pkcs11_sign() 191 hashlen = mbedtls_md_get_size( md_info ); in mbedtls_pkcs11_sign()
|
D | psa_crypto_rsa.c | 327 const mbedtls_md_info_t *md_info = mbedtls_md_info_from_psa( hash_alg ); in psa_rsa_decode_md_type() local 328 *md_alg = mbedtls_md_get_type( md_info ); in psa_rsa_decode_md_type() 341 if( md_info == NULL ) in psa_rsa_decode_md_type() 343 if( mbedtls_md_get_size( md_info ) != hash_length ) in psa_rsa_decode_md_type()
|
D | pk.c | 236 const mbedtls_md_info_t *md_info; in pk_hashlen_helper() local 241 if( ( md_info = mbedtls_md_info_from_type( md_alg ) ) == NULL ) 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()
|
D | constant_time.c | 463 const mbedtls_md_type_t md_alg = mbedtls_md_get_type( ctx->md_info ); in mbedtls_ct_hmac() 469 const size_t hash_size = mbedtls_md_get_size( ctx->md_info ); in mbedtls_ct_hmac() 485 MD_CHK( mbedtls_md_setup( &aux, ctx->md_info, 0 ) ); in mbedtls_ct_hmac()
|
/openthread-3.6.0/third_party/mbedtls/repo/tests/suites/ |
D | test_suite_md.function | 106 void md_info( int md_type, char * md_name, int md_size ) 108 const mbedtls_md_info_t *md_info; 112 md_info = mbedtls_md_info_from_type( md_type ); 113 TEST_ASSERT( md_info != NULL ); 114 TEST_ASSERT( md_info == mbedtls_md_info_from_string( md_name ) ); 116 TEST_ASSERT( mbedtls_md_get_type( md_info ) == (mbedtls_md_type_t) md_type ); 117 TEST_ASSERT( mbedtls_md_get_size( md_info ) == (unsigned char) md_size ); 118 TEST_ASSERT( strcmp( mbedtls_md_get_name( md_info ), md_name ) == 0 ); 135 const mbedtls_md_info_t *md_info = NULL; 143 md_info = mbedtls_md_info_from_string(md_name); [all …]
|
D | test_suite_hmac_drbg.function | 37 const mbedtls_md_info_t *md_info; 51 md_info = mbedtls_md_info_from_type( md_alg ); 52 TEST_ASSERT( md_info != NULL ); 53 if( mbedtls_md_get_size( md_info ) <= 20 ) 55 else if( mbedtls_md_get_size( md_info ) <= 28 ) 64 TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, mbedtls_test_entropy_func, &entropy, 128 const mbedtls_md_info_t *md_info; 133 md_info = mbedtls_md_info_from_type( md_alg ); 134 TEST_ASSERT( md_info != NULL ); 136 TEST_ASSERT( mbedtls_hmac_drbg_seed( &ctx, md_info, [all …]
|
D | test_suite_ecdsa.function | 349 const mbedtls_md_info_t *md_info; 361 md_info = mbedtls_md_info_from_type( md_alg ); 362 TEST_ASSERT( md_info != NULL ); 363 hlen = mbedtls_md_get_size( md_info ); 364 TEST_ASSERT( mbedtls_md( md_info, (const unsigned char *) msg, 580 const mbedtls_md_info_t *md_info; 590 md_info = mbedtls_md_info_from_type( md_alg ); 591 TEST_ASSERT( md_info != NULL ); 593 hlen = mbedtls_md_get_size( md_info ); 594 TEST_ASSERT( mbedtls_md( md_info,
|
D | test_suite_random.function | 67 const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_type ); 72 TEST_EQUAL( 0, mbedtls_hmac_drbg_seed( &drbg, md_info, 83 TEST_EQUAL( 0, mbedtls_hmac_drbg_seed( &drbg, md_info,
|
D | test_suite_x509write.function | 36 const mbedtls_md_info_t *md_info; 48 md_info = mbedtls_md_info_from_type( csr.sig_md ); 49 if( mbedtls_md( md_info, csr.cri.p, csr.cri.len, hash ) != 0 ) 57 csr.sig_md, hash, mbedtls_md_get_size( md_info ),
|
D | test_suite_entropy.function | 432 const mbedtls_md_info_t *md_info = 435 const mbedtls_md_info_t *md_info = 481 TEST_ASSERT( mbedtls_md_setup( &accumulator, md_info, 0 ) == 0 ); 495 TEST_ASSERT( mbedtls_md( md_info, buf, MBEDTLS_ENTROPY_BLOCK_SIZE, 510 TEST_ASSERT( mbedtls_md( md_info, buf, MBEDTLS_ENTROPY_BLOCK_SIZE,
|
/openthread-3.6.0/third_party/mbedtls/repo/include/mbedtls/ |
D | md.h | 98 const mbedtls_md_info_t *md_info; member 191 int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info ) MBEDTLS_DEPR… 215 int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ); 249 unsigned char mbedtls_md_get_size( const mbedtls_md_info_t *md_info ); 260 mbedtls_md_type_t mbedtls_md_get_type( const mbedtls_md_info_t *md_info ); 271 const char *mbedtls_md_get_name( const mbedtls_md_info_t *md_info ); 348 int mbedtls_md( const mbedtls_md_info_t *md_info, const unsigned char *input, size_t ilen, 370 int mbedtls_md_file( const mbedtls_md_info_t *md_info, const char *path, 481 int mbedtls_md_hmac( const mbedtls_md_info_t *md_info, const unsigned char *key, size_t keylen,
|
D | hmac_drbg.h | 203 const mbedtls_md_info_t * md_info, 238 const mbedtls_md_info_t * md_info,
|
D | ecjpake.h | 76 const mbedtls_md_info_t *md_info; /**< Hash to use */ member
|
/openthread-3.6.0/third_party/mbedtls/repo/programs/aes/ |
D | crypt_and_hash.c | 102 const mbedtls_md_info_t *md_info; in main() local 139 md_info = mbedtls_md_info_from_type( *list ); in main() 140 mbedtls_printf( " %s\n", mbedtls_md_get_name( md_info ) ); in main() 193 md_info = mbedtls_md_info_from_string( argv[5] ); in main() 194 if( md_info == NULL ) in main() 200 if( mbedtls_md_setup( &md_ctx, md_info, 1 ) != 0 ) in main() 435 … if( fwrite( digest, 1, mbedtls_md_get_size( md_info ), fout ) != mbedtls_md_get_size( md_info ) ) in main() 437 mbedtls_fprintf( stderr, "fwrite(%d bytes) failed\n", mbedtls_md_get_size( md_info ) ); in main() 453 if( filesize < 16 + mbedtls_md_get_size( md_info ) ) in main() 469 ( ( filesize - mbedtls_md_get_size( md_info ) ) % in main() [all …]
|
/openthread-3.6.0/third_party/mbedtls/repo/programs/x509/ |
D | cert_req.c | 219 const mbedtls_md_info_t *md_info = in main() local 221 if( md_info == NULL ) in main() 226 opt.md_alg = mbedtls_md_get_type( md_info ); in main()
|
/openthread-3.6.0/third_party/mbedtls/repo/programs/test/ |
D | benchmark.c | 750 const mbedtls_md_info_t *md_info; in main() local 755 if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ) ) == NULL ) in main() 758 if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) in main() 763 if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) in main() 772 if( ( md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA256 ) ) == NULL ) in main() 775 if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) in main() 780 if( mbedtls_hmac_drbg_seed( &hmac_drbg, md_info, myrand, NULL, NULL, 0 ) != 0 ) in main()
|
/openthread-3.6.0/third_party/mbedtls/repo/programs/ssl/ |
D | ssl_context_info.c | 628 const mbedtls_md_info_t *md_info; in print_deserialized_ssl_session() local 643 md_info = mbedtls_md_info_from_type( ciphersuite_info->mac ); in print_deserialized_ssl_session() 644 if( md_info == NULL ) in print_deserialized_ssl_session() 650 printf( "\tMessage-Digest : %s\n", md_info->name ); in print_deserialized_ssl_session()
|