/openthread-3.4.0/tests/unit/ |
D | test_flash.cpp | 65 for (uint16_t key = 0; key < 16; key++) in TestFlash() local 67 uint16_t length = key; in TestFlash() 69 SuccessOrQuit(flash.Add(key, writeBuffer, length)); in TestFlash() 72 for (uint16_t key = 0; key < 16; key++) in TestFlash() local 74 uint16_t length = key; in TestFlash() 76 SuccessOrQuit(flash.Get(key, 0, readBuffer, &length)); in TestFlash() 77 VerifyOrQuit(length == key, "Get() did not return expected length"); in TestFlash() 81 for (uint16_t key = 0; key < 16; key++) in TestFlash() local 83 SuccessOrQuit(flash.Delete(key, 0)); in TestFlash() 86 for (uint16_t key = 0; key < 16; key++) in TestFlash() local [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/tests/suites/ |
D | test_suite_psa_crypto_persistent_key.data | 1 Format for storage: RSA private key 4 Format for storage: AES-128 key 7 Parse storage: RSA private key 10 Parse storage: AES-128 key 28 Parse storage: truncated key 32 Save maximum-size persistent raw key 36 Save larger than maximum-size persistent raw key 39 Persistent key destroy 43 Persistent key destroy after restart 47 Persistent key import (RSA) [all …]
|
D | test_suite_nist_kw.function | 21 unsigned char key[16]; 30 memset( key, 0, sizeof( key ) ); 40 key, sizeof( key ) * 8, 51 key, sizeof( key ) * 8, 76 key, sizeof( key ) * 8, 94 key, sizeof( key ) * 8, 132 unsigned char key[32]; 137 memset( key, 0x2A, sizeof( key ) ); 138 TEST_ASSERT( (unsigned) key_size <= 8 * sizeof( key ) ); 140 ret = mbedtls_nist_kw_setkey( &ctx, cipher_id, key, key_size, is_wrap ); [all …]
|
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 256 bits (top bit set) [all …]
|
D | test_suite_psa_crypto_se_driver_hal_mocks.data | 13 SE key importing mock test 16 SE key importing mock test: max key bits 19 SE key importing mock test: more than max key bits 22 SE key importing mock test: alloc failed 25 SE key importing mock test: import failed 28 SE key exporting mock test 31 SE key exporting mock test: export failed 34 SE public key exporting mock test 37 SE public key exporting mock test: export failed 40 SE key generating mock test [all …]
|
D | test_suite_x509write.data | 3 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha1":MBEDTLS_MD_SHA1:0:0:0:0 7 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha224":MBEDTLS_MD_SHA224:0:0:0:0 11 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha256":MBEDTLS_MD_SHA256:0:0:0:0 15 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha384":MBEDTLS_MD_SHA384:0:0:0:0 19 x509_csr_check:"data_files/server1.key":"data_files/server1.req.sha512":MBEDTLS_MD_SHA512:0:0:0:0 23 x509_csr_check:"data_files/server1.key":"data_files/server1.req.md4":MBEDTLS_MD_MD4:0:0:0:0 27 x509_csr_check:"data_files/server1.key":"data_files/server1.req.md5":MBEDTLS_MD_MD5:0:0: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.key_usage_empty":MBEDTLS_MD_SHA1:0:… 39 x509_csr_check:"data_files/server1.key":"data_files/server1.req.cert_type":MBEDTLS_MD_SHA1:0:0:MBED… [all …]
|
D | test_suite_psa_crypto_attributes.data | 1 PSA key attributes structure 5 PSA key attributes: id only 8 PSA key attributes: lifetime=3 only 11 PSA key attributes: id then back to volatile 14 PSA key attributes: id then back to non local volatile 17 PSA key attributes: id then lifetime 20 PSA key attributes: lifetime then id 23 PSA key attributes: non local volatile lifetime then id 26 PSA key attributes: slot number
|
D | test_suite_pkcs12.data | 1 PKCS#12 derive key : MD5: Zero length password and hash 5 PKCS#12 derive key: MD5: NULL password and hash 9 PKCS#12 derive key: MD5: Zero length password 13 PKCS#12 derive key: MD5: NULL password 17 PKCS#12 derive key: MD5: Invalid length NULL password 21 PKCS#12 derive key: MD5: Zero length salt 25 PKCS#12 derive key: MD5: NULL salt 29 PKCS#12 derive key: MD5: Invalid length NULL salt 33 PKCS#12 derive key: MD5: Valid password and salt
|
D | test_suite_psa_crypto_slot_management.function | 9 /**< Close key(s) */ 12 /**< Destroy key(s) */ 15 /**< Purge key(s) */ 21 /**< Close key(s) then terminate and re-initialize */ 24 /**< Destroy key(s) then terminate and re-initialize */ 27 /**< Purge key(s) then terminate and re-initialize */ 46 /** Apply \p invalidate_method to invalidate the specified key: 50 mbedtls_svc_key_id_t key ) 54 /* Closing the key invalidate only volatile keys, not persistent ones. */ 57 PSA_ASSERT( psa_close_key( key ) ); [all …]
|
D | test_suite_psa_crypto.function | 101 * Or, for a public key, the same structure with only 143 mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT; 149 PSA_ASSERT( psa_import_key( &attributes, key_bytes, key_length, &key ) ); 151 *status = psa_mac_sign_setup( operation, key, alg ); 158 TEST_EQUAL( psa_mac_sign_setup( operation, key, alg ), *status ); 161 psa_destroy_key( key ); 165 psa_destroy_key( key ); 176 mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT; 182 PSA_ASSERT( psa_import_key( &attributes, key_bytes, key_length, &key ) ); 184 *status = psa_cipher_encrypt_setup( operation, key, alg ); [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 )); 48 mbedtls_pk_free( &key ); 55 mbedtls_pk_context key; 65 mbedtls_pk_init( &key ); 66 TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL ) == 0 ); 68 ret = mbedtls_pk_write_key_pem( &key, buf, sizeof( buf )); 88 mbedtls_pk_free( &key );
|
/openthread-3.4.0/third_party/mbedtls/repo/docs/architecture/ |
D | mbed-crypto-storage-specification.md | 26 * [Persistent transparent keys](#key-file-format-for-0.1.0) designated by a [slot number](#key-name… 33 We do not make any promises regarding key storage, or regarding the nonvolatile random seed file on… 37 …key is stored in a dedicated file whose name is constructed from the key identifier. The way in wh… 39 The valid values for a key identifier are the range from 1 to 0xfffeffff. This limitation on the ra… 51 The layout of a key file is: 58 * key material length (4 bytes) 59 * key material: output of `psa_export_key` 73 … 1 through 0xfffeffff: [content](#key-file-format-for-0.1.0) of the [key whose identifier is the f… 81 …time configuration value `CRYPTO_STORAGE_FILE_LOCATION` allows storing the key files in a director… 84 …ATION "psa_key_slot_%lu", key_id)` [content](#key-file-format-for-0.1.0) of the [key whose identif… [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/tests/src/ |
D | psa_exercise_key.c | 43 static int check_key_attributes_sanity( mbedtls_svc_key_id_t key ) in check_key_attributes_sanity() argument 52 PSA_ASSERT( psa_get_key_attributes( key, &attributes ) ); in check_key_attributes_sanity() 117 static int exercise_mac_key( mbedtls_svc_key_id_t key, in exercise_mac_key() argument 134 PSA_ASSERT( psa_mac_sign_setup( &operation, key, alg ) ); in exercise_mac_key() 148 PSA_ASSERT( psa_mac_verify_setup( &operation, key, alg ) ); in exercise_mac_key() 162 static int exercise_cipher_key( mbedtls_svc_key_id_t key, in exercise_cipher_key() argument 177 PSA_ASSERT( psa_cipher_encrypt_setup( &operation, key, alg ) ); in exercise_cipher_key() 199 PSA_ASSERT( psa_get_key_attributes( key, &attributes ) ); in exercise_cipher_key() 207 PSA_ASSERT( psa_cipher_decrypt_setup( &operation, key, alg ) ); in exercise_cipher_key() 235 static int exercise_aead_key( mbedtls_svc_key_id_t key, in exercise_aead_key() argument [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/include/mbedtls/ |
D | des.h | 134 void mbedtls_des_key_set_parity( unsigned char key[MBEDTLS_DES_KEY_SIZE] ); 151 int mbedtls_des_key_check_key_parity( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); 165 int mbedtls_des_key_check_weak( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ); 180 int mbedtls_des_setkey_enc( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]… 195 int mbedtls_des_setkey_dec( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]… 207 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ); 219 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 2] ); 231 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ); 243 const unsigned char key[MBEDTLS_DES_KEY_SIZE * 3] ); 352 const unsigned char key[MBEDTLS_DES_KEY_SIZE] );
|
/openthread-3.4.0/third_party/mbedtls/repo/programs/pkey/ |
D | key_app_writer.c | 112 static int write_public_key( mbedtls_pk_context *key, const char *output_file ) in write_public_key() argument 125 if( ( ret = mbedtls_pk_write_pubkey_pem( key, output_buf, 16000 ) ) != 0 ) in write_public_key() 133 if( ( ret = mbedtls_pk_write_pubkey_der( key, output_buf, 16000 ) ) < 0 ) in write_public_key() 154 static int write_private_key( mbedtls_pk_context *key, const char *output_file ) in write_private_key() argument 167 if( ( ret = mbedtls_pk_write_key_pem( key, output_buf, 16000 ) ) != 0 ) in write_private_key() 175 if( ( ret = mbedtls_pk_write_key_der( key, output_buf, 16000 ) ) < 0 ) in write_private_key() 206 mbedtls_pk_context key; in main() local 212 mbedtls_pk_init( &key ); in main() 299 ret = mbedtls_pk_parse_keyfile( &key, opt.filename, NULL ); in main() 315 if( mbedtls_pk_get_type( &key ) == MBEDTLS_PK_RSA ) in main() [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/include/psa/ |
D | crypto.h | 147 mbedtls_svc_key_id_t key ); 390 psa_status_t psa_get_key_attributes(mbedtls_svc_key_id_t key, 434 psa_status_t psa_purge_key(mbedtls_svc_key_id_t key); 577 psa_status_t psa_destroy_key(mbedtls_svc_key_id_t key); 661 mbedtls_svc_key_id_t *key); 753 psa_status_t psa_export_key(mbedtls_svc_key_id_t key, 828 psa_status_t psa_export_public_key(mbedtls_svc_key_id_t key, 1237 psa_status_t psa_mac_compute(mbedtls_svc_key_id_t key, 1278 psa_status_t psa_mac_verify(mbedtls_svc_key_id_t key, 1391 mbedtls_svc_key_id_t key, [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/programs/psa/ |
D | key_ladder_demo.sh | 31 if [ -e master.key ]; then 36 "$program" generate master=master.key 42 "$program" wrap master=master.key label=hello label=world \ 47 "$program" unwrap master=master.key label=hello label=world \ 54 …"$program" unwrap master=master.key input=hello_world.wrap output=hellow_orld.txt label=hellow lab… 58 "$program" save master=master.key label=hello \ 59 input=hello_world.wrap output=hello.key 61 "$program" unwrap master=hello.key label=world \
|
D | crypto_examples.c | 97 static psa_status_t cipher_encrypt( psa_key_id_t key, in cipher_encrypt() argument 113 status = psa_cipher_encrypt_setup( &operation, key, alg ); in cipher_encrypt() 128 static psa_status_t cipher_decrypt( psa_key_id_t key, in cipher_decrypt() argument 143 status = psa_cipher_decrypt_setup( &operation, key, alg ); in cipher_decrypt() 170 psa_key_id_t key = 0; in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() local 186 status = psa_generate_key( &attributes, &key ); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() 189 status = cipher_encrypt( key, alg, iv, sizeof( iv ), in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() 194 status = cipher_decrypt( key, alg, iv, sizeof( iv ), in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() 203 psa_destroy_key( key ); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() 220 psa_key_id_t key = 0; in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi() local [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/tests/scripts/ |
D | analyze_outcomes.py | 65 key = ';'.join([base_name, description.decode('utf-8')]) 66 self.descriptions.add(key) 77 for key in available: 78 hits = outcomes[key].hits() if key in outcomes else 0 82 results.warning('Test case not executed: {}', key) 101 key = ';'.join([suite, case]) 103 if key not in outcomes: 104 outcomes[key] = TestCaseOutcomes() 106 outcomes[key].successes.append(setup) 108 outcomes[key].failures.append(setup)
|
/openthread-3.4.0/third_party/mbedtls/repo/tests/data_files/dir-maxpath/ |
D | long.sh | 26 $OPENSSL ecparam -name prime256v1 -genkey -out 00.key 28 -key 00.key -out 00.crt 39 $OPENSSL ecparam -name prime256v1 -genkey -out ${ME}.key 41 -key ${ME}.key -out ${ME}.csr 42 $OPENSSL x509 -req -CA ${UP}.crt -CAkey ${UP}.key -set_serial 1 $OPT \
|
/openthread-3.4.0/third_party/mbedtls/repo/library/ |
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 | pkwrite.c | 177 const mbedtls_pk_context *key ) in mbedtls_pk_write_pubkey() argument 185 PK_VALIDATE_RET( key != NULL ); in mbedtls_pk_write_pubkey() 188 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_RSA ) in mbedtls_pk_write_pubkey() 189 MBEDTLS_ASN1_CHK_ADD( len, pk_write_rsa_pubkey( p, start, mbedtls_pk_rsa( *key ) ) ); in mbedtls_pk_write_pubkey() 193 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_ECKEY ) in mbedtls_pk_write_pubkey() 194 MBEDTLS_ASN1_CHK_ADD( len, pk_write_ec_pubkey( p, start, mbedtls_pk_ec( *key ) ) ); in mbedtls_pk_write_pubkey() 198 if( mbedtls_pk_get_type( key ) == MBEDTLS_PK_OPAQUE ) in mbedtls_pk_write_pubkey() 201 psa_key_id_t* key_id = (psa_key_id_t*) key->pk_ctx; in mbedtls_pk_write_pubkey() 225 int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *key, unsigned char *buf, size_t size ) in mbedtls_pk_write_pubkey_der() argument 233 PK_VALIDATE_RET( key != NULL ); in mbedtls_pk_write_pubkey_der() [all …]
|
D | des.c | 321 void mbedtls_des_key_set_parity( unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_key_set_parity() 326 key[i] = odd_parity_table[key[i] / 2]; in mbedtls_des_key_set_parity() 332 int mbedtls_des_key_check_key_parity( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_key_check_key_parity() 337 if( key[i] != odd_parity_table[key[i] / 2] ) in mbedtls_des_key_check_key_parity() 387 int mbedtls_des_key_check_weak( const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_key_check_weak() 392 if( memcmp( weak_key_table[i], key, MBEDTLS_DES_KEY_SIZE) == 0 ) in mbedtls_des_key_check_weak() 399 void mbedtls_des_setkey( uint32_t SK[32], const unsigned char key[MBEDTLS_DES_KEY_SIZE] ) in mbedtls_des_setkey() 404 X = MBEDTLS_GET_UINT32_BE( key, 0 ); in mbedtls_des_setkey() 405 Y = MBEDTLS_GET_UINT32_BE( key, 4 ); in mbedtls_des_setkey() 472 int mbedtls_des_setkey_enc( mbedtls_des_context *ctx, const unsigned char key[MBEDTLS_DES_KEY_SIZE]… in mbedtls_des_setkey_enc() [all …]
|
D | psa_crypto_storage.c | 56 static psa_storage_uid_t psa_its_identifier_of_slot( mbedtls_svc_key_id_t key ) in psa_its_identifier_of_slot() argument 63 uint32_t unsigned_owner_id = MBEDTLS_SVC_KEY_ID_GET_OWNER_ID( key ); in psa_its_identifier_of_slot() 65 MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key ) ); in psa_its_identifier_of_slot() 71 return( key ); in psa_its_identifier_of_slot() 93 const mbedtls_svc_key_id_t key, uint8_t *data, size_t data_size ) in psa_crypto_storage_load() argument 96 psa_storage_uid_t data_identifier = psa_its_identifier_of_slot( key ); in psa_crypto_storage_load() 111 int psa_is_key_present_in_storage( const mbedtls_svc_key_id_t key ) in psa_is_key_present_in_storage() argument 114 psa_storage_uid_t data_identifier = psa_its_identifier_of_slot( key ); in psa_is_key_present_in_storage() 141 static psa_status_t psa_crypto_storage_store( const mbedtls_svc_key_id_t key, in psa_crypto_storage_store() argument 146 psa_storage_uid_t data_identifier = psa_its_identifier_of_slot( key ); in psa_crypto_storage_store() [all …]
|
/openthread-3.4.0/third_party/mbedtls/repo/docs/ |
D | getting_started.md | 28 * [Importing a key](#importing-a-key) 32 * [Deriving a new key from an existing key](#deriving-a-new-key-from-an-existing-key) 64 ### Importing a key 66 To use a key for cryptography operations in Mbed Crypto, you need to first 67 import it. The import operation returns the identifier of the key for use 73 This example shows how to import a key: 75 void import_a_key(const uint8_t *key, size_t key_len) 81 printf("Import an AES key...\t"); 91 /* Set key attributes */ 97 /* Import the key */ [all …]
|