Home
last modified time | relevance | path

Searched refs:key_len (Results 1 – 19 of 19) sorted by relevance

/Zephyr-latest/samples/boards/nordic/mesh/onoff_level_lighting_vnd_app/src/
Dstorage.c119 int key_len; in ps_set() local
122 key_len = settings_name_next(key, &next); in ps_set()
125 if (!strncmp(key, "rc", key_len)) { in ps_set()
130 if (!strncmp(key, "gdtt", key_len)) { in ps_set()
134 if (!strncmp(key, "gpo", key_len)) { in ps_set()
139 if (!strncmp(key, "ld", key_len)) { in ps_set()
144 if (!strncmp(key, "td", key_len)) { in ps_set()
149 if (!strncmp(key, "dd", key_len)) { in ps_set()
154 if (!strncmp(key, "ll", key_len)) { in ps_set()
159 if (!strncmp(key, "llt", key_len)) { in ps_set()
[all …]
/Zephyr-latest/subsys/net/lib/http/
Dhttp_server_ws.c44 size_t key_len; in handle_http1_to_websocket_upgrade() local
48 key_len = MIN(sizeof(key_accept) - 1, sizeof(client->ws_sec_key)); in handle_http1_to_websocket_upgrade()
49 strncpy(key_accept, client->ws_sec_key, key_len); in handle_http1_to_websocket_upgrade()
50 key_len = strlen(key_accept); in handle_http1_to_websocket_upgrade()
52 olen = MIN(sizeof(key_accept) - 1 - key_len, sizeof(WS_MAGIC) - 1); in handle_http1_to_websocket_upgrade()
53 strncpy(key_accept + key_len, WS_MAGIC, olen); in handle_http1_to_websocket_upgrade()
55 mbedtls_sha1(key_accept, olen + key_len, accept); in handle_http1_to_websocket_upgrade()
/Zephyr-latest/subsys/mgmt/mcumgr/util/src/
Dzcbor_bulk.c77 size_t key_len; in zcbor_map_decode_bulk_key_found() local
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/subsys/net/l2/ieee802154/
Dieee802154_security.c26 uint8_t key_mode, uint8_t *key, uint8_t key_len) in ieee802154_security_setup_session() argument
38 (key_len > IEEE802154_KEY_MAX_LEN || !key || in ieee802154_security_setup_session()
61 memcpy(sec_ctx->key, key, key_len); in ieee802154_security_setup_session()
62 sec_ctx->key_len = key_len; in ieee802154_security_setup_session()
66 sec_ctx->enc.keylen = sec_ctx->key_len; in ieee802154_security_setup_session()
69 sec_ctx->dec.keylen = sec_ctx->key_len; in ieee802154_security_setup_session()
Dieee802154_security.h19 uint8_t key_mode, uint8_t *key, uint8_t key_len);
Dieee802154_mgmt.c943 params->key_len)) { in ieee802154_set_security_settings()
971 memcpy(params->key, ctx->sec_ctx.key, ctx->sec_ctx.key_len); in ieee802154_get_security_settings()
972 params->key_len = ctx->sec_ctx.key_len; in ieee802154_get_security_settings()
/Zephyr-latest/samples/tfm_integration/psa_crypto/src/
Dpsa_crypto.c51 size_t *key_len) in crp_get_pub_key() argument
70 psa_export_public_key(key_handle, key, key_buf_size, key_len), in crp_get_pub_key()
78 sf_hex_tabulate_16(&crp_fmt, key, *key_len); in crp_get_pub_key()
120 size_t key_len = 32; in crp_imp_key_secp256r1() local
137 psa_import_key(&key_attributes, key_data, key_len, &key_handle), in crp_imp_key_secp256r1()
178 if (data_len != key_len) { in crp_imp_key_secp256r1()
184 comp_result = memcmp(data_out, key_data, key_len); in crp_imp_key_secp256r1()
232 size_t key_len = 32; in crp_gen_key_secp256r1() local
290 if (data_len != key_len) { in crp_gen_key_secp256r1()
/Zephyr-latest/drivers/crypto/
Dcrypto_smartbond.c289 static int crypto_smartbond_cipher_key_load(uint8_t *key, uint16_t key_len) in crypto_smartbond_cipher_key_load() argument
297 if (key_len == 32) { in crypto_smartbond_cipher_key_load()
300 } else if (key_len == 24) { in crypto_smartbond_cipher_key_load()
303 } else if (key_len == 16) { in crypto_smartbond_cipher_key_load()
323 (void *)&AES_HASH->CRYPTO_KEYS_START, (uint32_t)key_len); in crypto_smartbond_cipher_key_load()
330 key_len -= 4; in crypto_smartbond_cipher_key_load()
331 } while (key_len); in crypto_smartbond_cipher_key_load()
Dcrypto_si32.c161 static int crypto_si32_aes_set_key(const uint8_t *key, uint8_t key_len) in crypto_si32_aes_set_key() argument
165 switch (key_len) { in crypto_si32_aes_set_key()
181 LOG_ERR("Invalid key len: %" PRIu16, key_len); in crypto_si32_aes_set_key()
/Zephyr-latest/subsys/net/lib/config/
Dieee802154_settings.c31 .key_len = sizeof(CONFIG_NET_CONFIG_IEEE802154_SECURITY_KEY), in z_net_config_ieee802154_setup()
/Zephyr-latest/include/zephyr/net/
Dieee802154.h213 uint8_t key_len; member
Dieee802154_mgmt.h350 uint8_t key_len; /**< Key length of 16 bytes is mandatory for standards conformance */ member
/Zephyr-latest/subsys/bluetooth/mesh/
Dcrypto_psa.c243 size_t key_len; in bt_mesh_pub_key_gen() local
265 sizeof(dh_pair.public_key_be), &key_len); in bt_mesh_pub_key_gen()
271 if (key_len != PUB_KEY_SIZE + 1) { in bt_mesh_pub_key_gen()
/Zephyr-latest/drivers/wifi/nrf_wifi/inc/
Dwpa_supp_if.h62 size_t key_len,
/Zephyr-latest/subsys/net/lib/websocket/
Dwebsocket.c241 int ret, fd, key_len; in websocket_connect() local
337 key_len = MIN(sizeof(key_accept) - 1, olen); in websocket_connect()
339 key_len); in websocket_connect()
341 olen = MIN(sizeof(key_accept) - 1 - key_len, sizeof(WS_MAGIC) - 1); in websocket_connect()
342 strncpy(key_accept + key_len, WS_MAGIC, olen); in websocket_connect()
345 mbedtls_sha1(key_accept, olen + key_len, sec_accept_key); in websocket_connect()
/Zephyr-latest/drivers/wifi/nrf_wifi/src/
Dwpa_supp_if.c52 static unsigned int wpa_alg_to_cipher_suite(enum wpa_alg alg, size_t key_len) in wpa_alg_to_cipher_suite() argument
56 if (key_len == 5) { in wpa_alg_to_cipher_suite()
725 const unsigned char *key, size_t key_len) in nrf_wifi_wpa_supp_add_key() argument
729 suite = wpa_alg_to_cipher_suite(alg, key_len); in nrf_wifi_wpa_supp_add_key()
744 if (key && key_len) { in nrf_wifi_wpa_supp_add_key()
745 memcpy(key_info->key.nrf_wifi_key, key, key_len); in nrf_wifi_wpa_supp_add_key()
746 key_info->key.nrf_wifi_key_len = key_len; in nrf_wifi_wpa_supp_add_key()
837 size_t key_len = params->wep_key_len[params->wep_tx_keyidx]; in nrf_wifi_wpa_supp_authenticate() local
840 key_info->cipher_suite = wpa_alg_to_cipher_suite(params->auth_alg, key_len); in nrf_wifi_wpa_supp_authenticate()
843 key_len); in nrf_wifi_wpa_supp_authenticate()
[all …]
/Zephyr-latest/lib/utils/
Djson.c22 size_t key_len; member
337 kv->key_len = 0; in obj_next()
353 kv->key_len = (size_t)(tok.end - tok.start); in obj_next()
763 if (kv.key_len != descr[i].field_name_len) { in obj_parse()
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dtest_provision.c439 size_t key_len; in generate_oob_key_pair() local
456 &key_len); in generate_oob_key_pair()
459 ASSERT_TRUE(key_len == PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE(256)); in generate_oob_key_pair()
461 status = psa_export_key(priv_key_id, private_key_be, sizeof(private_key_be), &key_len); in generate_oob_key_pair()
464 ASSERT_TRUE(key_len == sizeof(private_key_be)); in generate_oob_key_pair()
/Zephyr-latest/tests/net/ieee802154/l2/src/
Dieee802154_test.c350 .key_len = 16U, in set_up_security()