Home
last modified time | relevance | path

Searched full:key (Results 1 – 25 of 1085) sorted by relevance

12345678910>>...44

/Zephyr-Core-3.6.0/include/zephyr/dt-bindings/input/
Dinput-event-codes.h25 #define INPUT_EV_KEY 0x01 /**< Key event */
34 * @name Input event KEY codes.
40 #define INPUT_KEY_0 11 /**< 0 Key */
41 #define INPUT_KEY_1 2 /**< 1 Key */
42 #define INPUT_KEY_2 3 /**< 2 Key */
43 #define INPUT_KEY_3 4 /**< 3 Key */
44 #define INPUT_KEY_4 5 /**< 4 Key */
45 #define INPUT_KEY_5 6 /**< 5 Key */
46 #define INPUT_KEY_6 7 /**< 6 Key */
47 #define INPUT_KEY_7 8 /**< 7 Key */
[all …]
/Zephyr-Core-3.6.0/subsys/bluetooth/host/
Decc.h9 /** 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 …]
Dkeys_br.c1 /* 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 …]
Dkeys.h1 /* keys.h - Bluetooth key handling */
86 * @brief Get a call through the callback for each key with the same type
88 * @param type Key type.
96 * @brief Get the key slot reference for an ID and address pair.
104 * the function will try to find the oldest key that isn't in use with a connection.
105 * If a key with matched criteria is found, it will be overwritten with the new one.
107 * @param id Key identifier.
110 * @return A valid reference pointer to the key slot if process succeeded.
116 * @brief Get the key slot reference for an ID and address pair with a certain type.
123 * @param type Key type.
[all …]
/Zephyr-Core-3.6.0/lib/posix/options/
Dkey.c43 static inline size_t to_posix_key_idx(pthread_key_t key) in to_posix_key_idx() argument
45 return mark_pthread_obj_uninitialized(key); in to_posix_key_idx()
48 static pthread_key_obj *get_posix_key(pthread_key_t key) in get_posix_key() argument
51 size_t bit = to_posix_key_idx(key); in get_posix_key()
54 if (!is_pthread_obj_initialized(key)) { in get_posix_key()
55 LOG_ERR("Key is uninitialized (%x)", key); in get_posix_key()
61 LOG_ERR("Key is invalid (%x)", key); in get_posix_key()
67 LOG_ERR("Key claims to be initialized (%x)", key); in get_posix_key()
74 static pthread_key_obj *to_posix_key(pthread_key_t *key) in to_posix_key() argument
79 if (*key != PTHREAD_KEY_INITIALIZER) { in to_posix_key()
[all …]
/Zephyr-Core-3.6.0/include/zephyr/bluetooth/mesh/
Dcdb.h90 * 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 …]
Dkeys.h25 /** 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-Core-3.6.0/samples/tfm_integration/psa_crypto/src/
Dpsa_crypto.c41 * @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-Core-3.6.0/tests/posix/common/src/
Dkey.c16 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-Core-3.6.0/subsys/bluetooth/controller/ll_sw/openisa/hal/RV32M1/
Decb.c34 /* 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-Core-3.6.0/tests/bluetooth/host/ecc/bt_pub_key_gen/src/
Dtest_suite_invalid_inputs.c36 * Test using the internal debug public key, but the callback is set to NULL
39 * - "LE Read Local P-256 Public Key" command is supported
40 * - "LE Generate DH Key" command is supported
56 /* Set "LE Read Local P-256 Public Key" command support bit */ in ZTEST()
58 /* Set "LE Generate DH Key" command support bit */ in ZTEST()
67 * Test public key generation isn't supported if "LE Read Local P-256 Public Key" command
71 * - "LE Read Local P-256 Public Key" command isn't supported
72 * - "LE Generate DH Key" command is supported
82 /* Clear "LE Read Local P-256 Public Key" command support bit */ in ZTEST()
84 /* Set "LE Generate DH Key" command support bit */ in ZTEST()
[all …]
Dmain.c34 static void bt_pub_key_gen_debug_key_callback(const uint8_t key[BT_PUB_KEY_LEN]) in bt_pub_key_gen_debug_key_callback()
39 zassert_equal_ptr(key, internal_dbg_key, "'%s()' was called with incorrect '%s' value", in bt_pub_key_gen_debug_key_callback()
40 func_name, "key"); in bt_pub_key_gen_debug_key_callback()
44 * Test using the internal debug public key
47 * - "LE Read Local P-256 Public Key" command is supported
48 * - "LE Generate DH Key" command is supported
65 /* Set "LE Read Local P-256 Public Key" command support bit */ in ZTEST()
67 /* Set "LE Generate DH Key" command support bit */ in ZTEST()
85 static void bt_pub_key_gen_callback(const uint8_t key[BT_PUB_KEY_LEN]) in bt_pub_key_gen_callback()
91 * Test generating a public key request
[all …]
/Zephyr-Core-3.6.0/modules/lvgl/
Dlvgl_mem.c19 k_spinlock_key_t key; in lvgl_malloc() local
22 key = k_spin_lock(&lvgl_heap_lock); in lvgl_malloc()
24 k_spin_unlock(&lvgl_heap_lock, key); in lvgl_malloc()
31 k_spinlock_key_t key; in lvgl_realloc() local
34 key = k_spin_lock(&lvgl_heap_lock); in lvgl_realloc()
36 k_spin_unlock(&lvgl_heap_lock, key); in lvgl_realloc()
43 k_spinlock_key_t key; in lvgl_free() local
45 key = k_spin_lock(&lvgl_heap_lock); in lvgl_free()
47 k_spin_unlock(&lvgl_heap_lock, key); in lvgl_free()
52 k_spinlock_key_t key; in lvgl_print_heap_info() local
[all …]
/Zephyr-Core-3.6.0/kernel/
Dobj_core.c36 k_spinlock_key_t key = k_spin_lock(&lock); in k_obj_core_link() local
40 k_spin_unlock(&lock, key); in k_obj_core_link()
52 k_spinlock_key_t key = k_spin_lock(&lock); in k_obj_core_unlink() local
56 k_spin_unlock(&lock, key); in k_obj_core_unlink()
65 k_spinlock_key_t key = k_spin_lock(&lock); in k_obj_type_find() local
75 k_spin_unlock(&lock, key); in k_obj_type_find()
84 k_spinlock_key_t key; in k_obj_type_walk_locked() local
89 key = k_spin_lock(&lock); in k_obj_type_walk_locked()
99 k_spin_unlock(&lock, key); in k_obj_type_walk_locked()
128 k_spinlock_key_t key = k_spin_lock(&lock); in k_obj_core_stats_register() local
[all …]
/Zephyr-Core-3.6.0/subsys/mgmt/mcumgr/util/include/mgmt/mcumgr/util/
Dzcbor_bulk.h18 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-Core-3.6.0/subsys/mgmt/mcumgr/util/src/
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()
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-Core-3.6.0/lib/libc/common/source/thrd/
Dtss.c13 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-Core-3.6.0/tests/bluetooth/host/keys/bt_keys_add_type/src/
Dmain.c15 /* 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-Core-3.6.0/include/zephyr/sys/
Dhash_map_api.h51 /** 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-Core-3.6.0/include/zephyr/arch/nios2/
Darch.h49 unsigned int key, tmp; in arch_irq_lock() local
52 "rdctl %[key], status\n\t" in arch_irq_lock()
54 "and %[tmp], %[key], %[tmp]\n\t" in arch_irq_lock()
56 : [key] "=r" (key), [tmp] "=r" (tmp) in arch_irq_lock()
59 return key; in arch_irq_lock()
62 static ALWAYS_INLINE void arch_irq_unlock(unsigned int key) in arch_irq_unlock() argument
66 * in which case we can just write the value stored in key, in arch_irq_unlock()
78 "andi %[key], %[key], 1\n\t" in arch_irq_unlock()
79 "beq %[key], zero, 1f\n\t" in arch_irq_unlock()
80 "rdctl %[key], status\n\t" in arch_irq_unlock()
[all …]
/Zephyr-Core-3.6.0/include/zephyr/arch/arm64/
Dasm_inline_gcc.h28 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-Core-3.6.0/subsys/bluetooth/mesh/
Dcrypto_tc.c36 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 …]
Dcrypto_psa.c21 * 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 …]
/Zephyr-Core-3.6.0/tests/net/lib/tls_credentials/src/
Dmain.c13 static const char test_server_key[] = "Test server key";
102 struct tls_credential *cert, *key, *temp; in test_credential_internal_iterate() local
105 key = credential_next_get(invalid_tag, NULL); in test_credential_internal_iterate()
106 zassert_is_null(key, "Should have return NULL for unknown credential"); in test_credential_internal_iterate()
112 key = credential_next_get(common_tag, cert); in test_credential_internal_iterate()
113 zassert_not_null(key, "Should have find a credential"); in test_credential_internal_iterate()
117 * so assume we could read key first in test_credential_internal_iterate()
119 temp = key; in test_credential_internal_iterate()
120 key = cert; in test_credential_internal_iterate()
132 zassert_equal(key->type, TLS_CREDENTIAL_PRIVATE_KEY, in test_credential_internal_iterate()
[all …]
/Zephyr-Core-3.6.0/tests/drivers/rtc/rtc_api/src/
Dtest_update_callback.c20 k_spinlock_key_t key = k_spin_lock(&lock); in test_rtc_update_callback_handler() local
25 k_spin_unlock(&lock, key); in test_rtc_update_callback_handler()
31 k_spinlock_key_t key; in ZTEST() local
39 key = k_spin_lock(&lock); in ZTEST()
44 k_spin_unlock(&lock, key); in ZTEST()
48 key = k_spin_lock(&lock); in ZTEST()
52 k_spin_unlock(&lock, key); in ZTEST()
62 key = k_spin_lock(&lock); in ZTEST()
67 k_spin_unlock(&lock, key); in ZTEST()

12345678910>>...44