/net-tools-3.5.0/mbedtls-2.4.0/tests/suites/ |
D | test_suite_pkwrite.data | 1 Public key write check RSA 5 Public key write check RSA 4096 9 Public key write check EC 192 bits 13 Public key write check EC 521 bits 17 Public key write check EC Brainpool 512 bits 21 Private key write check RSA 23 pk_write_key_check:"data_files/server1.key" 25 Private key write check RSA 4096 29 Private key write check EC 192 bits 33 Private key write check EC 521 bits [all …]
|
D | test_suite_ccm.function | 21 unsigned char key[32]; 26 memset( key, 0x2A, sizeof( key ) ); 27 TEST_ASSERT( (unsigned) key_size <= 8 * sizeof( key ) ); 29 ret = mbedtls_ccm_setkey( &ctx, cipher_id, key, key_size ); 41 unsigned char key[16]; 51 memset( key, 0, sizeof( key ) ); 59 key, 8 * sizeof( key ) ) == 0 ); 83 unsigned char key[32]; 93 memset( key, 0x00, sizeof( key ) ); 99 key_len = unhexify( key, key_hex ); [all …]
|
D | test_suite_pkwrite.function | 15 mbedtls_pk_context key; 25 mbedtls_pk_init( &key ); 26 TEST_ASSERT( mbedtls_pk_parse_public_keyfile( &key, key_file ) == 0 ); 28 ret = mbedtls_pk_write_pubkey_pem( &key, buf, sizeof( buf )); 40 mbedtls_pk_free( &key ); 47 mbedtls_pk_context key; 57 mbedtls_pk_init( &key ); 58 TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL ) == 0 ); 60 ret = mbedtls_pk_write_key_pem( &key, buf, sizeof( buf )); 72 mbedtls_pk_free( &key );
|
D | test_suite_x509write.data | 3 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha1":MBEDTLS_MD_SHA1:0:0 7 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha224":MBEDTLS_MD_SHA224:0:0 11 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha256":MBEDTLS_MD_SHA256:0:0 15 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha384":MBEDTLS_MD_SHA384:0:0 19 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha512":MBEDTLS_MD_SHA512:0:0 23 x509_csr_check:"data_files/server1.key":"data_files/server1.req.md4":MBEDTLS_MD_MD4:0:0 27 x509_csr_check:"data_files/server1.key":"data_files/server1.req.md5":MBEDTLS_MD_MD5:0:0 31 x509_csr_check:"data_files/server1.key":"data_files/server1.req.key_usage":MBEDTLS_MD_SHA1:MBEDTLS_… 35 x509_csr_check:"data_files/server1.key":"data_files/server1.req.cert_type":MBEDTLS_MD_SHA1:0:MBEDTL… 39 x509_csr_check:"data_files/server1.key":"data_files/server1.req.ku-ct":MBEDTLS_MD_SHA1:MBEDTLS_X509… [all …]
|
D | test_suite_rsa.data | 249 RSA Check empty private key 252 RSA Check Private key #1 (Correct) 255 RSA Check Private key #2 (No P) 258 RSA Check Private key #3 (No Q) 261 RSA Check Private key #4 (No N) 264 RSA Check Private key #5 (No E) 267 RSA Check Private key #6 (No D) 270 RSA Check Private key #7 (No DP) 273 RSA Check Private key #8 (No DQ) 276 RSA Check Private key #9 (No QP) [all …]
|
D | test_suite_cipher.function | 137 unsigned char key[32]; 155 memset( key, 0x2a, sizeof( key ) ); 166 TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_dec, key, key_len, MBEDTLS_DECRYPT ) ); 167 TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_enc, key, key_len, MBEDTLS_ENCRYPT ) ); 262 unsigned char key[32]; 273 memset( key, 0, 32 ); 287 TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, key_len, MBEDTLS_ENCRYPT ) ); 312 unsigned char key[32]; 323 memset( key, 0, 32 ); 337 TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx_dec, key, 128, MBEDTLS_DECRYPT ) ); [all …]
|
D | test_suite_pkparse.data | 3 pk_parse_keyfile_rsa:"data_files/test-ca.key":"NULL":MBEDTLS_ERR_PK_PASSWORD_REQUIRED 7 pk_parse_keyfile_rsa:"data_files/test-ca.key":"PolarSSLTest":0 11 pk_parse_keyfile_rsa:"data_files/test-ca.key":"PolarSSLWRONG":MBEDTLS_ERR_PK_PASSWORD_MISMATCH 35 pk_parse_keyfile_rsa:"data_files/format_gen.key":"":0 39 pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_3des.key":"PolarSSLTest":0 43 pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_3des.key":"PolarSSLTes":MBEDTLS_ERR_PK_PASSWORD_MIS… 47 pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_3des.key":"":MBEDTLS_ERR_PK_PASSWORD_REQUIRED 55 pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_2des.key":"PolarSSLTest":0 59 pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_2des.key":"PolarSLTest":MBEDTLS_ERR_PK_PASSWORD_MIS… 63 pk_parse_keyfile_rsa:"data_files/pkcs8_pbe_sha1_2des.key":"":MBEDTLS_ERR_PK_PASSWORD_REQUIRED [all …]
|
/net-tools-3.5.0/mbedtls-2.4.0/include/mbedtls/ |
D | des.h | 104 void mbedtls_des_key_set_parity( unsigned char key[MBEDTLS_DES_KEY_SIZE] ); 116 int mbedtls_des_key_check_key_parity( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); 125 int mbedtls_des_key_check_weak( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); 135 int mbedtls_des_setkey_enc( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]… 145 int mbedtls_des_setkey_dec( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]… 156 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ); 167 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ); 178 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ); 189 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ); 282 const unsigned char key[MBEDTLS_DES_KEY_SIZE] );
|
/net-tools-3.5.0/mbedtls-2.4.0/programs/pkey/ |
D | key_app_writer.c | 106 static int write_public_key( mbedtls_pk_context *key, const char *output_file ) in write_public_key() argument 119 if( ( ret = mbedtls_pk_write_pubkey_pem( key, output_buf, 16000 ) ) != 0 ) in write_public_key() 127 if( ( ret = mbedtls_pk_write_pubkey_der( key, output_buf, 16000 ) ) < 0 ) in write_public_key() 148 static int write_private_key( mbedtls_pk_context *key, const char *output_file ) in write_private_key() argument 161 if( ( ret = mbedtls_pk_write_key_pem( key, output_buf, 16000 ) ) != 0 ) in write_private_key() 169 if( ( ret = mbedtls_pk_write_key_der( key, output_buf, 16000 ) ) < 0 ) in write_private_key() 193 mbedtls_pk_context key; in main() local 201 mbedtls_pk_init( &key ); in main() 283 ret = mbedtls_pk_parse_keyfile( &key, opt.filename, NULL ); in main() 300 if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_RSA ) in main() [all …]
|
D | gen_key.c | 148 static int write_private_key( mbedtls_pk_context *key, const char *output_file ) in write_private_key() argument 159 if( ( ret = mbedtls_pk_write_key_pem( key, output_buf, 16000 ) ) != 0 ) in write_private_key() 166 if( ( ret = mbedtls_pk_write_key_der( key, output_buf, 16000 ) ) < 0 ) in write_private_key() 190 mbedtls_pk_context key; in main() local 204 mbedtls_pk_init( &key ); in main() 316 if( ( ret = mbedtls_pk_setup( &key, mbedtls_pk_info_from_type( opt.type ) ) ) != 0 ) in main() 325 ret = mbedtls_rsa_gen_key( mbedtls_pk_rsa( key ), mbedtls_ctr_drbg_random, &ctr_drbg, in main() 338 ret = mbedtls_ecp_gen_key( opt.ec_curve, mbedtls_pk_ec( key ), in main() 359 if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_RSA ) in main() 361 mbedtls_rsa_context *rsa = mbedtls_pk_rsa( key ); in main() [all …]
|
/net-tools-3.5.0/mbedtls-2.4.0/library/ |
D | pkwrite.c | 131 const mbedtls_pk_context *key ) in mbedtls_pk_write_pubkey() argument 137 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) in mbedtls_pk_write_pubkey() 138 MBEDTLS_ASN1_CHK_ADD( len, pk_write_rsa_pubkey( p, start, mbedtls_pk_rsa( *key ) ) ); in mbedtls_pk_write_pubkey() 142 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) in mbedtls_pk_write_pubkey() 143 MBEDTLS_ASN1_CHK_ADD( len, pk_write_ec_pubkey( p, start, mbedtls_pk_ec( *key ) ) ); in mbedtls_pk_write_pubkey() 151 int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *key, unsigned char *buf, size_t size ) in mbedtls_pk_write_pubkey_der() argument 160 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_pk_write_pubkey( &c, buf, key ) ); in mbedtls_pk_write_pubkey_der() 176 if( ( ret = mbedtls_oid_get_oid_by_pk_alg( mbedtls_pk_get_type( key ), in mbedtls_pk_write_pubkey_der() 183 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) in mbedtls_pk_write_pubkey_der() 185 MBEDTLS_ASN1_CHK_ADD( par_len, pk_write_ec_param( &c, buf, mbedtls_pk_ec( *key ) ) ); in mbedtls_pk_write_pubkey_der() [all …]
|
D | aesni.c | 275 const unsigned char *key ) in aesni_setkey_enc_128() argument 317 : "r" (rk), "r" (key) in aesni_setkey_enc_128() 325 const unsigned char *key ) in aesni_setkey_enc_192() argument 374 : "r" (rk), "r" (key) in aesni_setkey_enc_192() 382 const unsigned char *key ) in aesni_setkey_enc_256() argument 440 : "r" (rk), "r" (key) in aesni_setkey_enc_256() 448 const unsigned char *key, in mbedtls_aesni_setkey_enc() argument 453 case 128: aesni_setkey_enc_128( rk, key ); break; in mbedtls_aesni_setkey_enc() 454 case 192: aesni_setkey_enc_192( rk, key ); break; in mbedtls_aesni_setkey_enc() 455 case 256: aesni_setkey_enc_256( rk, key ); break; in mbedtls_aesni_setkey_enc()
|
D | des.c | 346 void mbedtls_des_key_set_parity( unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_key_set_parity() 351 key[i] = odd_parity_table[key[i] / 2]; in mbedtls_des_key_set_parity() 357 int mbedtls_des_key_check_key_parity( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_key_check_key_parity() 362 if( key[i] != odd_parity_table[key[i] / 2] ) in mbedtls_des_key_check_key_parity() 412 int mbedtls_des_key_check_weak( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_key_check_weak() 417 if( memcmp( weak_key_table[i], key, MBEDTLS_DES_KEY_SIZE) == 0 ) in mbedtls_des_key_check_weak() 424 void mbedtls_des_setkey( uint32_t SK[32], const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_setkey() 429 GET_UINT32_BE( X, key, 0 ); in mbedtls_des_setkey() 430 GET_UINT32_BE( Y, key, 4 ); in mbedtls_des_setkey() 497 int mbedtls_des_setkey_enc( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]… in mbedtls_des_setkey_enc() [all …]
|
D | cipher_wrap.c | 151 static int aes_setkey_dec_wrap( void *ctx, const unsigned char *key, in aes_setkey_dec_wrap() argument 154 return mbedtls_aes_setkey_dec( (mbedtls_aes_context *) ctx, key, key_bitlen ); in aes_setkey_dec_wrap() 157 static int aes_setkey_enc_wrap( void *ctx, const unsigned char *key, in aes_setkey_enc_wrap() argument 160 return mbedtls_aes_setkey_enc( (mbedtls_aes_context *) ctx, key, key_bitlen ); in aes_setkey_enc_wrap() 341 static int gcm_aes_setkey_wrap( void *ctx, const unsigned char *key, in gcm_aes_setkey_wrap() argument 345 key, key_bitlen ); in gcm_aes_setkey_wrap() 404 static int ccm_aes_setkey_wrap( void *ctx, const unsigned char *key, in ccm_aes_setkey_wrap() argument 408 key, key_bitlen ); in ccm_aes_setkey_wrap() 507 static int camellia_setkey_dec_wrap( void *ctx, const unsigned char *key, in camellia_setkey_dec_wrap() argument 510 return mbedtls_camellia_setkey_dec( (mbedtls_camellia_context *) ctx, key, key_bitlen ); in camellia_setkey_dec_wrap() [all …]
|
D | pkparse.c | 482 mbedtls_ecp_keypair *key ) in pk_get_ecpubkey() argument 486 if( ( ret = mbedtls_ecp_point_read_binary( &key->grp, &key->Q, in pk_get_ecpubkey() 489 ret = mbedtls_ecp_check_pubkey( &key->grp, &key->Q ); in pk_get_ecpubkey() 643 const unsigned char *key, in pk_parse_key_pkcs1_der() argument 650 p = (unsigned char *) key; in pk_parse_key_pkcs1_der() 724 const unsigned char *key, in pk_parse_key_sec1_der() argument 731 unsigned char *p = (unsigned char *) key; in pk_parse_key_sec1_der() 850 const unsigned char* key, in pk_parse_key_pkcs8_unencrypted_der() argument 856 unsigned char *p = (unsigned char *) key; in pk_parse_key_pkcs8_unencrypted_der() 939 const unsigned char *key, size_t keylen, in pk_parse_key_pkcs8_encrypted_der() argument [all …]
|
D | pkcs12.c | 93 unsigned char *key, size_t keylen, in pkcs12_pbe_derive_key_iv() argument 114 if( ( ret = mbedtls_pkcs12_derivation( key, keylen, unipwd, pwdlen * 2 + 2, in pkcs12_pbe_derive_key_iv() 151 unsigned char key[16]; in mbedtls_pkcs12_pbe_sha1_rc4_128() 159 key, 16, NULL, 0 ) ) != 0 ) in mbedtls_pkcs12_pbe_sha1_rc4_128() 164 mbedtls_arc4_setup( &ctx, key, 16 ); in mbedtls_pkcs12_pbe_sha1_rc4_128() 169 mbedtls_zeroize( key, sizeof( key ) ); in mbedtls_pkcs12_pbe_sha1_rc4_128() 183 unsigned char key[32]; in mbedtls_pkcs12_pbe() local 196 key, keylen, in mbedtls_pkcs12_pbe() 207 …if( ( ret = mbedtls_cipher_setkey( &cipher_ctx, key, 8 * keylen, (mbedtls_operation_t) mode ) ) !=… in mbedtls_pkcs12_pbe() 226 mbedtls_zeroize( key, sizeof( key ) ); in mbedtls_pkcs12_pbe()
|
D | ssl_ticket.c | 69 mbedtls_ssl_ticket_key *key = ctx->keys + index; in ssl_ticket_gen_key() local 72 key->generation_time = (uint32_t) mbedtls_time( NULL ); in ssl_ticket_gen_key() 75 if( ( ret = ctx->f_rng( ctx->p_rng, key->name, sizeof( key->name ) ) ) != 0 ) in ssl_ticket_gen_key() 82 ret = mbedtls_cipher_setkey( &key->ctx, buf, in ssl_ticket_gen_key() 83 mbedtls_cipher_get_key_bitlen( &key->ctx ), in ssl_ticket_gen_key() 294 mbedtls_ssl_ticket_key *key; in mbedtls_ssl_ticket_write() local 320 key = &ctx->keys[ctx->active]; in mbedtls_ssl_ticket_write() 324 memcpy( key_name, key->name, 4 ); in mbedtls_ssl_ticket_write() 341 if( ( ret = mbedtls_cipher_auth_encrypt( &key->ctx, in mbedtls_ssl_ticket_write() 390 mbedtls_ssl_ticket_key *key; in mbedtls_ssl_ticket_parse() local [all …]
|
D | ssl_cookie.c | 112 unsigned char key[COOKIE_MD_OUTLEN]; in mbedtls_ssl_cookie_setup() local 114 if( ( ret = f_rng( p_rng, key, sizeof( key ) ) ) != 0 ) in mbedtls_ssl_cookie_setup() 121 ret = mbedtls_md_hmac_starts( &ctx->hmac_ctx, key, sizeof( key ) ); in mbedtls_ssl_cookie_setup() 125 mbedtls_zeroize( key, sizeof( key ) ); in mbedtls_ssl_cookie_setup()
|
/net-tools-3.5.0/tinydtls-0.8.2/ |
D | crypto.c | 184 const unsigned char *key, size_t keylen, in dtls_p_hash() argument 196 hmac_a = dtls_hmac_new(key, keylen); in dtls_p_hash() 207 hmac_p = dtls_hmac_new(key, keylen); in dtls_p_hash() 214 dtls_hmac_init(hmac_p, key, keylen); in dtls_p_hash() 226 dtls_hmac_init(hmac_a, key, keylen); in dtls_p_hash() 231 dtls_hmac_init(hmac_p, key, keylen); in dtls_p_hash() 249 dtls_prf(const unsigned char *key, size_t keylen, in dtls_prf() argument 258 key, keylen, in dtls_prf() 318 dtls_psk_pre_master_secret(unsigned char *key, size_t keylen, in dtls_psk_pre_master_secret() argument 335 memcpy(p, key, keylen); in dtls_psk_pre_master_secret() [all …]
|
D | hmac.c | 83 dtls_hmac_new(const unsigned char *key, size_t klen) { in dtls_hmac_new() argument 88 dtls_hmac_init(ctx, key, klen); in dtls_hmac_new() 94 dtls_hmac_init(dtls_hmac_context_t *ctx, const unsigned char *key, size_t klen) { in dtls_hmac_init() argument 103 dtls_hash_update(&ctx->data, key, klen); in dtls_hmac_init() 106 memcpy(ctx->pad, key, klen); in dtls_hmac_init()
|
/net-tools-3.5.0/mbedtls-2.4.0/programs/aes/ |
D | aescrypt2.c | 83 unsigned char key[512]; in main() local 127 memset(key, 0, sizeof(key)); in main() 160 keylen = fread( key, 1, sizeof( key ), fkey ); in main() 171 keylen < (int) sizeof( key ) ) in main() 173 key[keylen++] = (unsigned char) n; in main() 181 if( keylen > (int) sizeof( key ) ) in main() 182 keylen = (int) sizeof( key ); in main() 184 memcpy( key, argv[4], keylen ); in main() 271 mbedtls_md_update( &sha_ctx, key, keylen ); in main() 275 memset( key, 0, sizeof( key ) ); in main() [all …]
|
D | crypt_and_hash.c | 83 unsigned char key[512]; in main() local 199 keylen = fread( key, 1, sizeof( key ), fkey ); in main() 210 keylen < (int) sizeof( key ) ) in main() 212 key[keylen++] = (unsigned char) n; in main() 220 if( keylen > (int) sizeof( key ) ) in main() 221 keylen = (int) sizeof( key ); in main() 223 memcpy( key, argv[6], keylen ); in main() 301 mbedtls_md_update( &md_ctx, key, keylen ); in main() 306 memset( key, 0, sizeof( key ) ); in main() 443 mbedtls_md_update( &md_ctx, key, keylen ); in main() [all …]
|
/net-tools-3.5.0/tinydtls-0.8.2/tests/ |
D | prf-test.c | 11 unsigned char key[] = { 0x9b, 0xbe, 0x43, 0x6b, 0xa9, 0x40, 0xf0, 0x17, in main() local 21 result = dtls_prf(key, sizeof(key), in main()
|
/net-tools-3.5.0/ |
D | stunnel.conf | 38 key = echo-apps-key.pem 45 key = echo-apps-key.pem
|
/net-tools-3.5.0/mbedtls-2.4.0/tests/scripts/ |
D | generate_code.pl | 324 while( my ($key, $value) = each(%case_deps) ) 327 if( strcmp( str, "$key" ) == 0 ) 329 #if defined($key) 339 while( my ($key, $value) = each(%mapping_values) ) 342 if( strcmp( str, "$key" ) == 0 ) 344 *value = ( $key );
|