Home
last modified time | relevance | path

Searched refs:key_id (Results 1 – 25 of 25) sorted by relevance

/openthread-3.5.0/third_party/mbedtls/repo/tests/suites/
Dtest_suite_psa_crypto_persistent_key.function119 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, 42 );
128 psa_set_key_id( &attributes, key_id );
131 TEST_EQUAL( psa_import_key( &attributes, data, data_length, &key_id ),
135 PSA_ASSERT( psa_destroy_key( key_id ) );
140 psa_destroy_persistent_key( key_id );
149 mbedtls_svc_key_id_t key_id =
158 psa_set_key_id( &attributes, key_id );
166 psa_close_key( key_id );
170 TEST_EQUAL( psa_is_key_present_in_storage( key_id ), 1 );
173 PSA_ASSERT( psa_destroy_key( key_id ) );
[all …]
Dtest_suite_psa_crypto_not_supported.function19 mbedtls_svc_key_id_t key_id = INVALID_KEY_ID;
25 &key_id ),
27 TEST_ASSERT( mbedtls_svc_key_id_equal( key_id, MBEDTLS_SVC_KEY_ID_INIT ) );
30 psa_destroy_key( key_id );
39 mbedtls_svc_key_id_t key_id = INVALID_KEY_ID;
44 TEST_EQUAL( psa_generate_key( &attributes, &key_id ),
46 TEST_ASSERT( mbedtls_svc_key_id_equal( key_id, MBEDTLS_SVC_KEY_ID_INIT ) );
49 psa_destroy_key( key_id );
Dtest_suite_psa_crypto_storage_format.function76 mbedtls_svc_key_id_t key_id = psa_get_key_id( expected_attributes );
86 PSA_ASSERT( psa_get_key_attributes( key_id, &actual_attributes ) );
87 TEST_ASSERT( mbedtls_svc_key_id_equal( key_id,
104 PSA_ASSERT( psa_export_key( key_id,
114 key_id,
124 TEST_EQUAL( PSA_ERROR_NOT_PERMITTED, psa_destroy_key( key_id ) );
129 PSA_ASSERT( psa_destroy_key( key_id ) );
166 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 0, 1 );
171 TEST_USES_KEY_ID( key_id );
174 psa_set_key_id( &attributes, key_id );
[all …]
Dtest_suite_psa_crypto_generate_key.function19 mbedtls_svc_key_id_t key_id = INVALID_KEY_ID;
29 TEST_EQUAL( psa_generate_key( &attributes, &key_id ),
36 PSA_ASSERT( psa_get_key_attributes( key_id, &attributes ) );
46 psa_destroy_key( key_id );
Dtest_suite_x509write.function150 mbedtls_svc_key_id_t key_id = MBEDTLS_SVC_KEY_ID_INIT;
167 TEST_ASSERT( mbedtls_pk_wrap_as_opaque( &key, &key_id, md_alg_psa ) == 0 );
191 psa_destroy_key( key_id );
Dtest_suite_psa_crypto_slot_management.function738 psa_key_id_t key_id;
775 key_id = PSA_KEY_ID_VOLATILE_MIN + 1;
777 key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( valid_handle ) - 1;
780 mbedtls_svc_key_id_make( 0, key_id );
Dtest_suite_pk.function1222 mbedtls_svc_key_id_t key_id;
1254 TEST_ASSERT( mbedtls_pk_wrap_as_opaque( &pk, &key_id,
1257 PSA_ASSERT( psa_get_key_attributes( key_id, &attributes ) );
1282 TEST_ASSERT( PSA_SUCCESS == psa_destroy_key( key_id ) );
Dtest_suite_psa_crypto.function206 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, 0x6964 );
211 psa_set_key_id( &attributes, key_id );
1462 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, target_id_arg );
1476 psa_set_key_id( &target_attributes, key_id );
5400 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, 1 );
5423 psa_set_key_id( &attributes, key_id );
5500 psa_get_key_id( &attributes ), key_id ) );
/openthread-3.5.0/third_party/mbedtls/repo/tests/include/test/
Dpsa_crypto_helpers.h39 int mbedtls_test_uses_key_id( mbedtls_svc_key_id_t key_id );
78 #define TEST_USES_KEY_ID( key_id ) \ argument
79 TEST_ASSERT( mbedtls_test_uses_key_id( key_id ) )
83 #define TEST_USES_KEY_ID( key_id ) ( (void) ( key_id ) ) argument
/openthread-3.5.0/tests/scripts/thread-cert/
Dtest_crypto.py46 data += aux_sec_hdr.key_id
74 key_id = any_key_id(key_id_mode)
76 … net_crypto.AuxiliarySecurityHeader(key_id_mode, any_security_level(), any_frame_counter(), key_id)
111key_id=bytearray([0x00, 0x00, 0x00, 0x00, 0x01]))
145key_id=bytearray([0x00, 0x00, 0x00, 0x00, 0x01]))
184key_id=any_key_id(key_id_mode))
391 key_id = any_key_id(key_id_mode)
394 key_id)
397 actual_key_id = aux_sec_hdr_obj.key_id
400 self.assertEqual(key_id, actual_key_id)
[all …]
Dnet_crypto.py270 key_id, argument
283 self._key_id = key_id
291 key_source = self.key_id[:8]
300 key_source = self.key_id[:4]
309 return struct.unpack(">B", self.key_id[-1:])[0]
324 def key_id(self): member in AuxiliarySecurityHeader
332 hexlify(self.key_id),
Dmac802154.py396 key_id = data.read(1)
398 key_id = data.read(5)
400 key_id = data.read(9)
408 key_id,
/openthread-3.5.0/third_party/mbedtls/repo/tests/src/
Dpsa_crypto_helpers.c39 int mbedtls_test_uses_key_id( mbedtls_svc_key_id_t key_id ) in mbedtls_test_uses_key_id() argument
42 if( MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key_id ) > in mbedtls_test_uses_key_id()
50 if( mbedtls_svc_key_id_equal( key_id, key_ids_used_in_test[i] ) ) in mbedtls_test_uses_key_id()
55 key_ids_used_in_test[num_key_ids_used] = key_id; in mbedtls_test_uses_key_id()
/openthread-3.5.0/third_party/mbedtls/repo/library/
Dpsa_crypto_slot_management.h54 static inline int psa_key_id_is_volatile( psa_key_id_t key_id ) in psa_key_id_is_volatile() argument
56 return( ( key_id >= PSA_KEY_ID_VOLATILE_MIN ) && in psa_key_id_is_volatile()
57 ( key_id <= PSA_KEY_ID_VOLATILE_MAX ) ); in psa_key_id_is_volatile()
Dpsa_crypto_slot_management.c56 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key ); in psa_is_valid_key_id() local
58 if( ( PSA_KEY_ID_USER_MIN <= key_id ) && in psa_is_valid_key_id()
59 ( key_id <= PSA_KEY_ID_USER_MAX ) ) in psa_is_valid_key_id()
63 ( PSA_KEY_ID_VENDOR_MIN <= key_id ) && in psa_is_valid_key_id()
64 ( key_id <= PSA_KEY_ID_VENDOR_MAX ) ) in psa_is_valid_key_id()
105 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key ); in psa_get_and_lock_key_slot_in_memory() local
109 if( psa_key_id_is_volatile( key_id ) ) in psa_get_and_lock_key_slot_in_memory()
111 slot = &global_data.key_slots[ key_id - PSA_KEY_ID_VOLATILE_MIN ]; in psa_get_and_lock_key_slot_in_memory()
Dpkwrite.c201 psa_key_id_t* key_id = (psa_key_id_t*) key->pk_ctx; in mbedtls_pk_write_pubkey() local
207 if ( psa_export_public_key( *key_id, start, buffer_size, &len ) in mbedtls_pk_write_pubkey()
268 psa_key_id_t key_id; in mbedtls_pk_write_pubkey_der() local
272 key_id = *((psa_key_id_t*) key->pk_ctx ); in mbedtls_pk_write_pubkey_der()
273 if( PSA_SUCCESS != psa_get_key_attributes( key_id, &attributes ) ) in mbedtls_pk_write_pubkey_der()
Dpk_wrap.c546 psa_key_id_t key_id = 0; in ecdsa_verify_wrap() local
579 &key_id ); in ecdsa_verify_wrap()
601 if( psa_verify_hash( key_id, psa_sig_md, in ecdsa_verify_wrap()
618 psa_destroy_key( key_id ); in ecdsa_verify_wrap()
Dpsa_crypto.c1676 slot->attr.id.key_id = volatile_key_id; in psa_start_key_creation()
/openthread-3.5.0/third_party/mbedtls/repo/include/psa/
Dcrypto_extra.h757 static inline int psa_key_id_is_builtin( psa_key_id_t key_id ) in psa_key_id_is_builtin() argument
759 return( ( key_id >= MBEDTLS_PSA_KEY_ID_BUILTIN_MIN ) && in psa_key_id_is_builtin()
760 ( key_id <= MBEDTLS_PSA_KEY_ID_BUILTIN_MAX ) ); in psa_key_id_is_builtin()
808 mbedtls_svc_key_id_t key_id,
Dcrypto_values.h2075 unsigned int unused, psa_key_id_t key_id ) in mbedtls_svc_key_id_make() argument
2079 return( key_id ); in mbedtls_svc_key_id_make()
2109 #define MBEDTLS_SVC_KEY_ID_GET_KEY_ID( id ) ( ( id ).key_id )
2118 mbedtls_key_owner_id_t owner_id, psa_key_id_t key_id ) in mbedtls_svc_key_id_make() argument
2120 return( (mbedtls_svc_key_id_t){ .key_id = key_id, in mbedtls_svc_key_id_make()
2134 return( ( id1.key_id == id2.key_id ) && in mbedtls_svc_key_id_equal()
2146 return( key.key_id == 0 ); in mbedtls_svc_key_id_is_null()
Dcrypto_types.h237 psa_key_id_t key_id; member
Dcrypto_struct.h381 attributes->core.id.key_id = 0; in psa_set_key_lifetime()
/openthread-3.5.0/third_party/mbedtls/repo/tests/src/drivers/
Dplatform_builtin_keys.c71 mbedtls_svc_key_id_t key_id, in mbedtls_psa_platform_get_builtin_key() argument
75 psa_key_id_t app_key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key_id ); in mbedtls_psa_platform_get_builtin_key()
/openthread-3.5.0/third_party/mbedtls/repo/docs/
Dgetting_started.md79 psa_key_id_t key_id;
98 status = psa_import_key(&attributes, key, key_len, &key_id);
109 psa_destroy_key(key_id);
138 psa_key_id_t key_id;
157 status = psa_import_key(&attributes, key, key_len, &key_id);
164 status = psa_sign_hash(key_id, PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
179 psa_destroy_key(key_id);
216 psa_key_id_t key_id;
235 status = psa_import_key(&attributes, key, key_len, &key_id);
243 status = psa_cipher_encrypt_setup(&operation, key_id, alg);
[all …]
/openthread-3.5.0/third_party/mbedtls/repo/docs/architecture/
Dmbed-crypto-storage-specification.md84 …N "psa_key_slot_%lu", key_id)` [content](#key-file-format-for-0.1.0) of the [key whose identifier]…
115 * PSA service integration: the key file name is `(uint32_t)owner_uid << 32 | key_id` where `key_id`…