Home
last modified time | relevance | path

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

123456

/subsys/bluetooth/host/classic/
A Dkeys_br.c44 key = &key_pool[i]; in bt_keys_find_link_key()
47 return key; in bt_keys_find_link_key()
59 if (key) { in bt_keys_get_link_key()
60 return key; in bt_keys_get_link_key()
65 if (!key) { in bt_keys_get_link_key()
68 key = &key_pool[0]; in bt_keys_get_link_key()
73 key = current; in bt_keys_get_link_key()
77 if (key) { in bt_keys_get_link_key()
83 if (key) { in bt_keys_get_link_key()
90 return key; in bt_keys_get_link_key()
[all …]
/subsys/bluetooth/controller/ll_sw/openisa/hal/RV32M1/
A Decb.c153 uint8_t *key; in ecb_ut() local
156 ecb_encrypt(ltk_le, skd_le, key = key_le, NULL); in ecb_ut()
158 if (memcmp(key_ref_le, key, 16)) { in ecb_ut()
165 key[0], key[1], key[2], key[3], in ecb_ut()
166 key[4], key[5], key[6], key[7], in ecb_ut()
167 key[8], key[9], key[10], key[11], in ecb_ut()
168 key[12], key[13], key[14], key[15]); in ecb_ut()
/subsys/mgmt/mcumgr/util/src/
A Dzcbor_bulk.c29 struct zcbor_string key; in zcbor_map_decode_bulk() local
33 ok = zcbor_tstr_decode(zsd, &key); in zcbor_map_decode_bulk()
40 if (key.len == dptr->key.len && in zcbor_map_decode_bulk()
41 memcmp(key.value, dptr->key.value, key.len) == 0) { in zcbor_map_decode_bulk()
75 const char *key) in zcbor_map_decode_bulk_key_found() argument
84 if (dptr->key.value == (const uint8_t *)key) { in zcbor_map_decode_bulk_key_found()
91 key_len = strlen(key); in zcbor_map_decode_bulk_key_found()
95 if (dptr->key.len == key_len && in zcbor_map_decode_bulk_key_found()
96 memcmp(key, dptr->key.value, key_len) == 0) { in zcbor_map_decode_bulk_key_found()
/subsys/net/lib/ocpp/
A Dkey_mgmt.c44 enum ocpp_key key; member
123 return cached_key_cfg[key].type; in ocpp_get_keyval_type()
142 return cached_key_cfg[key].is_rw; in ocpp_is_key_rw()
147 if (key >= OCPP_CFG_END) { in ocpp_get_key_val()
151 return &cached_key_cfg[key].val; in ocpp_get_key_val()
156 if (key >= OCPP_CFG_END) { in ocpp_get_key_literal()
160 return cached_key_cfg[key].skey; in ocpp_get_key_literal()
168 key_cfg = &cached_key_cfg[key]; in ocpp_set_cfg_val()
169 type = ocpp_get_keyval_type(key); in ocpp_set_cfg_val()
185 if (key >= OCPP_CFG_END || in ocpp_update_cfg_val()
[all …]
/subsys/bluetooth/mesh/
A Dcdb.c279 struct net_key_val key; in cdb_subnet_set() local
304 err = bt_mesh_settings_set(read_cb, cb_arg, &key, sizeof(key)); in cdb_subnet_set()
369 err = bt_mesh_settings_set(read_cb, cb_arg, &key, sizeof(key)); in cdb_app_key_set()
494 key.unused = 0U; in store_cdb_subnet()
499 err = settings_save_one(path, &key, sizeof(key)); in store_cdb_subnet()
530 key.updated = false; in store_cdb_app_key()
536 err = settings_save_one(path, &key, sizeof(key)); in store_cdb_app_key()
1045 vacant_key = key; in bt_mesh_cdb_app_key_alloc()
1068 memset(key->keys, 0, sizeof(key->keys)); in bt_mesh_cdb_app_key_del()
1080 return key; in bt_mesh_cdb_app_key_get()
[all …]
A Dcrypto_psa.c68 status = psa_cipher_encrypt(key->key, PSA_ALG_ECB_NO_PADDING, in bt_mesh_encrypt()
89 status = psa_aead_encrypt(key->key, alg, in bt_mesh_ccm_encrypt()
112 status = psa_aead_decrypt(key->key, alg, in bt_mesh_ccm_decrypt()
133 status = psa_mac_sign_setup(&operation, key->key, alg); in bt_mesh_aes_cmac_mesh_key()
173 psa_destroy_key(key_id.key); in bt_mesh_aes_cmac_raw_key()
197 status = psa_import_key(&attributes, key, 32, &key_id); in bt_mesh_sha256_hmac_raw_key()
491 keyid_assign(dst->key); in bt_mesh_key_assign()
495 int bt_mesh_key_destroy(const struct bt_mesh_key *key) in bt_mesh_key_destroy() argument
497 if (psa_destroy_key(key->key) != PSA_SUCCESS) { in bt_mesh_key_destroy()
502 return keyid_free(key->key); in bt_mesh_key_destroy()
[all …]
A Dsubnet.c94 struct net_key_val key; in store_subnet() local
110 key.unused = 0U; in store_subnet()
111 key.kr_phase = sub->kr_phase; in store_subnet()
113 err = settings_save_one(path, &key, sizeof(key)); in store_subnet()
199 bt_mesh_key_destroy(&key->net); in subnet_keys_destroy()
200 bt_mesh_key_destroy(&key->msg.enc); in subnet_keys_destroy()
202 bt_mesh_key_destroy(&key->beacon); in subnet_keys_destroy()
969 struct net_key_val key; in net_key_set() local
980 err = bt_mesh_settings_set(read_cb, cb_arg, &key, sizeof(key)); in net_key_set()
989 memcpy(val, key.val, sizeof(key.val)); in net_key_set()
[all …]
A Dapp_keys.c97 struct app_key_val key; in store_app_key() local
109 key.net_idx = app->net_idx, in store_app_key()
110 key.updated = app->updated, in store_app_key()
115 err = settings_save_one(path, &key, sizeof(key)); in store_app_key()
240 const uint8_t key[16]) in bt_mesh_app_key_add()
292 const uint8_t key[16]) in bt_mesh_app_key_update()
384 err = bt_mesh_key_export(raw_key, key); in app_id_set()
664 struct app_key_val key; in app_key_set() local
680 err = bt_mesh_settings_set(read_cb, cb_arg, &key, sizeof(key)); in app_key_set()
688 memcpy(val, key.val, sizeof(key.val)); in app_key_set()
[all …]
A Dcrypto.h23 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16],
26 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext,
30 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *enc_data,
34 int bt_mesh_aes_cmac_mesh_key(const struct bt_mesh_key *key, struct bt_mesh_sg *sg, size_t sg_len,
37 int bt_mesh_aes_cmac_raw_key(const uint8_t key[16], struct bt_mesh_sg *sg, size_t sg_len,
40 int bt_mesh_sha256_hmac_raw_key(const uint8_t key[32], struct bt_mesh_sg *sg, size_t sg_len,
103 int bt_mesh_net_encrypt(const struct bt_mesh_key *key, struct net_buf_simple *buf,
106 int bt_mesh_net_decrypt(const struct bt_mesh_key *key, struct net_buf_simple *buf,
119 int bt_mesh_app_encrypt(const struct bt_mesh_key *key, const struct bt_mesh_app_crypto_ctx *ctx,
122 int bt_mesh_app_decrypt(const struct bt_mesh_key *key, const struct bt_mesh_app_crypto_ctx *ctx,
[all …]
/subsys/pm/policy/
A Dpolicy_latency.c60 k_spinlock_key_t key = k_spin_lock(&latency_lock); in pm_policy_latency_request_add() local
65 k_spin_unlock(&latency_lock, key); in pm_policy_latency_request_add()
71 k_spinlock_key_t key = k_spin_lock(&latency_lock); in pm_policy_latency_request_update() local
76 k_spin_unlock(&latency_lock, key); in pm_policy_latency_request_update()
81 k_spinlock_key_t key = k_spin_lock(&latency_lock); in pm_policy_latency_request_remove() local
86 k_spin_unlock(&latency_lock, key); in pm_policy_latency_request_remove()
92 k_spinlock_key_t key = k_spin_lock(&latency_lock); in pm_policy_latency_changed_subscribe() local
97 k_spin_unlock(&latency_lock, key); in pm_policy_latency_changed_subscribe()
102 k_spinlock_key_t key = k_spin_lock(&latency_lock); in pm_policy_latency_changed_unsubscribe() local
106 k_spin_unlock(&latency_lock, key); in pm_policy_latency_changed_unsubscribe()
/subsys/mgmt/mcumgr/grp/settings_mgmt/src/
A Dsettings_mgmt.c39 struct zcbor_string key = { 0 }; in settings_mgmt_read() local
59 if (!ok || key.len == 0) { in settings_mgmt_read()
90 memcpy(key_name, key.value, key.len); in settings_mgmt_read()
91 key_name[key.len] = 0; in settings_mgmt_read()
164 struct zcbor_string key = { 0 }; in settings_mgmt_write() local
180 if (!ok || key.len == 0) { in settings_mgmt_write()
201 memcpy(key_name, key.value, key.len); in settings_mgmt_write()
202 key_name[key.len] = 0; in settings_mgmt_write()
281 if (!ok || key.len == 0) { in settings_mgmt_delete()
302 memcpy(key_name, key.value, key.len); in settings_mgmt_delete()
[all …]
/subsys/bluetooth/host/
A Daes_ccm.c55 err = bt_encrypt_be(key, b, X0); in ccm_calculate_X0()
79 err = bt_encrypt_be(key, b, X0); in ccm_calculate_X0()
93 err = bt_encrypt_be(key, b, X0); in ccm_calculate_X0()
102 static int ccm_auth(const uint8_t key[16], uint8_t nonce[13], in ccm_auth()
122 err = bt_encrypt_be(key, b, s0); in ccm_auth()
141 err = bt_encrypt_be(key, b, Xn); in ccm_auth()
176 err = bt_encrypt_be(key, a_i, s_i); in ccm_crypt()
194 int bt_ccm_decrypt(const uint8_t key[16], uint8_t nonce[13], in bt_ccm_decrypt()
204 ccm_crypt(key, nonce, enc_data, plaintext, len); in bt_ccm_decrypt()
221 LOG_DBG("key %s", bt_hex(key, 16)); in bt_ccm_encrypt()
[all …]
A Dsettings.c37 const bt_addr_le_t *addr, const char *key) in bt_settings_encode_key() argument
39 if (key) { in bt_settings_encode_key()
44 addr->type, key); in bt_settings_encode_key()
57 const bt_addr_le_t *addr, const char *key) in bt_settings_encode_key() argument
87 if (key && len < path_size) { in bt_settings_encode_key()
90 strncpy(&path[len], key, path_size - len); in bt_settings_encode_key()
108 if (settings_name_next(key, NULL) != 13) { in bt_settings_decode_key()
112 if (key[12] == '0') { in bt_settings_decode_key()
114 } else if (key[12] == '1') { in bt_settings_decode_key()
314 ARG_UNUSED(key); in bt_testing_settings_store_hook()
[all …]
A Dcrypto_psa.c66 int bt_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_le()
75 CHECKIF(key == NULL || plaintext == NULL || enc_data == NULL) { in bt_encrypt_le()
79 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_le()
82 sys_memcpy_swap(tmp, key, 16); in bt_encrypt_le()
118 int bt_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_be()
126 CHECKIF(key == NULL || plaintext == NULL || enc_data == NULL) { in bt_encrypt_be()
130 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_be()
137 status = psa_import_key(&attr, key, 16, &key_id); in bt_encrypt_be()
A Dsettings.h27 int bt_settings_store(const char *key, uint8_t id, const bt_addr_le_t *addr, const void *value,
29 int bt_settings_delete(const char *key, uint8_t id, const bt_addr_le_t *addr);
31 void bt_testing_settings_store_hook(const char *key, const void *value, size_t val_len);
32 void bt_testing_settings_delete_hook(const char *key);
36 const bt_addr_le_t *addr, const char *key);
37 int bt_settings_decode_key(const char *key, bt_addr_le_t *addr);
/subsys/task_wdt/
A Dtask_wdt.c163 k_spinlock_key_t key; in task_wdt_add() local
173 key = k_spin_lock(&channels_lock); in task_wdt_add()
204 k_spin_unlock(&channels_lock, key); in task_wdt_add()
211 k_spinlock_key_t key; in task_wdt_delete() local
217 key = k_spin_lock(&channels_lock); in task_wdt_delete()
221 k_spin_unlock(&channels_lock, key); in task_wdt_delete()
257 k_spinlock_key_t key; in task_wdt_suspend() local
272 key = k_spin_lock(&channels_lock); in task_wdt_suspend()
274 k_spin_unlock(&channels_lock, key); in task_wdt_suspend()
289 k_spinlock_key_t key; in task_wdt_resume() local
[all …]
/subsys/bluetooth/controller/crypto/
A Dcrypto.c23 int bt_encrypt_le(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_le()
26 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_le()
29 ecb_encrypt(key, plaintext, enc_data, NULL); in bt_encrypt_le()
36 int bt_encrypt_be(const uint8_t key[16], const uint8_t plaintext[16], in bt_encrypt_be()
39 LOG_DBG("key %s", bt_hex(key, 16)); in bt_encrypt_be()
42 ecb_encrypt_be(key, plaintext, enc_data); in bt_encrypt_be()
/subsys/portability/cmsis_rtos_v2/
A Dthread_flags.c18 unsigned int key; in osThreadFlagsSet() local
26 key = irq_lock(); in osThreadFlagsSet()
28 irq_unlock(key); in osThreadFlagsSet()
60 int sig, key; in osThreadFlagsClear() local
75 key = irq_lock(); in osThreadFlagsClear()
78 irq_unlock(key); in osThreadFlagsClear()
90 int retval, key; in osThreadFlagsWait() local
178 key = irq_lock(); in osThreadFlagsWait()
180 irq_unlock(key); in osThreadFlagsWait()
A Devent_flags.c64 unsigned int key; in osEventFlagsSet() local
70 key = irq_lock(); in osEventFlagsSet()
72 irq_unlock(key); in osEventFlagsSet()
85 unsigned int key; in osEventFlagsClear() local
92 key = irq_lock(); in osEventFlagsClear()
95 irq_unlock(key); in osEventFlagsClear()
107 int retval, key; in osEventFlagsWait() local
128 key = irq_lock(); in osEventFlagsWait()
154 irq_unlock(key); in osEventFlagsWait()
163 irq_unlock(key); in osEventFlagsWait()
/subsys/pmci/mctp/
A Dmctp_memory.c21 k_spinlock_key_t key = k_spin_lock(&mctp_heap.lock); in mctp_heap_alloc() local
25 k_spin_unlock(&mctp_heap.lock, key); in mctp_heap_alloc()
32 k_spinlock_key_t key = k_spin_lock(&mctp_heap.lock); in mctp_heap_free() local
36 k_spin_unlock(&mctp_heap.lock, key); in mctp_heap_free()
41 k_spinlock_key_t key = k_spin_lock(&mctp_heap.lock); in mctp_heap_realloc() local
45 k_spin_unlock(&mctp_heap.lock, key); in mctp_heap_realloc()
/subsys/portability/cmsis_rtos_v1/
A Dcmsis_signal.c22 int sig, key; in osSignalSet() local
33 key = irq_lock(); in osSignalSet()
36 irq_unlock(key); in osSignalSet()
48 int sig, key; in osSignalClear() local
59 key = irq_lock(); in osSignalClear()
62 irq_unlock(key); in osSignalClear()
73 int retval, key; in osSignalWait() local
158 key = irq_lock(); in osSignalWait()
160 irq_unlock(key); in osSignalWait()
/subsys/usb/device_next/
A Dusbd_msg.c36 k_spinlock_key_t key; in usbd_msg_pub() local
46 key = k_spin_lock(&ml_lock); in usbd_msg_pub()
48 k_spin_unlock(&ml_lock, key); in usbd_msg_pub()
59 k_spinlock_key_t key; in msg_work_handler() local
62 key = k_spin_lock(&ml_lock); in msg_work_handler()
64 k_spin_unlock(&ml_lock, key); in msg_work_handler()
75 key = k_spin_lock(&ml_lock); in msg_work_handler()
77 k_spin_unlock(&ml_lock, key); in msg_work_handler()
/subsys/lorawan/nvm/
A Dlorawan_nvm_settings.c90 const char *key, size_t len, in load_setting() argument
95 key); in load_setting()
101 key); in load_setting()
107 key); in load_setting()
114 static int on_setting_loaded(const char *key, size_t len, in on_setting_loaded() argument
121 LOG_DBG("Key: %s", key); in on_setting_loaded()
127 if (strcmp(descr->name, key) == 0) { in on_setting_loaded()
129 descr->size, key, len, read_cb, cb_arg); in on_setting_loaded()
137 LOG_WRN("Unknown LoRaWAN setting: %s", key); in on_setting_loaded()
/subsys/net/lib/wifi_credentials/
A Dwifi_credentials_backend_settings.c32 static int zephyr_settings_backend_load_val_cb(const char *key, size_t len, in zephyr_settings_backend_load_val_cb() argument
36 int idx = atoi(key); in zephyr_settings_backend_load_val_cb()
39 LOG_DBG("Skipping index [%s]", key); in zephyr_settings_backend_load_val_cb()
62 static int zephyr_settings_backend_load_key_cb(const char *key, size_t len, in zephyr_settings_backend_load_key_cb() argument
68 if (!key) { in zephyr_settings_backend_load_key_cb()
73 int idx = atoi(key); in zephyr_settings_backend_load_key_cb()
75 if ((idx == 0 && strcmp(key, "0") != 0) || idx >= CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES) { in zephyr_settings_backend_load_key_cb()
/subsys/secure_storage/src/its/transform/
A Daead_get.c39 uint8_t key[static CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_SIZE]) in hash_data_into_key()
45 return psa_hash_compute(PSA_ALG_SHA_256, data, data_len, key, in hash_data_into_key()
53 memcpy(key, hash_output, CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_SIZE); in hash_data_into_key()
66 uint8_t key[static CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_SIZE]) in secure_storage_its_transform_aead_get_key()
87 ret = hash_data_into_key(sizeof(data), &data, key); in secure_storage_its_transform_aead_get_key()
99 uint8_t key[static CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_KEY_SIZE]) in secure_storage_its_transform_aead_get_key()
101 return hash_data_into_key(sizeof(uid), &uid, key); in secure_storage_its_transform_aead_get_key()

Completed in 91 milliseconds

123456