Home
last modified time | relevance | path

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

/mbedtls-development/tests/suites/
A Dtest_suite_psa_crypto_persistent_key.function128 psa_set_key_id( &attributes, 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 );
183 psa_set_key_id( &attributes, key_id );
192 psa_destroy_persistent_key( key_id );
200 mbedtls_svc_key_id_t key_id =
208 psa_set_key_id( &attributes, key_id );
248 psa_destroy_persistent_key( key_id );
[all …]
A 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 );
A Dtest_suite_psa_crypto_storage_format.function87 TEST_ASSERT( mbedtls_svc_key_id_equal( key_id,
104 PSA_ASSERT( psa_export_key( key_id,
114 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 );
190 psa_destroy_key( key_id );
210 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 0, 1 );
215 TEST_USES_KEY_ID( key_id );
[all …]
A 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 );
A Dtest_suite_x509write.function151 mbedtls_svc_key_id_t key_id = MBEDTLS_SVC_KEY_ID_INIT;
169 TEST_ASSERT( mbedtls_pk_wrap_as_opaque( &key, &key_id, md_alg_psa ) == 0 );
193 psa_destroy_key( key_id );
A Dtest_suite_pk.function961 mbedtls_svc_key_id_t key_id;
993 TEST_ASSERT( mbedtls_pk_wrap_as_opaque( &pk, &key_id,
996 PSA_ASSERT( psa_get_key_attributes( key_id, &attributes ) );
1021 TEST_ASSERT( PSA_SUCCESS == psa_destroy_key( key_id ) );
A 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 );
A Dtest_suite_psa_crypto.function212 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, 0x6964 );
217 psa_set_key_id( &attributes, key_id );
1734 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, target_id_arg );
1749 psa_set_key_id( &target_attributes, key_id );
6859 mbedtls_svc_key_id_t key_id = mbedtls_svc_key_id_make( 1, 1 );
6882 psa_set_key_id( &attributes, key_id );
6959 psa_get_key_id( &attributes ), key_id ) );
/mbedtls-development/tests/include/test/
A Dpsa_crypto_helpers.h40 int mbedtls_test_uses_key_id( mbedtls_svc_key_id_t key_id );
79 #define TEST_USES_KEY_ID( key_id ) \ argument
80 TEST_ASSERT( mbedtls_test_uses_key_id( key_id ) )
84 #define TEST_USES_KEY_ID( key_id ) ( (void) ( key_id ) ) argument
/mbedtls-development/tests/src/
A Dpsa_crypto_helpers.c38 int mbedtls_test_uses_key_id( mbedtls_svc_key_id_t key_id ) in mbedtls_test_uses_key_id() argument
41 if( MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key_id ) > in mbedtls_test_uses_key_id()
49 if( mbedtls_svc_key_id_equal( key_id, key_ids_used_in_test[i] ) ) in mbedtls_test_uses_key_id()
54 key_ids_used_in_test[num_key_ids_used] = key_id; in mbedtls_test_uses_key_id()
/mbedtls-development/library/
A 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()
A 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()
A 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()
A Dpk_wrap.c563 psa_key_id_t key_id = 0; in ecdsa_verify_wrap() local
596 &key_id ); in ecdsa_verify_wrap()
618 if( psa_verify_hash( key_id, psa_sig_md, in ecdsa_verify_wrap()
635 psa_destroy_key( key_id ); in ecdsa_verify_wrap()
A Dpsa_crypto.c1604 slot->attr.id.key_id = volatile_key_id; in psa_start_key_creation()
/mbedtls-development/include/psa/
A Dcrypto_values.h2211 unsigned int unused, psa_key_id_t key_id ) in mbedtls_svc_key_id_make() argument
2215 return( key_id ); in mbedtls_svc_key_id_make()
2245 #define MBEDTLS_SVC_KEY_ID_GET_KEY_ID( id ) ( ( id ).key_id )
2254 mbedtls_key_owner_id_t owner_id, psa_key_id_t key_id ) in mbedtls_svc_key_id_make() argument
2256 return( (mbedtls_svc_key_id_t){ .MBEDTLS_PRIVATE(key_id) = key_id, in mbedtls_svc_key_id_make()
2270 return( ( id1.MBEDTLS_PRIVATE(key_id) == id2.MBEDTLS_PRIVATE(key_id) ) && in mbedtls_svc_key_id_equal()
2282 return( key.MBEDTLS_PRIVATE(key_id) == 0 ); in mbedtls_svc_key_id_is_null()
A Dcrypto_extra.h759 static inline int psa_key_id_is_builtin( psa_key_id_t key_id ) in psa_key_id_is_builtin() argument
761 return( ( key_id >= MBEDTLS_PSA_KEY_ID_BUILTIN_MIN ) && in psa_key_id_is_builtin()
762 ( key_id <= MBEDTLS_PSA_KEY_ID_BUILTIN_MAX ) ); in psa_key_id_is_builtin()
810 mbedtls_svc_key_id_t key_id,
A Dcrypto_types.h238 psa_key_id_t MBEDTLS_PRIVATE(key_id);
A Dcrypto_struct.h396 attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(id).MBEDTLS_PRIVATE(key_id) = 0; in psa_set_key_lifetime()
/mbedtls-development/tests/src/drivers/
A Dplatform_builtin_keys.c73 mbedtls_svc_key_id_t key_id, in mbedtls_psa_platform_get_builtin_key() argument
77 psa_key_id_t app_key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID( key_id ); in mbedtls_psa_platform_get_builtin_key()
/mbedtls-development/docs/architecture/
A 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`…

Completed in 39 milliseconds