/mbedtls-3.4.0/scripts/mbedtls_dev/ |
D | bignum_common.py | 27 def invmod(a: int, n: int) -> int: argument 42 def hex_to_int(val: str) -> int: 49 return int(val, 16) 54 def bound_mpi(val: int, bits_in_limb: int) -> int: argument 58 def bound_mpi_limbs(limbs: int, bits_in_limb: int) -> int: argument 63 def limbs_mpi(val: int, bits_in_limb: int) -> int: argument 103 def __init__(self, val_a: str, val_b: str = "0", bits_in_limb: int = 32) -> None: argument 117 def boundary(self) -> int: 125 def limb_boundary(self) -> int: 129 def limbs(self) -> int: [all …]
|
D | psa_storage.py | 35 def __init__(self, content: Union[int, str]): argument 36 if isinstance(content, int): 62 self.value_cache[e] = int(v, 0) 75 def value(self) -> int: 79 return int(self.string, 0) 86 Exprable = Union[str, int, Expr] 110 version: Optional[int] = None, argument 111 id: Optional[int] = None, #pylint: disable=redefined-builtin argument 114 bits: int, argument 133 *args: Union[int, Expr] argument [all …]
|
/mbedtls-3.4.0/tests/suites/ |
D | test_suite_psa_crypto_persistent_key.function | 49 int key_lifetime, int key_type, int key_bits, 50 int key_usage, int key_alg, int key_alg2 ) 80 int expected_key_lifetime, 81 int expected_key_type, 82 int expected_key_bits, 83 int expected_key_usage, 84 int expected_key_alg, 85 int expected_key_alg2, 86 int expected_status ) 122 void save_large_persistent_key( int data_length_arg, int expected_status ) [all …]
|
D | test_suite_x509parse.function | 63 int verify_none( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags ) 73 int verify_all( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags ) 84 int ca_callback_fail( void *data, mbedtls_x509_crt const *child, mbedtls_x509_crt **candidates ) 93 int ca_callback( void *data, mbedtls_x509_crt const *child, 96 int ret = 0; 149 int verify_fatal( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags ) 151 int *levels = (int *) data; 208 int verify_print( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint32_t *flags ) 210 int ret; 236 int verify_parse_san( mbedtls_x509_subject_alternative_name *san, [all …]
|
D | test_suite_psa_crypto_attributes.function | 11 void attributes_set_get( int owner_id_arg, int id_arg, int lifetime_arg, 12 int usage_flags_arg, int alg_arg, 13 int type_arg, int bits_arg ) 63 void persistence_attributes( int id1_arg, int owner_id1_arg, int lifetime_arg, 64 int id2_arg, int owner_id2_arg, 65 int expected_id_arg, int expected_owner_id_arg, 66 int expected_lifetime_arg )
|
D | test_suite_psa_crypto_op_fail.function | 6 static int test_equal_status( const char *test, 7 int line_no, const char* filename, 46 void hash_fail( int alg_arg, int expected_status_arg ) 73 void mac_fail( int key_type_arg, data_t *key_data, 74 int alg_arg, int expected_status_arg ) 119 void cipher_fail( int key_type_arg, data_t *key_data, 120 int alg_arg, int expected_status_arg ) 165 void aead_fail( int key_type_arg, data_t *key_data, 166 int alg_arg, int expected_status_arg ) 213 void sign_fail( int key_type_arg, data_t *key_data, [all …]
|
D | test_suite_hkdf.function | 12 void test_hkdf( int md_alg, data_t *ikm, data_t *salt, data_t *info, 15 int ret; 33 void test_hkdf_extract( int md_alg, 38 int ret; 60 void test_hkdf_expand( int md_alg, 66 int ret; 89 void test_hkdf_extract_ret( int hash_len, int ret ) 91 int output_ret; 116 void test_hkdf_expand_ret( int hash_len, int prk_len, int okm_len, int ret ) 118 int output_ret;
|
D | test_suite_asn1parse.function | 19 static int nested_parse( unsigned char **const p, 22 int ret; 51 int val = -257; 72 /* If we're sure that the number fits in an int, also 74 if( ret == 0 && len < sizeof( int ) ) 76 int val = -257; 124 int get_len_step( const data_t *input, size_t buffer_size, 131 int ret; 191 static int traverse_callback( void *ctx, int tag, 234 int full_result, [all …]
|
D | test_suite_cmac.function | 102 void mbedtls_cmac_setkey( int cipher_type, int key_size, int result ) 122 void mbedtls_cmac_multiple_blocks( int cipher_type, data_t * key, 123 int keybits, int block_size, 124 data_t * block1, int block1_len, 125 data_t * block2, int block2_len, 126 data_t * block3, int block3_len, 127 data_t * block4, int block4_len, 186 void mbedtls_cmac_multiple_operations_same_key( int cipher_type, 187 data_t * key, int keybits, 188 int block_size, [all …]
|
D | test_suite_pkcs1_v21.function | 12 void pkcs1_rsaes_oaep_encrypt( int mod, data_t * input_N, data_t * input_E, 13 int hash, data_t * message_str, data_t * rnd_buf, 14 data_t * result_str, int result ) 57 void pkcs1_rsaes_oaep_decrypt( int mod, data_t * input_P, data_t * input_Q, 58 data_t * input_N, data_t * input_E, int hash, 60 int result ) 119 void pkcs1_rsassa_pss_sign( int mod, data_t * input_P, data_t * input_Q, 120 data_t * input_N, data_t * input_E, int digest, 121 int hash, data_t * hash_digest, data_t * rnd_buf, 122 data_t * result_str, int fixed_salt_length, [all …]
|
D | test_suite_gcm.function | 7 static int check_multipart( mbedtls_gcm_context *ctx, 8 int mode, 17 int ok = 0; 66 int mode, 109 int mode, 140 int mode, 166 void gcm_bad_parameters( int cipher_id, int direction, 169 int tag_len_bits, int gcm_result ) 191 void gcm_encrypt_and_tag( int cipher_id, data_t * key_str, 194 int tag_len_bits, data_t * tag, [all …]
|
D | test_suite_psa_crypto_driver_wrappers.function | 14 static int sanity_check_rsa_encryption_result( 28 int ok = 0; 84 void sign_hash( int key_type_arg, 85 int alg_arg, 86 int force_status_arg, 90 int fake_output, 91 int expected_status_arg ) 158 void verify_hash( int key_type_arg, 159 int key_type_public_arg, 160 int alg_arg, [all …]
|
D | test_suite_nist_kw.function | 128 void mbedtls_nist_kw_setkey( int cipher_id, int key_size, 129 int is_wrap, int result ) 133 int ret; 149 void nist_kw_plaintext_lengths( int in_len, int out_len, int mode, int res ) 200 void nist_kw_ciphertext_lengths( int in_len, int out_len, int mode, int res ) 206 int unwrap_ret; 245 void mbedtls_nist_kw_wrap( int cipher_id, int mode, data_t *key, data_t *msg, 280 void mbedtls_nist_kw_unwrap( int cipher_id, int mode, data_t *key, data_t *msg, 281 data_t *expected_result, int expected_ret )
|
D | test_suite_psa_crypto_init.function | 38 static int fake_entropy_source( void *state_arg, 134 void init_deinit( int count ) 137 int i; 150 void deinit_without_init( int count ) 152 int i; 163 void validate_module_init_generate_random( int count ) 167 int i; 180 void validate_module_init_key_based( int count ) 186 int i; 202 void custom_entropy_sources( int sources_arg, int expected_init_status_arg ) [all …]
|
D | test_suite_ccm.function | 7 static int check_multipart( mbedtls_ccm_context *ctx, 8 int mode, 17 int ok = 0; 77 void mbedtls_ccm_setkey( int cipher_id, int key_size, int result ) 81 int ret; 97 void ccm_lengths( int msg_len, int iv_len, int add_len, int tag_len, int res ) 106 int decrypt_ret; 138 void ccm_star_lengths( int msg_len, int iv_len, int add_len, int tag_len, 139 int res ) 148 int decrypt_ret; [all …]
|
D | test_suite_cipher.function | 15 static int check_cipher_info( mbedtls_cipher_type_t type, 113 static int cipher_reset_key( mbedtls_cipher_context_t *ctx, int cipher_id, 114 int use_psa, size_t tag_len, const data_t *key, int direction ) 149 int buffer_is_all_zero( const uint8_t *buf, size_t size ) 168 const int *cipher_type; 189 int valid_size = sizeof(valid_buffer); 190 int valid_bitlen = valid_size * 8; 311 int valid_size = sizeof(valid_buffer); 312 int valid_bitlen = valid_size * 8; 376 void enc_dec_buf( int cipher_id, char * cipher_string, int key_len, [all …]
|
D | test_suite_rsa.function | 17 const int invalid_padding = 42; 18 const int invalid_hash_id = 0xff; 138 void rsa_init_free( int reinit ) 161 void mbedtls_rsa_pkcs1_sign( data_t * message_str, int padding_mode, 162 int digest, int mod, char * input_P, 164 data_t * result_str, int result ) 209 void mbedtls_rsa_pkcs1_verify( data_t * message_str, int padding_mode, 210 int digest, int mod, 212 data_t * result_str, int result ) 239 int padding_mode, int mod, [all …]
|
D | test_suite_bignum.function | 14 static int sign_is_valid( const mbedtls_mpi *X ) 47 int mbedtls_test_mpi_miller_rabin_determinizer( void* state, 78 static int f_rng_bytes_left( void *state, unsigned char *buf, size_t len ) 103 static int is_significantly_above_a_power_of_2( data_t *bytes ) 163 void mpi_read_write_string( int radix_X, char * input_X, int radix_A, 164 char * input_A, int output_size, int result_read, 165 int result_write ) 234 int output_size, int result ) 265 int output_size, int result ) 295 void mpi_read_file( char * input_file, data_t * input_A, int result ) [all …]
|
D | test_suite_psa_crypto_slot_management.function | 49 static int invalidate_key( invalidate_method_t invalidate_method, 77 static int invalidate_psa( invalidate_method_t invalidate_method ) 114 void transient_slot_lifecycle( int owner_id_arg, 115 int usage_arg, int alg_arg, 116 int type_arg, data_t *key_data, 117 int invalidate_method_arg ) 196 void persistent_slot_lifecycle( int lifetime_arg, int owner_id_arg, int id_arg, 197 int usage_arg, int alg_arg, int alg2_arg, 198 int type_arg, data_t *key_data, 199 int invalidate_method_arg ) [all …]
|
D | test_suite_psa_crypto_metadata.function | 109 int has_even_parity( uint32_t value ) 195 void mac_algorithm_core( psa_algorithm_t alg, int classification_flags, 221 void aead_algorithm_core( psa_algorithm_t alg, int classification_flags, 251 void hash_algorithm( int alg_arg, int length_arg ) 295 void mac_algorithm( int alg_arg, int classification_flags, 296 int length_arg, 297 int key_type_arg, int key_bits_arg ) 377 void hmac_algorithm( int alg_arg, 378 int length_arg, 379 int block_size_arg ) [all …]
|
D | test_suite_psa_crypto.function | 36 int ecjpake_operation_setup( psa_pake_operation_t *operation, 70 static int mem_is_char( void *buffer, unsigned char c, size_t size ) 82 static int asn1_write_10x( unsigned char **p, 87 int ret; 88 int len = bits / 8 + 1; 107 static int construct_fake_rsa_key( unsigned char *buffer, 111 int keypair ) 114 int ret; 115 int len = 0; 166 int exercise_mac_setup( psa_key_type_t key_type, [all …]
|
D | test_suite_pkcs12.function | 21 void pkcs12_derive_key( int md_type, int key_size_arg, 22 data_t *password_arg, int password_usage, 23 data_t *salt_arg, int salt_usage, 24 int iterations, 25 data_t* expected_output, int expected_status ) 48 int ret = mbedtls_pkcs12_derivation( output_data,
|
D | main_test.function | 68 * \param out_value Pointer to int to hold the integer. 72 int get_expression( int32_t exp_id, int32_t * out_value ) 74 int ret = KEY_VALUE_MAPPING_FOUND; 104 int dep_check( int dep_id ) 106 int ret = DEPENDENCY_NOT_SUPPORTED; 160 int dispatch_test( size_t func_idx, void ** params ) 162 int ret = DISPATCH_TEST_SUCCESS; 165 if ( func_idx < (int)( sizeof( test_funcs ) / sizeof( TestWrapper_t ) ) ) 202 int check_test( size_t func_idx ) 204 int ret = DISPATCH_TEST_SUCCESS; [all …]
|
D | test_suite_ssl.function | 35 static int rng_seed = 0xBEEF; 36 static int rng_get( void *p_rng, unsigned char *output, size_t output_len ) 51 void log_analyzer( void *ctx, int level, 52 const char *file, int line, 77 int expected_handshake_result; 78 int expected_ciphersuite; 79 int pk_alg; 80 int opaque_alg; 81 int opaque_alg2; 82 int opaque_usage; [all …]
|
/mbedtls-3.4.0/scripts/data_files/ |
D | error.fmt | 35 const char * mbedtls_high_level_strerr( int error_code ) 37 int high_level_error_code; 58 const char * mbedtls_low_level_strerr( int error_code ) 60 int low_level_error_code; 81 void mbedtls_strerror( int ret, char *buf, size_t buflen ) 84 int use_ret; 104 mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", (unsigned int) use_ret ); 141 mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", (unsigned int) use_ret ); 151 void mbedtls_strerror( int ret, char *buf, size_t buflen ) 162 void (*mbedtls_test_hook_error_add)( int, int, const char *, int );
|