Home
last modified time | relevance | path

Searched refs:key_attributes (Results 1 – 7 of 7) sorted by relevance

/Zephyr-latest/tests/subsys/secure_storage/psa/crypto/src/
Dmain.c17 static void fill_key_attributes(psa_key_attributes_t *key_attributes) in fill_key_attributes() argument
19 *key_attributes = psa_key_attributes_init(); in fill_key_attributes()
20 psa_set_key_lifetime(key_attributes, PSA_KEY_LIFETIME_PERSISTENT); in fill_key_attributes()
21 psa_set_key_usage_flags(key_attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT); in fill_key_attributes()
22 psa_set_key_id(key_attributes, ID); in fill_key_attributes()
23 psa_set_key_type(key_attributes, KEY_TYPE); in fill_key_attributes()
24 psa_set_key_algorithm(key_attributes, ALG); in fill_key_attributes()
25 psa_set_key_bits(key_attributes, KEY_BITS); in fill_key_attributes()
36 psa_key_attributes_t key_attributes; in ZTEST() local
52 fill_key_attributes(&key_attributes); in ZTEST()
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dcrypto_psa.c240 psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; in bt_mesh_pub_key_gen() local
251 psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_DERIVE); in bt_mesh_pub_key_gen()
252 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in bt_mesh_pub_key_gen()
253 psa_set_key_algorithm(&key_attributes, PSA_ALG_ECDH); in bt_mesh_pub_key_gen()
254 psa_set_key_type(&key_attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)); in bt_mesh_pub_key_gen()
255 psa_set_key_bits(&key_attributes, 256); in bt_mesh_pub_key_gen()
258 status = psa_generate_key(&key_attributes, &dh_pair.priv_key_id); in bt_mesh_pub_key_gen()
279 psa_reset_key_attributes(&key_attributes); in bt_mesh_pub_key_gen()
388 psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; in bt_mesh_key_import() local
395 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in bt_mesh_key_import()
[all …]
/Zephyr-latest/subsys/net/lib/wifi_credentials/
Dwifi_credentials_backend_psa.c46 psa_key_attributes_t key_attributes = {0}; in wifi_credentials_store_entry() local
49 psa_set_key_id(&key_attributes, idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN); in wifi_credentials_store_entry()
50 psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_EXPORT); in wifi_credentials_store_entry()
51 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_PERSISTENT); in wifi_credentials_store_entry()
52 psa_set_key_algorithm(&key_attributes, PSA_ALG_NONE); in wifi_credentials_store_entry()
53 psa_set_key_type(&key_attributes, PSA_KEY_TYPE_RAW_DATA); in wifi_credentials_store_entry()
54 psa_set_key_bits(&key_attributes, buf_len * 8); in wifi_credentials_store_entry()
56 ret = psa_import_key(&key_attributes, buf, buf_len, &key_id); in wifi_credentials_store_entry()
/Zephyr-latest/samples/psa/persistent_key/src/
Dmain.c19 psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; in generate_persistent_key() local
21 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_PERSISTENT); in generate_persistent_key()
22 psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT); in generate_persistent_key()
23 psa_set_key_id(&key_attributes, SAMPLE_KEY_ID); in generate_persistent_key()
24 psa_set_key_type(&key_attributes, SAMPLE_KEY_TYPE); in generate_persistent_key()
25 psa_set_key_algorithm(&key_attributes, SAMPLE_ALG); in generate_persistent_key()
26 psa_set_key_bits(&key_attributes, SAMPLE_KEY_BITS); in generate_persistent_key()
28 ret = psa_generate_key(&key_attributes, &key_id); in generate_persistent_key()
/Zephyr-latest/subsys/secure_storage/src/its/transform/
Daead.c17 psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; in psa_aead_crypt() local
29 psa_set_key_usage_flags(&key_attributes, operation); in psa_aead_crypt()
30 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in psa_aead_crypt()
31 psa_set_key_type(&key_attributes, key_type); in psa_aead_crypt()
32 psa_set_key_algorithm(&key_attributes, alg); in psa_aead_crypt()
33 psa_set_key_bits(&key_attributes, sizeof(key) * 8); in psa_aead_crypt()
48 ret = aead_crypt(&key_attributes, key, sizeof(key), alg, nonce, in psa_aead_crypt()
/Zephyr-latest/samples/tfm_integration/psa_crypto/src/
Dpsa_crypto.c115 psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; in crp_imp_key_secp256r1() local
129 psa_set_key_id(&key_attributes, key_id); in crp_imp_key_secp256r1()
130 psa_set_key_usage_flags(&key_attributes, key_usage); in crp_imp_key_secp256r1()
131 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_PERSISTENT); in crp_imp_key_secp256r1()
132 psa_set_key_algorithm(&key_attributes, alg); in crp_imp_key_secp256r1()
133 psa_set_key_type(&key_attributes, key_type); in crp_imp_key_secp256r1()
137 psa_import_key(&key_attributes, key_data, key_len, &key_handle), in crp_imp_key_secp256r1()
227 psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; in crp_gen_key_secp256r1() local
240 psa_set_key_id(&key_attributes, key_id); in crp_gen_key_secp256r1()
241 psa_set_key_usage_flags(&key_attributes, key_usage); in crp_gen_key_secp256r1()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dtest_provision.c436 psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT; in generate_oob_key_pair() local
445 psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_DERIVE | PSA_KEY_USAGE_EXPORT); in generate_oob_key_pair()
446 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in generate_oob_key_pair()
447 psa_set_key_algorithm(&key_attributes, PSA_ALG_ECDH); in generate_oob_key_pair()
448 psa_set_key_type(&key_attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)); in generate_oob_key_pair()
449 psa_set_key_bits(&key_attributes, 256); in generate_oob_key_pair()
452 status = psa_generate_key(&key_attributes, &priv_key_id); in generate_oob_key_pair()