Home
last modified time | relevance | path

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

12345678910>>...12

/hal_espressif-3.7.0/components/wpa_supplicant/src/tls/
Drsa.c63 struct crypto_rsa_key *key; in crypto_rsa_import_public_key() local
67 key = os_zalloc(sizeof(*key)); in crypto_rsa_import_public_key()
68 if (key == NULL) in crypto_rsa_import_public_key()
71 key->n = bignum_init(); in crypto_rsa_import_public_key()
72 key->e = bignum_init(); in crypto_rsa_import_public_key()
73 if (key->n == NULL || key->e == NULL) { in crypto_rsa_import_public_key()
74 crypto_rsa_free(key); in crypto_rsa_import_public_key()
93 pos = crypto_rsa_parse_integer(pos, end, key->n); in crypto_rsa_import_public_key()
94 pos = crypto_rsa_parse_integer(pos, end, key->e); in crypto_rsa_import_public_key()
106 return key; in crypto_rsa_import_public_key()
[all …]
/hal_espressif-3.7.0/components/efuse/test_apps/main/with_key_purposes/
Dtest_efuse.c90 uint8_t key[32] = {0}; variable
91 TEST_ESP_OK(esp_efuse_read_field_blob(ESP_EFUSE_KEY3, &key, 256));
92 for (int i = 0; i < sizeof(key); ++i) {
93 TEST_ASSERT_EQUAL_INT(0, key[i]);
100 TEST_ESP_OK(esp_efuse_read_field_blob(ESP_EFUSE_KEY3, &key, 256));
101 TEST_ASSERT_EQUAL_HEX8_ARRAY(new_key, key, sizeof(key));
106 TEST_ESP_OK(esp_efuse_read_field_blob(ESP_EFUSE_KEY3, &key, 256));
108 TEST_ASSERT_EACH_EQUAL_HEX8(0, key, sizeof(key));
110 TEST_ASSERT_EQUAL_HEX8_ARRAY(new_key, key, sizeof(key));
136 uint8_t key[32] = { 0xEE }; variable
[all …]
/hal_espressif-3.7.0/components/bt/esp_ble_mesh/mesh_core/storage/
Dsettings_nvs.c217 static int settings_save(bt_mesh_nvs_handle_t handle, const char *key, const uint8_t *val, size_t l… in settings_save() argument
221 if (key == NULL) { in settings_save()
226 BT_DBG("nvs %s, key %s", val ? "set" : "erase", key); in settings_save()
229 err = nvs_set_blob(handle, key, val, len); in settings_save()
231 err = nvs_erase_key(handle, key); in settings_save()
233 BT_DBG("%s not exists", key); in settings_save()
239 val ? "set" : "erase", key, err); in settings_save()
252 int bt_mesh_save_settings(bt_mesh_nvs_handle_t handle, const char *key, in bt_mesh_save_settings() argument
257 err = settings_save(handle, key, val, len); in bt_mesh_save_settings()
262 int bt_mesh_save_core_settings(const char *key, const uint8_t *val, size_t len) in bt_mesh_save_core_settings() argument
[all …]
Dsettings_nvs.h34 int bt_mesh_save_settings(bt_mesh_nvs_handle_t handle, const char *key,
36 int bt_mesh_save_core_settings(const char *key, const uint8_t *val, size_t len);
37 int bt_mesh_save_uid_settings(const char *key, const uint8_t *val, size_t len);
39 int bt_mesh_erase_settings(bt_mesh_nvs_handle_t handle, const char *key);
40 int bt_mesh_erase_core_settings(const char *key);
43 int bt_mesh_load_settings(bt_mesh_nvs_handle_t handle, const char *key,
45 int bt_mesh_load_core_settings(const char *key, uint8_t *buf, size_t buf_len, bool *exist);
46 int bt_mesh_load_uid_settings(const char *key, uint8_t *buf, size_t buf_len, bool *exist);
48 struct net_buf_simple *bt_mesh_get_settings_item(bt_mesh_nvs_handle_t handle, const char *key);
49 struct net_buf_simple *bt_mesh_get_core_settings_item(const char *key);
[all …]
/hal_espressif-3.7.0/components/wpa_supplicant/src/crypto/
Dcrypto_internal-rsa.c22 struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len) in crypto_public_key_import() argument
25 crypto_rsa_import_public_key(key, len); in crypto_public_key_import()
38 struct crypto_private_key * crypto_private_key_import(const u8 *key, in crypto_private_key_import() argument
45 res = pkcs8_key_import(key, len); in crypto_private_key_import()
51 res = pkcs8_enc_key_import(key, len, passwd); in crypto_private_key_import()
60 crypto_rsa_import_private_key(key, len); in crypto_private_key_import()
72 int crypto_public_key_encrypt_pkcs1_v15(struct crypto_public_key *key, in crypto_public_key_encrypt_pkcs1_v15() argument
76 return pkcs1_encrypt(2, (struct crypto_rsa_key *) key, in crypto_public_key_encrypt_pkcs1_v15()
81 int crypto_private_key_decrypt_pkcs1_v15(struct crypto_private_key *key, in crypto_private_key_decrypt_pkcs1_v15() argument
85 return pkcs1_v15_private_key_decrypt((struct crypto_rsa_key *) key, in crypto_private_key_decrypt_pkcs1_v15()
[all …]
Daes_wrap.h25 int __must_check omac1_aes_vector(const u8 *key, size_t key_len,
28 int __must_check omac1_aes_128_vector(const u8 *key, size_t num_elem,
31 int __must_check omac1_aes_128(const u8 *key, const u8 *data, size_t data_len,
33 int __must_check omac1_aes_256(const u8 *key, const u8 *data, size_t data_len,
35 int __must_check aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out);
36 int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce,
38 int __must_check aes_128_ctr_encrypt(const u8 *key, const u8 *nonce,
40 int __must_check aes_128_eax_encrypt(const u8 *key,
44 int __must_check aes_128_eax_decrypt(const u8 *key,
48 int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
[all …]
Ddes-internal.c273 static void deskey(const u8 *key, int decrypt, u32 *keyout) in deskey() argument
282 ((key[l >> 3U] & bytebit[m]) == bytebit[m] ? 1 : 0); in deskey()
399 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) in des_encrypt() argument
408 tmp = key[i]; in des_encrypt()
428 void des_key_setup(const u8 *key, u32 *ek, u32 *dk) in des_key_setup() argument
430 deskey(key, 0, ek); in des_key_setup()
431 deskey(key, 1, dk); in des_key_setup()
457 void des3_key_setup(const u8 *key, struct des3_key_s *dkey) in des3_key_setup() argument
459 deskey(key, 0, dkey->ek[0]); in des3_key_setup()
460 deskey(key + 8, 1, dkey->ek[1]); in des3_key_setup()
[all …]
Dcrypto.h112 int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher);
120 void * aes_encrypt_init(const u8 *key, size_t len);
143 void * aes_decrypt_init(const u8 *key, size_t len);
182 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key,
238 const u8 *iv, const u8 *key,
299 struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len);
316 struct crypto_private_key * crypto_private_key_import(const u8 *key,
351 struct crypto_public_key *key, const u8 *in, size_t inlen,
368 struct crypto_private_key *key, const u8 *in, size_t inlen,
384 int __must_check crypto_private_key_sign_pkcs1(struct crypto_private_key *key,
[all …]
Dcrypto_internal.c34 u8 key[64]; member
39 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument
78 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init()
80 key = tk; in crypto_hash_init()
83 os_memcpy(ctx->key, key, key_len); in crypto_hash_init()
86 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
97 SHA1Update(&ctx->u.sha1, key, key_len); in crypto_hash_init()
99 key = tk; in crypto_hash_init()
102 os_memcpy(ctx->key, key, key_len); in crypto_hash_init()
105 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
[all …]
/hal_espressif-3.7.0/components/bt/porting/ext/tinycrypt/src/
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 …]
Dhmac_prng.c88 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
90 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
102 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
104 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
125 _set(prng->key, 0x00, sizeof(prng->key)); in tc_hmac_prng_init()
127 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in tc_hmac_prng_init()
/hal_espressif-3.7.0/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/
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
57 key == (const uint8_t *) 0 || in tc_hmac_set_key()
77 (void)tc_sha256_final(&dummy_state.key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
81 rekey(ctx->key, key, key_size); in tc_hmac_set_key()
84 (void)tc_sha256_update(&ctx->hash_state, key, key_size); in tc_hmac_set_key()
85 (void)tc_sha256_final(&ctx->key[TC_SHA256_DIGEST_SIZE], in tc_hmac_set_key()
[all …]
Dhmac_prng.c84 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
98 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
101 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
113 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
123 (void)tc_hmac_final(prng->key, sizeof(prng->key), &prng->h); in update()
126 (void)tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in update()
147 _set(prng->key, 0x00, sizeof(prng->key)); in tc_hmac_prng_init()
214 tc_hmac_set_key(&prng->h, prng->key, sizeof(prng->key)); in tc_hmac_prng_generate()
/hal_espressif-3.7.0/components/bt/host/bluedroid/btc/core/
Dbtc_config.c113 bool btc_config_exist(const char *section, const char *key) in btc_config_exist() argument
117 assert(key != NULL); in btc_config_exist()
119 return config_has_key(config, section, key); in btc_config_exist()
122 bool btc_config_get_int(const char *section, const char *key, int *value) in btc_config_get_int() argument
126 assert(key != NULL); in btc_config_get_int()
129 bool ret = config_has_key(config, section, key); in btc_config_get_int()
131 *value = config_get_int(config, section, key, *value); in btc_config_get_int()
137 bool btc_config_set_int(const char *section, const char *key, int value) in btc_config_set_int() argument
141 assert(key != NULL); in btc_config_set_int()
143 config_set_int(config, section, key, value); in btc_config_set_int()
[all …]
/hal_espressif-3.7.0/tools/esptool_py/docs/en/espefuse/
Dburn-key-cmd.rst1 .. _burn-key-cmd:
19 - ``block`` - Name of key block.
20 …:esp32: - ``Keyfile``. It is a raw binary file. It must contain 256 bits of binary key if the codi…
21 …h2: - ``Keyfile``. It is a raw binary file. The length of binary key depends on the key purpose op…
22 …:esp32h2: - ``Keyfile``. It is a raw binary file. The length of binary key depends on the key purp…
23 :not esp32: - ``Key purpose``. The purpose of this key.
27 It can be list of key blocks and keyfiles (like BLOCK1 file1.bin BLOCK2 file2.bin etc.).
31 …It can be list of key blocks and keyfiles and key purposes (like BLOCK_KEY1 file1.bin USER BLOCK_K…
37 …:esp32: - ``--no-protect-key``. Disable default read and write protecting of the key. If this opti…
38 …:not esp32: - ``--no-write-protect``. Disable write-protecting of the key. The key remains writabl…
[all …]
/hal_espressif-3.7.0/components/bt/esp_ble_mesh/mesh_core/
Dfast_prov.c63 struct bt_mesh_app_key *key = NULL; in bt_mesh_fast_prov_app_key_find() local
67 key = &bt_mesh.app_keys[i]; in bt_mesh_fast_prov_app_key_find()
68 if (key->net_idx != BLE_MESH_KEY_UNUSED && in bt_mesh_fast_prov_app_key_find()
69 key->app_idx == app_idx) { in bt_mesh_fast_prov_app_key_find()
70 return key; in bt_mesh_fast_prov_app_key_find()
75 key = bt_mesh.p_app_keys[i]; in bt_mesh_fast_prov_app_key_find()
76 if (key && key->net_idx != BLE_MESH_KEY_UNUSED && in bt_mesh_fast_prov_app_key_find()
77 key->app_idx == app_idx) { in bt_mesh_fast_prov_app_key_find()
78 return key; in bt_mesh_fast_prov_app_key_find()
132 struct bt_mesh_app_key *key = NULL; in bt_mesh_get_fast_prov_app_key() local
[all …]
/hal_espressif-3.7.0/components/bt/host/bluedroid/btc/include/btc/
Dbtc_config.h22 bool btc_config_exist(const char *section, const char *key);
23 bool btc_config_get_int(const char *section, const char *key, int *value);
24 bool btc_config_set_int(const char *section, const char *key, int value);
25 bool btc_config_get_str(const char *section, const char *key, char *value, int *size_bytes);
26 bool btc_config_set_str(const char *section, const char *key, const char *value);
27 bool btc_config_get_bin(const char *section, const char *key, uint8_t *value, size_t *length);
28 bool btc_config_set_bin(const char *section, const char *key, const uint8_t *value, size_t length);
29 bool btc_config_remove(const char *section, const char *key);
32 size_t btc_config_get_bin_length(const char *section, const char *key);
/hal_espressif-3.7.0/components/bt/common/osi/
Dhash_functions.c23 hash_index_t hash_function_naive(const void *key) in hash_function_naive() argument
25 return (hash_index_t)key; in hash_function_naive()
28 hash_index_t hash_function_integer(const void *key) in hash_function_integer() argument
30 return ((hash_index_t)key) * 2654435761; in hash_function_integer()
33 hash_index_t hash_function_pointer(const void *key) in hash_function_pointer() argument
35 return ((hash_index_t)key) * 2654435761; in hash_function_pointer()
38 hash_index_t hash_function_string(const void *key) in hash_function_string() argument
41 const char *name = (const char *)key; in hash_function_string()
Dhash_map.c46 const void *key);
115 bool hash_map_has_key(const hash_map_t *hash_map, const void *key) in hash_map_has_key() argument
119 hash_index_t hash_key = hash_map->hash_fn(key) % hash_map->num_bucket; in hash_map_has_key()
122 hash_map_entry_t *hash_map_entry = find_bucket_entry_(hash_bucket_list, key); in hash_map_has_key()
126 bool hash_map_set(hash_map_t *hash_map, const void *key, void *data) in hash_map_set() argument
131 hash_index_t hash_key = hash_map->hash_fn(key) % hash_map->num_bucket; in hash_map_set()
141 hash_map_entry_t *hash_map_entry = find_bucket_entry_(hash_bucket_list, key); in hash_map_set()
156 hash_map_entry->key = key; in hash_map_set()
163 bool hash_map_erase(hash_map_t *hash_map, const void *key) in hash_map_erase() argument
167 hash_index_t hash_key = hash_map->hash_fn(key) % hash_map->num_bucket; in hash_map_erase()
[all …]
Dconfig.c27 char *key; member
49 static entry_t *entry_new(const char *key, const char *value);
51 static entry_t *entry_find(const config_t *config, const char *section, const char *key);
120 bool config_has_key(const config_t *config, const char *section, const char *key) in config_has_key() argument
124 assert(key != NULL); in config_has_key()
126 return (entry_find(config, section, key) != NULL); in config_has_key()
129 bool config_has_key_in_section(config_t *config, const char *key, char *key_value) in config_has_key_in_section() argument
131 OSI_TRACE_DEBUG("key = %s, value = %s", key, key_value); in config_has_key_in_section()
137 OSI_TRACE_DEBUG("entry->key = %s, entry->value = %s", entry->key, entry->value); in config_has_key_in_section()
138 if (!strcmp(entry->key, key) && !strcmp(entry->value, key_value)) { in config_has_key_in_section()
[all …]
/hal_espressif-3.7.0/components/bt/common/osi/include/osi/
Dconfig.h59 bool config_has_key(const config_t *config, const char *section, const char *key);
63 bool config_has_key_in_section(config_t *config, const char *key, char *key_value);
69 int config_get_int(const config_t *config, const char *section, const char *key, int def_value);
74 bool config_get_bool(const config_t *config, const char *section, const char *key, bool def_value);
80 const char *config_get_string(const config_t *config, const char *section, const char *key, const c…
85 void config_set_int(config_t *config, const char *section, const char *key, int value);
90 void config_set_bool(config_t *config, const char *section, const char *key, bool value);
95 void config_set_string(config_t *config, const char *section, const char *key, const char *value, b…
105 bool config_remove_key(config_t *config, const char *section, const char *key);
/hal_espressif-3.7.0/components/efuse/test_apps/main/one_key_block/
Dtest_efuse.c127 uint8_t key[32] = {0}; variable
128 TEST_ESP_OK(esp_efuse_read_field_blob(ESP_EFUSE_KEY0, &key, 256));
129 for (int i = 0; i < sizeof(key); ++i) {
130 TEST_ASSERT_EQUAL_INT(0, key[i]);
137 TEST_ESP_OK(esp_efuse_read_field_blob(ESP_EFUSE_KEY0, &key, 256));
138 TEST_ASSERT_EQUAL_HEX8_ARRAY(new_key, key, sizeof(key));
143 TEST_ESP_OK(esp_efuse_read_field_blob(ESP_EFUSE_KEY0, &key, 256));
145 TEST_ASSERT_EACH_EQUAL_HEX8(0, key, sizeof(key));
147 TEST_ASSERT_EQUAL_HEX8_ARRAY(new_key, key, sizeof(key));
/hal_espressif-3.7.0/components/esp_wifi/include/
Desp_wifi_crypto_types.h65 typedef int (*esp_aes_128_encrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned ch…
76 typedef int (*esp_aes_128_decrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned ch…
111 typedef int (*esp_hmac_sha256_vector_t)(const unsigned char *key, int key_len, int num_elem,
126 typedef int (*esp_sha256_prf_t)(const unsigned char *key, int key_len, const char *label,
139 typedef int (*esp_hmac_md5_t)(const unsigned char *key, unsigned int key_len, const unsigned char *…
153 typedef int (*esp_hmac_md5_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int n…
166 typedef int (*esp_hmac_sha1_t)(const unsigned char *key, unsigned int key_len, const unsigned char …
180 typedef int (*esp_hmac_sha1_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int …
198 typedef int (*esp_sha1_prf_t)(const unsigned char *key, unsigned int key_len, const char *label,
245 typedef int (*esp_rc4_skip_t)(const unsigned char *key, unsigned int keylen, unsigned int skip,
[all …]
/hal_espressif-3.7.0/components/wpa_supplicant/esp_supplicant/src/crypto/
Dcrypto_mbedtls.c128 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument
183 ret = mbedtls_md_hmac_starts(ctx, key, key_len); in crypto_hash_init()
291 const u8 *key, size_t key_len, in hmac_vector() argument
312 ret = mbedtls_md_hmac_starts(&md_ctx, key, key_len); in hmac_vector()
332 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha384_vector() argument
335 return hmac_vector(MBEDTLS_MD_SHA384, key, key_len, num_elem, addr, in hmac_sha384_vector()
340 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, in hmac_sha384() argument
343 return hmac_sha384_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha384()
346 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha256_vector() argument
349 return hmac_vector(MBEDTLS_MD_SHA256, key, key_len, num_elem, addr, in hmac_sha256_vector()
[all …]
/hal_espressif-3.7.0/components/mbedtls/test_apps/main/
Dtest_aes_gcm.c56 uint8_t key[16]; variable
82 memset(key, 0x56, 16);
104 mbedtls_gcm_setkey(&ctx, cipher, key, 128);
124 mbedtls_gcm_setkey(&ctx, cipher, key, 128);
156 uint8_t *key; member
194 mbedtls_gcm_setkey(&ctx, cipher, cfg->key, cfg->key_bits); in aes_gcm_test()
235 uint8_t key[16]; variable
239 memset(key, 0x27, sizeof(key));
304 .key = key,
305 .key_bits = 8 * sizeof(key),
[all …]

12345678910>>...12