/Zephyr-latest/tests/bsim/bluetooth/mesh/src/ |
D | distribute_keyid.c | 49 int bt_mesh_user_keyid_free(psa_key_id_t key_id) in bt_mesh_user_keyid_free() argument 51 if (IN_RANGE(key_id, BT_MESH_TEST_PSA_KEY_ID_USER_MIN, in bt_mesh_user_keyid_free() 53 atomic_clear_bit(pst_keys, key_id - BT_MESH_TEST_PSA_KEY_ID_USER_MIN); in bt_mesh_user_keyid_free() 55 LOG_INF("key id %d is freed", key_id); in bt_mesh_user_keyid_free() 63 void bt_mesh_user_keyid_assign(psa_key_id_t key_id) in bt_mesh_user_keyid_assign() argument 65 if (IN_RANGE(key_id, BT_MESH_TEST_PSA_KEY_ID_USER_MIN, in bt_mesh_user_keyid_assign() 67 atomic_set_bit(pst_keys, key_id - BT_MESH_TEST_PSA_KEY_ID_USER_MIN); in bt_mesh_user_keyid_assign() 68 LOG_INF("key id %d is assigned", key_id); in bt_mesh_user_keyid_assign() 70 LOG_WRN("key id %d is out of the reserved id range", key_id); in bt_mesh_user_keyid_assign()
|
/Zephyr-latest/drivers/crypto/ |
D | crypto_ataes132a.c | 38 ataes132a_state[i].key_id = i; in ataes132a_init_states() 186 uint8_t key_id, in ataes132a_aes_ccm_decrypt() argument 214 if (!(ataes132a_state[key_id].key_config & ATAES_KEYCONFIG_EXTERNAL)) { in ataes132a_aes_ccm_decrypt() 215 LOG_ERR("key %x external mode disabled", key_id); in ataes132a_aes_ccm_decrypt() 234 if (!(ataes132a_state[key_id].key_config & ATAES_KEYCONFIG_AUTHKEY)) { in ataes132a_aes_ccm_decrypt() 236 " previous authentication", key_id); in ataes132a_aes_ccm_decrypt() 249 if (ataes132a_state[key_id].key_config & ATAES_KEYCONFIG_RAND_NONCE) { in ataes132a_aes_ccm_decrypt() 251 " nonce_buf will be ignored", key_id); in ataes132a_aes_ccm_decrypt() 263 if (!(ataes132a_state[key_id].key_config & ATAES_KEYCONFIG_RAND_NONCE) in ataes132a_aes_ccm_decrypt() 294 if (!(ataes132a_state[key_id].key_config & ATAES_KEYCONFIG_RAND_NONCE) in ataes132a_aes_ccm_decrypt() [all …]
|
D | crypto_ataes132a_priv.h | 204 uint8_t key_id; member 311 uint8_t key_id, 359 uint8_t key_id, 387 uint8_t key_id,
|
/Zephyr-latest/samples/tfm_integration/psa_crypto/src/ |
D | psa_crypto.c | 49 static psa_status_t crp_get_pub_key(psa_key_id_t key_id, in crp_get_pub_key() argument 56 LOG_INF("Retrieving public key for key #%d", key_id); in crp_get_pub_key() 61 psa_open_key(key_id, &key_handle), in crp_get_pub_key() 64 LOG_ERR("Failed to open persistent key #%d", key_id); in crp_get_pub_key() 110 static psa_status_t crp_imp_key_secp256r1(psa_key_id_t key_id, in crp_imp_key_secp256r1() argument 125 LOG_INF("Persisting SECP256R1 key as #%d", (uint32_t)key_id); in crp_imp_key_secp256r1() 129 psa_set_key_id(&key_attributes, key_id); in crp_imp_key_secp256r1() 154 status = crp_get_pub_key(key_id, data_out, sizeof(data_out), &data_len); in crp_imp_key_secp256r1() 160 psa_open_key(key_id, &key_handle), in crp_imp_key_secp256r1() 163 LOG_ERR("Failed to open persistent key #%d", key_id); in crp_imp_key_secp256r1() [all …]
|
/Zephyr-latest/subsys/bluetooth/host/ |
D | crypto_psa.c | 64 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_INIT; in bt_encrypt_le() local 82 if (psa_import_key(&attr, tmp, 16, &key_id) != PSA_SUCCESS) { in bt_encrypt_le() 89 status = psa_cipher_encrypt(key_id, PSA_ALG_ECB_NO_PADDING, tmp, 16, in bt_encrypt_le() 95 destroy_status = psa_destroy_key(key_id); in bt_encrypt_le() 115 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_INIT; in bt_encrypt_be() local 130 if (psa_import_key(&attr, key, 16, &key_id) != PSA_SUCCESS) { in bt_encrypt_be() 135 status = psa_cipher_encrypt(key_id, PSA_ALG_ECB_NO_PADDING, in bt_encrypt_be() 141 destroy_status = psa_destroy_key(key_id); in bt_encrypt_be()
|
D | hci_ecc.c | 108 psa_key_id_t key_id; in generate_keys() local 114 if (psa_generate_key(&attr, &key_id) != PSA_SUCCESS) { in generate_keys() 119 if (psa_export_public_key(key_id, tmp_pub_key_buf, sizeof(tmp_pub_key_buf), in generate_keys() 130 if (psa_export_key(key_id, ecc.private_key_be, BT_PRIV_KEY_LEN, in generate_keys() 136 if (psa_destroy_key(key_id) != PSA_SUCCESS) { in generate_keys() 194 psa_key_id_t key_id; in emulate_le_generate_dhkey() local 204 BT_PRIV_KEY_LEN, &key_id) != PSA_SUCCESS) { in emulate_le_generate_dhkey() 211 if (psa_raw_key_agreement(PSA_ALG_ECDH, key_id, tmp_pub_key_buf, in emulate_le_generate_dhkey() 219 if (psa_destroy_key(key_id) != PSA_SUCCESS) { in emulate_le_generate_dhkey()
|
D | smp.c | 5310 uint8_t key_id[4] = { 0x72, 0x62, 0x65, 0x6c }; in smp_h6_test() local 5316 err = bt_crypto_h6(w, key_id, res); in smp_h6_test() 5358 uint8_t key_id[4] = {0xcc, 0x03, 0x01, 0x48}; in smp_h8_test() local 5365 err = bt_crypto_h8(k, s, key_id, res); in smp_h8_test()
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | crypto_psa.c | 162 struct bt_mesh_key key_id; in bt_mesh_aes_cmac_raw_key() local 165 err = bt_mesh_key_import(BT_MESH_KEY_TYPE_CMAC, key, &key_id); in bt_mesh_aes_cmac_raw_key() 170 err = bt_mesh_aes_cmac_mesh_key(&key_id, sg, sg_len, mac); in bt_mesh_aes_cmac_raw_key() 172 psa_destroy_key(key_id.key); in bt_mesh_aes_cmac_raw_key() 184 psa_key_id_t key_id; in bt_mesh_sha256_hmac_raw_key() local 196 status = psa_import_key(&attributes, key, 32, &key_id); in bt_mesh_sha256_hmac_raw_key() 204 status = psa_mac_sign_setup(&operation, key_id, alg); in bt_mesh_sha256_hmac_raw_key() 233 psa_destroy_key(key_id); in bt_mesh_sha256_hmac_raw_key() 367 __weak int bt_mesh_user_keyid_free(psa_key_id_t key_id) in bt_mesh_user_keyid_free() argument 369 if (IN_RANGE(key_id, BT_MESH_PSA_KEY_ID_USER_MIN, in bt_mesh_user_keyid_free() [all …]
|
/Zephyr-latest/subsys/net/lib/wifi_credentials/ |
D | wifi_credentials_backend_psa.c | 29 size_t key_id = i + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; in wifi_credentials_backend_init() local 31 ret = psa_export_key(key_id, buf, ARRAY_SIZE(buf), &length_read); in wifi_credentials_backend_init() 47 psa_key_id_t key_id; in wifi_credentials_store_entry() local 56 ret = psa_import_key(&key_attributes, buf, buf_len, &key_id); in wifi_credentials_store_entry() 83 size_t key_id = idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; in wifi_credentials_load_entry() local 86 ret = psa_export_key(key_id, buf, buf_len, &length_read); in wifi_credentials_load_entry()
|
/Zephyr-latest/subsys/bluetooth/crypto/ |
D | bt_crypto_psa.c | 21 psa_key_id_t key_id; in bt_crypto_aes_cmac() local 32 status = psa_import_key(&key_attr, key, 16, &key_id); in bt_crypto_aes_cmac() 38 status = psa_mac_compute(key_id, PSA_ALG_CMAC, in, len, out, 16, &out_size); in bt_crypto_aes_cmac() 39 destroy_status = psa_destroy_key(key_id); in bt_crypto_aes_cmac()
|
D | bt_crypto.c | 192 int bt_crypto_h6(const uint8_t w[16], const uint8_t key_id[4], uint8_t res[16]) in bt_crypto_h6() 199 LOG_DBG("key_id %s", bt_hex(key_id, 4)); in bt_crypto_h6() 202 sys_memcpy_swap(key_id_s, key_id, 4); in bt_crypto_h6() 240 int bt_crypto_h8(const uint8_t k[16], const uint8_t s[16], const uint8_t key_id[4], uint8_t res[16]) in bt_crypto_h8() 250 LOG_DBG("key_id %s", bt_hex(key_id, 4)); in bt_crypto_h8() 260 sys_memcpy_swap(key_id_s, key_id, 4); in bt_crypto_h8()
|
D | bt_crypto.h | 113 int bt_crypto_h6(const uint8_t w[16], const uint8_t key_id[4], uint8_t res[16]); 147 int bt_crypto_h8(const uint8_t k[16], const uint8_t s[16], const uint8_t key_id[4],
|
/Zephyr-latest/subsys/jwt/ |
D | jwt_psa.c | 22 psa_key_id_t key_id; in jwt_sign_impl() local 38 status = psa_import_key(&attr, der_key, der_key_len, &key_id); in jwt_sign_impl() 43 status = psa_sign_message(key_id, alg, in jwt_sign_impl() 48 psa_destroy_key(key_id); in jwt_sign_impl()
|
/Zephyr-latest/modules/openthread/platform/ |
D | crypto_psa.c | 427 psa_key_id_t key_id = 0; in otPlatCryptoEcdsaGenerateKey() local 436 status = psa_generate_key(&attributes, &key_id); in otPlatCryptoEcdsaGenerateKey() 441 status = psa_export_key(key_id, aKeyPair->mDerBytes, OT_CRYPTO_ECDSA_MAX_DER_SIZE, in otPlatCryptoEcdsaGenerateKey() 450 psa_destroy_key(key_id); in otPlatCryptoEcdsaGenerateKey() 460 psa_key_id_t key_id; in otPlatCryptoEcdsaSign() local 469 status = psa_import_key(&attributes, aKeyPair->mDerBytes, aKeyPair->mDerLength, &key_id); in otPlatCryptoEcdsaSign() 474 status = psa_sign_hash(key_id, PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256), aHash->m8, in otPlatCryptoEcdsaSign() 483 psa_destroy_key(key_id); in otPlatCryptoEcdsaSign() 493 psa_key_id_t key_id; in otPlatCryptoEcdsaVerify() local 508 status = psa_import_key(&attributes, buffer, sizeof(buffer), &key_id); in otPlatCryptoEcdsaVerify() [all …]
|
D | radio.c | 1324 keys[0].key_id = &prev_key_id; in otPlatRadioSetMacKey() 1327 keys[1].key_id = &aKeyId; in otPlatRadioSetMacKey() 1330 keys[2].key_id = &next_key_id; in otPlatRadioSetMacKey()
|
/Zephyr-latest/tests/subsys/secure_storage/psa/crypto/src/ |
D | main.c | 38 psa_key_id_t key_id; in ZTEST() local 53 ret = psa_generate_key(&key_attributes, &key_id); in ZTEST() 55 zassert_equal(key_id, ID); in ZTEST() 90 psa_key_id_t key_id; in ZTEST() local 95 ret = psa_import_key(&key_attributes, key_material, sizeof(key_material), &key_id); in ZTEST() 97 zassert_equal(key_id, ID); in ZTEST()
|
/Zephyr-latest/samples/psa/persistent_key/src/ |
D | main.c | 18 psa_key_id_t key_id; in generate_persistent_key() local 28 ret = psa_generate_key(&key_attributes, &key_id); in generate_persistent_key() 33 __ASSERT_NO_MSG(key_id == SAMPLE_KEY_ID); in generate_persistent_key()
|
/Zephyr-latest/tests/bluetooth/bt_crypto/src/ |
D | test_bt_crypto.c | 138 uint8_t key_id[4] = {0x72, 0x62, 0x65, 0x6c}; in ZTEST() local 144 bt_crypto_h6(w, key_id, res); in ZTEST() 169 uint8_t key_id[4] = {0x48, 0x01, 0x03, 0xcc}; in ZTEST() local 175 bt_crypto_h8(k, s, key_id, res); in ZTEST()
|
/Zephyr-latest/tests/net/lib/wifi_credentials_backend_psa/src/ |
D | main.c | 178 psa_key_id_t key_id = idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; in ZTEST() local 184 zassert_equal(psa_export_key_fake.arg0_val, key_id, "Export key arg0 mismatch"); in ZTEST() 189 key_id = idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; in ZTEST() 194 zassert_equal(psa_export_key_fake.arg0_val, key_id, "Export key arg0 mismatch"); in ZTEST()
|
/Zephyr-latest/include/zephyr/net/ |
D | ieee802154_radio.h | 619 uint8_t *key_id; member
|
/Zephyr-latest/drivers/ieee802154/ |
D | ieee802154_nrf5.c | 843 .id.p_key_id = mac_keys->key_id, in nrf5_config_mac_keys()
|