Lines Matching refs:key_attributes
240 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()
396 psa_set_key_usage_flags(&key_attributes, in bt_mesh_key_import()
398 psa_set_key_algorithm(&key_attributes, PSA_ALG_ECB_NO_PADDING); in bt_mesh_key_import()
401 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in bt_mesh_key_import()
402 psa_set_key_usage_flags(&key_attributes, in bt_mesh_key_import()
404 psa_set_key_algorithm(&key_attributes, in bt_mesh_key_import()
408 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in bt_mesh_key_import()
409 psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_SIGN_MESSAGE); in bt_mesh_key_import()
410 psa_set_key_algorithm(&key_attributes, PSA_ALG_CMAC); in bt_mesh_key_import()
420 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_PERSISTENT); in bt_mesh_key_import()
421 psa_set_key_id(&key_attributes, key_id); in bt_mesh_key_import()
423 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in bt_mesh_key_import()
425 psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_EXPORT); in bt_mesh_key_import()
436 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_PERSISTENT); in bt_mesh_key_import()
437 psa_set_key_id(&key_attributes, key_id); in bt_mesh_key_import()
439 psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_VOLATILE); in bt_mesh_key_import()
441 psa_set_key_usage_flags(&key_attributes, in bt_mesh_key_import()
443 psa_set_key_algorithm(&key_attributes, in bt_mesh_key_import()
450 psa_set_key_type(&key_attributes, PSA_KEY_TYPE_AES); in bt_mesh_key_import()
451 psa_set_key_bits(&key_attributes, 128); in bt_mesh_key_import()
453 status = psa_import_key(&key_attributes, in, 16, &out->key); in bt_mesh_key_import()
461 psa_reset_key_attributes(&key_attributes); in bt_mesh_key_import()