Home
last modified time | relevance | path

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

123456789

/nrf52832-nimble/rt-thread/components/libc/pthreads/
H A Dpthread_tls.c21 void *pthread_getspecific(pthread_key_t key) in pthread_getspecific() argument
31 if ((key < PTHREAD_KEY_MAX) && (_thread_keys[key].is_used)) in pthread_getspecific()
32 return ptd->tls[key]; in pthread_getspecific()
38 int pthread_setspecific(pthread_key_t key, const void *value) in pthread_setspecific() argument
51 if ((key < PTHREAD_KEY_MAX) && _thread_keys[key].is_used) in pthread_setspecific()
53 ptd->tls[key] = (void *)value; in pthread_setspecific()
62 int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)) in pthread_key_create() argument
74 *key = index; in pthread_key_create()
88 int pthread_key_delete(pthread_key_t key) in pthread_key_delete() argument
90 if (key >= PTHREAD_KEY_MAX) in pthread_key_delete()
[all …]
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/include/host/
H A Dble_store.h41 * Used as a key for lookups of security material. This struct corresponds to
48 * Key by peer identity address;
49 * peer_addr=BLE_ADDR_NONE means don't key off peer.
53 /** Key by ediv; ediv_rand_present=0 means don't key off ediv. */
56 /** Key by rand_num; ediv_rand_present=0 means don't key off rand_num. */
91 * Used as a key for lookups of stored client characteristic configuration
97 * Key by peer identity address;
98 * peer_addr=BLE_ADDR_NONE means don't key off peer.
103 * Key by characteristic value handle;
104 * chr_val_handle=0 means don't key off characteristic handle.
[all …]
/nrf52832-nimble/packages/NimBLE-latest/ext/tinycrypt/src/
H A Dhmac.c37 static void rekey(uint8_t *key, const uint8_t *new_key, unsigned int key_size) in rekey() argument
44 key[i] = inner_pad ^ new_key[i]; in rekey()
45 key[i + TC_SHA256_BLOCK_SIZE] = outer_pad ^ new_key[i]; in rekey()
48 key[i] = inner_pad; key[i + TC_SHA256_BLOCK_SIZE] = outer_pad; in rekey()
52 int tc_hmac_set_key(TCHmacState_t ctx, const uint8_t *key, in tc_hmac_set_key() argument
58 key == (const uint8_t *) 0 || in tc_hmac_set_key()
78 (void)tc_sha256_final(&dummy_state.key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
82 rekey(ctx->key, key, key_size); in tc_hmac_set_key()
85 (void)tc_sha256_update(&ctx->hash_state, key, key_size); in tc_hmac_set_key()
86 (void)tc_sha256_final(&ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
[all …]
H A Dhmac_prng.c83 /* use current state, e and separator 0 to compute a new prng key: */ in update()
88 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
89 /* configure the new prng key into the prng's instance of hmac */ in update()
90 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
92 /* use the new key to compute a new state variable v */ in update()
97 /* use current state, e and separator 1 to compute a new prng key: */ in update()
102 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
103 /* configure the new prng key into the prng's instance of hmac */ in update()
104 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
106 /* use the new key to compute a new state variable v */ in update()
[all …]
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/netif/ppp/
H A Dmultilink.c60 char *blinks_id; /* key for the list of links */
72 static int parse_num (char *str, const char *key, int *valp);
127 TDB_DATA key, pid, rec; in mp_join_bundle() local
187 /* Make the key for the list of links belonging to the bundle */ in mp_join_bundle()
191 novm("bundle links key"); in mp_join_bundle()
211 key.dptr = bundle_id; in mp_join_bundle()
212 key.dsize = p - bundle_id; in mp_join_bundle()
213 pid = tdb_fetch(pppdb, key); in mp_join_bundle()
277 TDB_DATA key; in mp_bundle_terminated() local
293 key.dptr = blinks_id; in mp_bundle_terminated()
[all …]
H A Dpppcrypt.c52 /* IN 56 bit DES key missing parity bits
53 * OUT 64 bit DES key with parity bits added
55 void pppcrypt_56_to_64_bit_key(u_char *key, u_char * des_key) { in pppcrypt_56_to_64_bit_key() argument
56 des_key[0] = pppcrypt_get_7bits(key, 0); in pppcrypt_56_to_64_bit_key()
57 des_key[1] = pppcrypt_get_7bits(key, 7); in pppcrypt_56_to_64_bit_key()
58 des_key[2] = pppcrypt_get_7bits(key, 14); in pppcrypt_56_to_64_bit_key()
59 des_key[3] = pppcrypt_get_7bits(key, 21); in pppcrypt_56_to_64_bit_key()
60 des_key[4] = pppcrypt_get_7bits(key, 28); in pppcrypt_56_to_64_bit_key()
61 des_key[5] = pppcrypt_get_7bits(key, 35); in pppcrypt_56_to_64_bit_key()
62 des_key[6] = pppcrypt_get_7bits(key, 42); in pppcrypt_56_to_64_bit_key()
[all …]
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/netif/ppp/
H A Dmultilink.c60 char *blinks_id; /* key for the list of links */
72 static int parse_num (char *str, const char *key, int *valp);
127 TDB_DATA key, pid, rec; in mp_join_bundle() local
187 /* Make the key for the list of links belonging to the bundle */ in mp_join_bundle()
191 novm("bundle links key"); in mp_join_bundle()
211 key.dptr = bundle_id; in mp_join_bundle()
212 key.dsize = p - bundle_id; in mp_join_bundle()
213 pid = tdb_fetch(pppdb, key); in mp_join_bundle()
277 TDB_DATA key; in mp_bundle_terminated() local
293 key.dptr = blinks_id; in mp_bundle_terminated()
[all …]
H A Dpppcrypt.c52 /* IN 56 bit DES key missing parity bits
53 * OUT 64 bit DES key with parity bits added
55 void pppcrypt_56_to_64_bit_key(u_char *key, u_char * des_key) { in pppcrypt_56_to_64_bit_key() argument
56 des_key[0] = pppcrypt_get_7bits(key, 0); in pppcrypt_56_to_64_bit_key()
57 des_key[1] = pppcrypt_get_7bits(key, 7); in pppcrypt_56_to_64_bit_key()
58 des_key[2] = pppcrypt_get_7bits(key, 14); in pppcrypt_56_to_64_bit_key()
59 des_key[3] = pppcrypt_get_7bits(key, 21); in pppcrypt_56_to_64_bit_key()
60 des_key[4] = pppcrypt_get_7bits(key, 28); in pppcrypt_56_to_64_bit_key()
61 des_key[5] = pppcrypt_get_7bits(key, 35); in pppcrypt_56_to_64_bit_key()
62 des_key[6] = pppcrypt_get_7bits(key, 42); in pppcrypt_56_to_64_bit_key()
[all …]
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/src/
H A Dble_store.c26 ble_store_read(int obj_type, const union ble_store_key *key, in ble_store_read() argument
36 rc = ble_hs_cfg.store_read_cb(obj_type, key, val); in ble_store_read()
80 ble_store_delete(int obj_type, const union ble_store_key *key) in ble_store_delete() argument
89 rc = ble_hs_cfg.store_delete_cb(obj_type, key); in ble_store_delete()
253 ble_store_read_cccd(const struct ble_store_key_cccd *key, in ble_store_read_cccd() argument
260 store_key = (void *)key; in ble_store_read_cccd()
278 ble_store_delete_cccd(const struct ble_store_key_cccd *key) in ble_store_delete_cccd() argument
283 store_key = (void *)key; in ble_store_delete_cccd()
335 union ble_store_key key; in ble_store_iterate() local
342 memset(&key, 0, sizeof(key)); in ble_store_iterate()
[all …]
H A Dble_store_util.c114 union ble_store_key key; in ble_store_util_delete_peer() local
117 memset(&key, 0, sizeof key); in ble_store_util_delete_peer()
118 key.sec.peer_addr = *peer_id_addr; in ble_store_util_delete_peer()
120 rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_OUR_SEC, &key); in ble_store_util_delete_peer()
125 rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_PEER_SEC, &key); in ble_store_util_delete_peer()
130 memset(&key, 0, sizeof key); in ble_store_util_delete_peer()
131 key.cccd.peer_addr = *peer_id_addr; in ble_store_util_delete_peer()
133 rc = ble_store_util_delete_all(BLE_STORE_OBJ_TYPE_CCCD, &key); in ble_store_util_delete_peer()
142 * Deletes all entries from the store that match the specified key.
145 * @param key Entries matching this key get deleted.
[all …]
/nrf52832-nimble/rt-thread/tools/kconfig-frontends/libs/lxdialog/
H A Dmenubox.c189 int key = 0, button = 0, scroll = 0, choice = 0; in dialog_menu() local
282 while (key != KEY_ESC) { in dialog_menu()
283 key = wgetch(menu); in dialog_menu()
285 if (key < 256 && isalpha(key)) in dialog_menu()
286 key = tolower(key); in dialog_menu()
288 if (strchr("ynmh", key)) in dialog_menu()
294 if (key == tolower(item_str()[j])) in dialog_menu()
301 if (key == tolower(item_str()[j])) in dialog_menu()
308 key == KEY_UP || key == KEY_DOWN || in dialog_menu()
309 key == '-' || key == '+' || in dialog_menu()
[all …]
H A Dchecklist.c121 int key = 0, button = 0, choice = 0, scroll = 0, max_choice; in dialog_checklist() local
208 while (key != KEY_ESC) { in dialog_checklist()
209 key = wgetch(dialog); in dialog_checklist()
213 if (toupper(key) == toupper(item_str()[0])) in dialog_checklist()
217 if (i < max_choice || key == KEY_UP || key == KEY_DOWN || in dialog_checklist()
218 key == '+' || key == '-') { in dialog_checklist()
219 if (key == KEY_UP || key == '-') { in dialog_checklist()
241 continue; /* wait for another key press */ in dialog_checklist()
244 } else if (key == KEY_DOWN || key == '+') { in dialog_checklist()
269 continue; /* wait for another key press */ in dialog_checklist()
[all …]
/nrf52832-nimble/packages/NimBLE-latest/ext/tinycrypt/include/tinycrypt/
H A Dhmac.h41 * transformation specified by a key in an arbitrary length data
44 * Security: The security of the HMAC depends on the length of the key and
51 * Usage: 1) call tc_hmac_set_key to set the HMAC key.
75 /* HMAC key schedule */
76 uint8_t key[2*TC_SHA256_BLOCK_SIZE]; member
81 * @brief HMAC set key procedure
82 * Configures ctx to use key
86 * key == NULL or
89 * @param key IN -- the HMAC key to configure
90 * @param key_size IN -- the HMAC key size
[all …]
H A Daes.h39 * perform a transformation specified by a symmetric key in fixed-
44 * Usage: 1) call tc_aes128_set_encrypt/decrypt_key to set the key.
59 #define Nk (4) /* number of 32-bit words comprising the key */
69 * @brief Set AES-128 encryption key
70 * Uses key k to initialize s
75 * AES-256 key schedule -- see FIPS 197 for details
77 * @param k IN -- points to the AES key
83 * Encrypts contents of in buffer into out buffer under key;
91 * @param s IN -- initialized AES key schedule
97 * @brief Set the AES-128 decryption key
[all …]
H A Dcmac_mode.h49 * generate the tags him/herself without knowing the MAC key. In this
56 * tc_cmac_setup (allowing a new key to be set), as suggested in
65 * correctly. Like all symmetric key operations, it is session
69 * tc_cmac_struct with encryption key and buffer. Our implementation
70 * always assume that the AES key to be the same size as the block
74 * Once the state has been setup with a key, computing the CMAC of
90 * have to change the key.
92 * Once you are done computing CMAC with a key, it is a good idea to
93 * destroy the state so an attacker cannot recover the key; use
121 /* identifies the encryption key */
[all …]
H A Decc_dh.h79 * @brief Create a public/private key pair.
80 * @return returns TC_CRYPTO_SUCCESS (1) if the key pair was generated successfully
81 * returns TC_CRYPTO_FAIL (0) if error while generating key pair
83 * @param p_public_key OUT -- Will be filled in with the public key. Must be at
86 * @param p_private_key OUT -- Will be filled in with the private key. Must be as
99 * @brief Create a public/private key pair given a specific d.
109 * @brief Compute a shared secret given your secret key and someone else's
110 * public key.
117 * @param p_public_key IN -- The public key of the remote party.
118 * @param p_private_key IN -- Your private key.
[all …]
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/src/
H A Dsettings.c27 * bt_mesh_app_key and bt_mesh_subnet structs themselves, since once a key
34 clear:1; /* 1 if key needs clearing, 0 if storing */
100 u16_t key; member
313 struct net_key_val key; in net_key_set() local
333 len = sizeof(key); in net_key_set()
334 err = settings_bytes_from_str(val, &key, &len); in net_key_set()
340 if (len != sizeof(key)) { in net_key_set()
341 BT_ERR("Unexpected value length (%d != %zu)", len, sizeof(key)); in net_key_set()
348 sub->kr_flag = key.kr_flag; in net_key_set()
349 sub->kr_phase = key.kr_phase; in net_key_set()
[all …]
H A Dcrypto.c28 int bt_mesh_aes_cmac(const u8_t key[16], struct bt_mesh_sg *sg, in bt_mesh_aes_cmac()
34 if (tc_cmac_setup(&state, key, &sched) == TC_CRYPTO_FAIL) { in bt_mesh_aes_cmac()
198 static int bt_mesh_ccm_decrypt(const u8_t key[16], u8_t nonce[13], in bt_mesh_ccm_decrypt()
217 err = bt_encrypt_be(key, pmsg, cmic); in bt_mesh_ccm_decrypt()
232 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
256 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
270 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
289 err = bt_encrypt_be(key, pmsg, cmsg); in bt_mesh_ccm_decrypt()
310 err = bt_encrypt_be(key, pmsg, Xn); in bt_mesh_ccm_decrypt()
325 err = bt_encrypt_be(key, pmsg, cmsg); in bt_mesh_ccm_decrypt()
[all …]
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/store/ram/src/
H A Dble_store_ram.c21 * This file implements a simple in-RAM key database for BLE host security
291 ble_store_ram_find_cccd(const struct ble_store_key_cccd *key) in ble_store_ram_find_cccd() argument
301 if (ble_addr_cmp(&key->peer_addr, BLE_ADDR_ANY)) { in ble_store_ram_find_cccd()
302 if (ble_addr_cmp(&cccd->peer_addr, &key->peer_addr)) { in ble_store_ram_find_cccd()
307 if (key->chr_val_handle != 0) { in ble_store_ram_find_cccd()
308 if (cccd->chr_val_handle != key->chr_val_handle) { in ble_store_ram_find_cccd()
313 if (key->idx > skipped) { in ble_store_ram_find_cccd()
391 * @return 0 if a key was found; else BLE_HS_ENOENT.
394 ble_store_ram_read(int obj_type, const union ble_store_key *key, in ble_store_ram_read() argument
402 * stack is asking us to look in our key database for a long-term key in ble_store_ram_read()
[all …]
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/apps/snmp/
H A Dsnmpv3_mbedtls.c53 const u8_t* key, u8_t algo, u8_t* hmac_out) in snmpv3_auth() argument
77 if (mbedtls_md_hmac_starts(&ctx, key, key_len) != 0) { in snmpv3_auth()
109 const u8_t* key, const u8_t* priv_param, const u32_t engine_boots, in snmpv3_crypt() argument
139 …if(mbedtls_cipher_setkey(&ctx, key, 8*8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT)? MBEDTLS_ENCRYPT : MB… in snmpv3_crypt()
145 iv_local[i] = priv_param[i] ^ key[i + 8]; in snmpv3_crypt()
179 …if(mbedtls_cipher_setkey(&ctx, key, 16*8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT)? MBEDTLS_ENCRYPT : M… in snmpv3_crypt()
225 /* A.2.1. Password to Key Sample Code for MD5 */
232 u8_t *key) /* OUT - pointer to caller 16-octet buffer */ in snmpv3_password_to_key_md5() argument
258 mbedtls_md5_finish(&MD, key); /* tell MD5 we're done */ in snmpv3_password_to_key_md5()
261 /* Now localize the key with the engineID and pass */ in snmpv3_password_to_key_md5()
[all …]
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/netif/ppp/
H A Dchpms.c169 u_char *key, /* IN 7 octets */ in DesEncrypt() argument
176 MakeKey(key, des_key); in DesEncrypt()
200 u_char *key, /* IN 7 octets */ in DesEncrypt() argument
206 MakeKey(key, des_key); in DesEncrypt()
241 /* in == 8-byte string (expanded version of the 56-bit key)
280 MakeKey( u_char *key, /* IN 56 bit DES key missing parity bits */ in MakeKey() argument
281 u_char *des_key /* OUT 64 bit DES key with parity bits added */) in MakeKey()
283 des_key[0] = Get7Bits(key, 0); in MakeKey()
284 des_key[1] = Get7Bits(key, 7); in MakeKey()
285 des_key[2] = Get7Bits(key, 14); in MakeKey()
[all …]
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/store/config/src/
H A Dble_store_config.c313 ble_store_config_find_cccd(const struct ble_store_key_cccd *key) in ble_store_config_find_cccd() argument
323 if (ble_addr_cmp(&key->peer_addr, BLE_ADDR_ANY)) { in ble_store_config_find_cccd()
324 if (ble_addr_cmp(&cccd->peer_addr, &key->peer_addr)) { in ble_store_config_find_cccd()
329 if (key->chr_val_handle != 0) { in ble_store_config_find_cccd()
330 if (cccd->chr_val_handle != key->chr_val_handle) { in ble_store_config_find_cccd()
335 if (key->idx > skipped) { in ble_store_config_find_cccd()
425 * @return 0 if a key was found; else BLE_HS_ENOENT.
428 ble_store_config_read(int obj_type, const union ble_store_key *key, in ble_store_config_read() argument
436 * stack is asking us to look in our key database for a long-term key in ble_store_config_read()
439 * Perform a key lookup and populate the context object with the in ble_store_config_read()
[all …]
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/apps/snmp/
H A Dsnmpv3_mbedtls.c53 const u8_t *key, snmpv3_auth_algo_t algo, u8_t *hmac_out) in snmpv3_auth() argument
77 if (mbedtls_md_hmac_starts(&ctx, key, key_len) != 0) { in snmpv3_auth()
109 const u8_t *key, const u8_t *priv_param, const u32_t engine_boots, in snmpv3_crypt() argument
139 …if (mbedtls_cipher_setkey(&ctx, key, 8 * 8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT) ? MBEDTLS_ENCRYPT … in snmpv3_crypt()
145 iv_local[i] = priv_param[i] ^ key[i + 8]; in snmpv3_crypt()
186 …if (mbedtls_cipher_setkey(&ctx, key, 16 * 8, (mode == SNMP_V3_PRIV_MODE_ENCRYPT) ? MBEDTLS_ENCRYPT… in snmpv3_crypt()
236 /* A.2.1. Password to Key Sample Code for MD5 */
243 u8_t *key) /* OUT - pointer to caller 16-octet buffer */ in snmpv3_password_to_key_md5() argument
269 mbedtls_md5_finish(&MD, key); /* tell MD5 we're done */ in snmpv3_password_to_key_md5()
272 /* Now localize the key with the engineID and pass */ in snmpv3_password_to_key_md5()
[all …]
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/include/netif/ppp/polarssl/
H A Ddes.h60 * \brief DES key schedule (56-bit, encryption)
63 * \param key 8-byte secret key
65 void des_setkey_enc( des_context *ctx, unsigned char key[8] );
68 * \brief DES key schedule (56-bit, decryption)
71 * \param key 8-byte secret key
73 void des_setkey_dec( des_context *ctx, unsigned char key[8] );
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/include/netif/ppp/polarssl/
H A Ddes.h60 * \brief DES key schedule (56-bit, encryption)
63 * \param key 8-byte secret key
65 void des_setkey_enc( des_context *ctx, unsigned char key[8] );
68 * \brief DES key schedule (56-bit, decryption)
71 * \param key 8-byte secret key
73 void des_setkey_dec( des_context *ctx, unsigned char key[8] );

123456789