/Zephyr-latest/subsys/bluetooth/host/ |
D | ecc.h | 9 /** Key size used in Bluetooth's ECC domain. */ 11 /** Length of a Bluetooth ECC public key coordinate. */ 13 /** Length of a Bluetooth ECC public key. */ 15 /** Length of a Bluetooth ECC private key. */ 17 /** Length of a Bluetooth Diffie-Hellman key. */ 20 /* @brief Container for public key callback */ 22 /** @brief Callback type for Public Key generation. 24 * Used to notify of the local public key or that the local key is not 28 * @param key The local public key, or NULL in case of no key. 30 void (*func)(const uint8_t key[BT_PUB_KEY_LEN]); [all …]
|
D | keys.h | 1 /* keys.h - Bluetooth key handling */ 97 * @brief Get a call through the callback for each key with the same type 99 * @param type Key type. 107 * @brief Get the key slot reference for an ID and address pair. 115 * the function will try to find the oldest key that isn't in use with a connection. 116 * If a key with matched criteria is found, it will be overwritten with the new one. 118 * @param id Key identifier. 121 * @return A valid reference pointer to the key slot if process succeeded. 127 * @brief Get the key slot reference for an ID and address pair with a certain type. 134 * @param type Key type. [all …]
|
/Zephyr-latest/include/zephyr/dt-bindings/input/ |
D | input-event-codes.h | 25 #define INPUT_EV_KEY 0x01 /**< Key event */ 35 * @name Input event KEY codes. 41 #define INPUT_KEY_0 11 /**< 0 Key */ 42 #define INPUT_KEY_1 2 /**< 1 Key */ 43 #define INPUT_KEY_2 3 /**< 2 Key */ 44 #define INPUT_KEY_3 4 /**< 3 Key */ 45 #define INPUT_KEY_4 5 /**< 4 Key */ 46 #define INPUT_KEY_5 6 /**< 5 Key */ 47 #define INPUT_KEY_6 7 /**< 6 Key */ 48 #define INPUT_KEY_7 8 /**< 7 Key */ [all …]
|
/Zephyr-latest/lib/posix/options/ |
D | key.c | 39 static inline size_t to_posix_key_idx(pthread_key_t key) in to_posix_key_idx() argument 41 return mark_pthread_obj_uninitialized(key); in to_posix_key_idx() 44 static pthread_key_obj *get_posix_key(pthread_key_t key) in get_posix_key() argument 47 size_t bit = to_posix_key_idx(key); in get_posix_key() 50 if (!is_pthread_obj_initialized(key)) { in get_posix_key() 51 LOG_DBG("Key is uninitialized (%x)", key); in get_posix_key() 57 LOG_DBG("Key is invalid (%x)", key); in get_posix_key() 63 LOG_DBG("Key claims to be initialized (%x)", key); in get_posix_key() 70 static pthread_key_obj *to_posix_key(pthread_key_t *key) in to_posix_key() argument 75 if (*key != PTHREAD_KEY_INITIALIZER) { in to_posix_key() [all …]
|
/Zephyr-latest/include/zephyr/bluetooth/mesh/ |
D | cdb.h | 90 * ie one with NetIdx 0, will be added and the provided key will be used as 93 * @param key The NetKey to be used for the primary subnet. 97 int bt_mesh_cdb_create(const uint8_t key[16]); 193 /** @brief Import device key for selected node. 195 * Using security library with PSA implementation access to the key by pointer 196 * will not give a valid value since the key is hidden in the library. 197 * The application has to import the key. 200 * @param in key value. 206 /** @brief Export device key from selected node. 208 * Using security library with PSA implementation access to the key by pointer [all …]
|
D | keys.h | 25 /** The structure that keeps representation of key. */ 27 /** PSA key representation is the PSA key identifier. */ 28 psa_key_id_t key; member 33 /** The structure that keeps representation of key. */ 35 /** tinycrypt key representation is the pure key value. */ 36 uint8_t key[16];
|
/Zephyr-latest/tests/cmake/yaml/ |
D | CMakeLists.txt | 43 yaml_get(actual NAME yaml-test KEY cmake test key-string) 46 COMMENT "yaml key value does not match expectation." 52 yaml_length(actual NAME yaml-test KEY cmake test key-list-string) 58 yaml_get(actual NAME yaml-test KEY cmake test key-list-string) 69 yaml_get(actual NAME yaml-test KEY cmake test key-int) 72 COMMENT "yaml key value does not match expectation." 78 yaml_length(actual NAME yaml-test KEY cmake test key-list-int) 84 yaml_get(actual NAME yaml-test KEY cmake test key-list-int) 95 yaml_get(actual NAME yaml-test KEY cmake test key-int) 98 COMMENT "yaml key value does not match expectation." [all …]
|
/Zephyr-latest/samples/tfm_integration/psa_crypto/src/ |
D | psa_crypto.c | 41 * @brief Extracts the public key from the specified persistent key id. 43 * @param key_id The permanent identifier for the generated key. 44 * @param key Pointer to the buffer where the public key data 46 * @param key_buf_size Size of key buffer in bytes. 47 * @param key_len Number of bytes written into key by this function. 50 uint8_t *key, size_t key_buf_size, in crp_get_pub_key() argument 56 LOG_INF("Retrieving public key for key #%d", key_id); in crp_get_pub_key() 59 /* Now try to re-open the persisted key based on the key ID. */ in crp_get_pub_key() 64 LOG_ERR("Failed to open persistent key #%d", key_id); in crp_get_pub_key() 68 /* Export the persistent key's public key part. */ in crp_get_pub_key() [all …]
|
/Zephyr-latest/tests/posix/common/src/ |
D | key.c | 16 static pthread_key_t key; variable 28 zassert_ok(pthread_setspecific(key, value), "pthread_setspecific failed"); in thread_top() 29 zassert_equal(pthread_getspecific(key), value, "set and retrieved values are different"); in thread_top() 53 zassert_ok(pthread_key_create(&key, NULL), "insufficient memory to create key"); in make_key() 68 * create a key via pthread_key_create() API. It then sets the 69 * thread-specific value to the key using pthread_setspecific() and 71 * are equal. It then deletes the key using pthread_key_delete(). 73 * using the same key and the other with a single thread using 77 ZTEST(key, test_key_1toN_thread) in ZTEST() argument 82 zassert_ok(pthread_once(&key_once, make_key), "attempt to create key failed"); in ZTEST() [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/settings_clear/src/ |
D | bt_settings_hook.c | 20 char *key; member 28 static void add_key(const char *key) in add_key() argument 31 size_t key_size = strlen(key); in add_key() 40 if (strcmp(loop_node->key, key) == 0) { in add_key() 49 new_node->key = k_malloc(sizeof(char) * key_size); in add_key() 50 TEST_ASSERT(new_node->key != NULL, "Failed to malloc new_node->key"); in add_key() 52 memcpy(new_node->key, key, sizeof(char) * key_size); in add_key() 61 static void remove_key(const char *key) in remove_key() argument 71 if (strcmp(loop_node->key, key) == 0) { in remove_key() 81 k_free(loop_node->key); in remove_key() [all …]
|
/Zephyr-latest/modules/lvgl/ |
D | lvgl_mem.c | 28 k_spinlock_key_t key; in lvgl_malloc() local 31 key = k_spin_lock(&lvgl_heap_lock); in lvgl_malloc() 33 k_spin_unlock(&lvgl_heap_lock, key); in lvgl_malloc() 40 k_spinlock_key_t key; in lvgl_realloc() local 43 key = k_spin_lock(&lvgl_heap_lock); in lvgl_realloc() 45 k_spin_unlock(&lvgl_heap_lock, key); in lvgl_realloc() 52 k_spinlock_key_t key; in lvgl_free() local 54 key = k_spin_lock(&lvgl_heap_lock); in lvgl_free() 56 k_spin_unlock(&lvgl_heap_lock, key); in lvgl_free() 61 k_spinlock_key_t key; in lvgl_print_heap_info() local [all …]
|
/Zephyr-latest/subsys/bluetooth/host/classic/ |
D | keys_br.c | 1 /* keys_br.c - Bluetooth BR/EDR key handling */ 38 struct bt_keys_link_key *key; in bt_keys_find_link_key() local 44 key = &key_pool[i]; in bt_keys_find_link_key() 46 if (bt_addr_eq(&key->addr, addr)) { in bt_keys_find_link_key() 47 return key; in bt_keys_find_link_key() 56 struct bt_keys_link_key *key; in bt_keys_get_link_key() local 58 key = bt_keys_find_link_key(addr); in bt_keys_get_link_key() 59 if (key) { in bt_keys_get_link_key() 60 return key; in bt_keys_get_link_key() 63 key = bt_keys_find_link_key(BT_ADDR_ANY); in bt_keys_get_link_key() [all …]
|
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/openisa/hal/RV32M1/ |
D | ecb.c | 34 /* CAU3 driver supports 4 key slots. */ in ecb_encrypt_be() 42 /* Loads the key into CAU3's DMEM and expands the AES key schedule */ in ecb_encrypt_be() 45 LOG_ERR("CAUv3 AES key set failed %d", status); in ecb_encrypt_be() 67 * The most significant octet of key corresponds to key[0], the most in ecb_encrypt() 76 /* CAU3 driver supports 4 key slots. */ in ecb_encrypt() 84 /* Loads the key into CAU3's DMEM and expands the AES key schedule */ in ecb_encrypt() 87 LOG_ERR("CAUv3 AES key set failed %d", status); in ecb_encrypt() 120 * calc the Session Key and retrieve the MSO to LSO format because that is how 124 &lll->ccm_rx.key[0]); 153 uint8_t *key; in ecb_ut() local [all …]
|
/Zephyr-latest/tests/net/lib/wifi_credentials_backend_psa/src/ |
D | main.c | 76 psa_status_t custom_psa_export_key(mbedtls_svc_key_id_t key, uint8_t *data, size_t data_size, in custom_psa_export_key() argument 84 static void custom_psa_set_key_id(psa_key_attributes_t *attributes, mbedtls_svc_key_id_t key) in custom_psa_set_key_id() argument 86 zassert_equal(idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN, key, "Key ID mismatch"); in custom_psa_set_key_id() 91 zassert_equal(sizeof(struct wifi_credentials_personal) * 8, bits, "Key bits mismatch"); in custom_psa_set_key_bits() 96 zassert_equal(PSA_KEY_TYPE_RAW_DATA, type, "Key type mismatch"); in custom_psa_set_key_type() 101 zassert_equal(PSA_ALG_NONE, alg, "Key algorithm mismatch"); in custom_psa_set_key_algorithm() 106 zassert_equal(PSA_KEY_LIFETIME_PERSISTENT, lifetime, "Key lifetime mismatch"); in custom_psa_set_key_lifetime() 111 zassert_equal(PSA_KEY_USAGE_EXPORT, usage_flags, "Key usage flags mismatch"); in custom_psa_set_key_usage_flags() 138 "Export key call count mismatch"); in ZTEST() 149 zassert_equal_ptr(psa_import_key_fake.arg1_val, &example1, "Import key arg1 mismatch"); in ZTEST() [all …]
|
/Zephyr-latest/subsys/mgmt/mcumgr/util/include/mgmt/mcumgr/util/ |
D | zcbor_bulk.h | 18 struct zcbor_string key; /* Map key string */ member 19 zcbor_decoder_t *decoder; /* Key corresponding decoder */ 24 /** @brief Define single key-decoder mapping 28 * @param k key is "" enclosed string representing key; 46 /** @brief Define single key-value decode mapping 54 * @param k key; the @p k will be stringified so should be given 65 /** @brief Decodes single level map according to a provided key-decode map. 67 * The function takes @p map of key to decoder array defined as: 75 * where "key?" is string representing key; the decode_fun? is 78 * a given key will place a decoded value - they have to agree in type [all …]
|
/Zephyr-latest/include/zephyr/arch/nios2/ |
D | arch.h | 50 unsigned int key, tmp; in arch_irq_lock() local 53 "rdctl %[key], status\n\t" in arch_irq_lock() 55 "and %[tmp], %[key], %[tmp]\n\t" in arch_irq_lock() 57 : [key] "=r" (key), [tmp] "=r" (tmp) in arch_irq_lock() 60 return key; in arch_irq_lock() 63 static ALWAYS_INLINE void arch_irq_unlock(unsigned int key) in arch_irq_unlock() argument 67 * in which case we can just write the value stored in key, in arch_irq_unlock() 79 "andi %[key], %[key], 1\n\t" in arch_irq_unlock() 80 "beq %[key], zero, 1f\n\t" in arch_irq_unlock() 81 "rdctl %[key], status\n\t" in arch_irq_unlock() [all …]
|
/Zephyr-latest/subsys/mgmt/mcumgr/util/src/ |
D | zcbor_bulk.c | 29 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() 47 /* Failure to decode value matched to key 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()
|
/Zephyr-latest/lib/libc/common/source/thrd/ |
D | tss.c | 13 int tss_create(tss_t *key, tss_dtor_t destructor) in tss_create() argument 15 switch (pthread_key_create(key, destructor)) { in tss_create() 27 void *tss_get(tss_t key) in tss_get() argument 29 return pthread_getspecific(key); in tss_get() 32 int tss_set(tss_t key, void *val) in tss_set() argument 34 switch (pthread_setspecific(key, val)) { in tss_set() 44 void tss_delete(tss_t key) in tss_delete() argument 46 (void)pthread_key_delete(key); in tss_delete()
|
/Zephyr-latest/kernel/ |
D | thread_monitor.c | 17 k_spinlock_key_t key = k_spin_lock(&z_thread_monitor_lock); in z_thread_monitor_exit() local 34 k_spin_unlock(&z_thread_monitor_lock, key); in z_thread_monitor_exit() 41 k_spinlock_key_t key; in k_thread_foreach() local 51 key = k_spin_lock(&z_thread_monitor_lock); in k_thread_foreach() 61 k_spin_unlock(&z_thread_monitor_lock, key); in k_thread_foreach() 67 k_spinlock_key_t key; in k_thread_foreach_unlocked() local 71 key = k_spin_lock(&z_thread_monitor_lock); in k_thread_foreach_unlocked() 76 k_spin_unlock(&z_thread_monitor_lock, key); in k_thread_foreach_unlocked() 78 key = k_spin_lock(&z_thread_monitor_lock); in k_thread_foreach_unlocked() 83 k_spin_unlock(&z_thread_monitor_lock, key); in k_thread_foreach_unlocked() [all …]
|
/Zephyr-latest/tests/bluetooth/host/keys/bt_keys_add_type/src/ |
D | main.c | 15 /* This LUT contains different key types */ 23 * Set key type and verify that the value is set correctly 26 * - Valid key reference is used 29 * - The key type value is set correctly 41 "bt_keys_add_type() set incorrect key type value"); in ZTEST() 46 * Set key type to all valid types and verify that the value is set correctly 49 * - Valid key reference is used 52 * - The key type value is set correctly 66 "bt_keys_add_type() set incorrect key type value"); in ZTEST() 70 * Mask the key type with zero and verify that it has no effect [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | hash_map_api.h | 51 /** Key associated with the current entry */ 52 uint64_t key; member 102 * @param key Key corresponding to @p value 103 * @param value Value corresponding to @p key 106 typedef void (*sys_hashmap_callback_t)(uint64_t key, uint64_t value, void *cookie); 123 * Insert a new @p key - @p value pair into @p map. 126 * @param key Key to associate with @p value 127 * @param value Value to associate with @p key 128 * @param old_value Location to store the value previously associated with @p key or `NULL` 129 * @retval 0 if @p value was inserted for an existing key, in which case @p old_value will contain [all …]
|
/Zephyr-latest/include/zephyr/arch/arm64/ |
D | asm_inline_gcc.h | 28 unsigned int key; in arch_irq_lock() local 31 * Return the whole DAIF register as key but use DAIFSET to disable in arch_irq_lock() 34 key = read_daif(); in arch_irq_lock() 37 return key; in arch_irq_lock() 40 static ALWAYS_INLINE void arch_irq_unlock(unsigned int key) in arch_irq_unlock() argument 42 write_daif(key); in arch_irq_unlock() 45 static ALWAYS_INLINE bool arch_irq_unlocked(unsigned int key) in arch_irq_unlocked() argument 48 return (key & DAIF_IRQ_BIT) == 0; in arch_irq_unlocked()
|
/Zephyr-latest/cmake/modules/ |
D | yaml.cmake | 9 # It supports basic key-value pairs, like 12 # basic key-object pairs, like 168 # yaml_get(<out-var> NAME <name> KEY <key>...) 170 # Get the value of the given key and store the value in <out-var>. 171 # If key represents a list, then the list is returned. 173 # Behavior is undefined if key points to a complex object. 176 # KEY <key>... : Name of key. 182 cmake_parse_arguments(ARG_YAML "" "NAME" "KEY" ${ARGN}) 184 zephyr_check_arguments_required_all(${CMAKE_CURRENT_FUNCTION} ARG_YAML NAME KEY) 190 # If key is not found, then type becomes '-NOTFOUND' and value handling is done below. [all …]
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | crypto_tc.c | 36 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt() argument 39 return bt_encrypt_be(key->key, plaintext, enc_data); in bt_mesh_encrypt() 42 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *plaintext, in bt_mesh_ccm_encrypt() argument 46 return bt_ccm_encrypt(key->key, nonce, plaintext, len, aad, aad_len, enc_data, mic_size); in bt_mesh_ccm_encrypt() 49 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], const uint8_t *enc_data, in bt_mesh_ccm_decrypt() argument 53 return bt_ccm_decrypt(key->key, nonce, enc_data, len, aad, aad_len, plaintext, mic_size); in bt_mesh_ccm_decrypt() 56 int bt_mesh_aes_cmac_raw_key(const uint8_t key[16], struct bt_mesh_sg *sg, size_t sg_len, in bt_mesh_aes_cmac_raw_key() 62 if (tc_cmac_setup(&state, key, &sched) == TC_CRYPTO_FAIL) { in bt_mesh_aes_cmac_raw_key() 79 int bt_mesh_aes_cmac_mesh_key(const struct bt_mesh_key *key, struct bt_mesh_sg *sg, in bt_mesh_aes_cmac_mesh_key() argument 82 return bt_mesh_aes_cmac_raw_key(key->key, sg, sg_len, mac); in bt_mesh_aes_cmac_mesh_key() [all …]
|
D | crypto_psa.c | 21 * application keys (2 real keys per 1 configured) and device key + device key candidate. 35 "BLE Mesh PSA key id range overlaps maximum allowed boundary."); 38 "MAC length should be 16 bytes for 128-bits key for CMAC-AES"); 41 "MAC length should be 32 bytes for 256-bits key for HMAC-SHA"); 60 int bt_mesh_encrypt(const struct bt_mesh_key *key, const uint8_t plaintext[16], in bt_mesh_encrypt() argument 67 status = psa_cipher_encrypt(key->key, PSA_ALG_ECB_NO_PADDING, in bt_mesh_encrypt() 79 int bt_mesh_ccm_encrypt(const struct bt_mesh_key *key, uint8_t nonce[13], in bt_mesh_ccm_encrypt() argument 88 status = psa_aead_encrypt(key->key, alg, in bt_mesh_ccm_encrypt() 102 int bt_mesh_ccm_decrypt(const struct bt_mesh_key *key, uint8_t nonce[13], in bt_mesh_ccm_decrypt() argument 111 status = psa_aead_decrypt(key->key, alg, in bt_mesh_ccm_decrypt() [all …]
|