/hal_espressif-latest/components/wpa_supplicant/src/tls/ |
D | rsa.c | 63 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-latest/components/bt/esp_ble_mesh/mesh_core/storage/ |
D | settings_nvs.c | 217 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 …]
|
D | settings_nvs.h | 34 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-latest/components/wpa_supplicant/src/crypto/ |
D | crypto_internal-rsa.c | 22 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 …]
|
D | aes_wrap.h | 25 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 …]
|
D | des-internal.c | 273 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 …]
|
D | crypto.h | 112 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 …]
|
D | crypto_internal.c | 34 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 …]
|
D | sha256.c | 26 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha256_vector() argument 44 if (sha256_vector(1, &key, &key_len, tk) < 0) in hmac_sha256_vector() 46 key = tk; in hmac_sha256_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 100 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, in hmac_sha256() argument 103 return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha256()
|
D | sha1.c | 26 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha1_vector() argument 45 if (sha1_vector(1, &key, &key_len, tk)) in hmac_sha1_vector() 47 key = tk; in hmac_sha1_vector() 62 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 78 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector() 104 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_sha1() argument 107 return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha1()
|
/hal_espressif-latest/components/bt/porting/ext/tinycrypt/src/ |
D | hmac.c | 37 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 …]
|
D | hmac_prng.c | 88 (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-latest/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/ |
D | hmac.c | 37 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 …]
|
D | hmac_prng.c | 84 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-latest/components/bt/host/bluedroid/btc/core/ |
D | btc_config.c | 113 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-latest/tools/esptool_py/docs/en/espefuse/ |
D | burn-key-cmd.rst | 1 .. _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-latest/components/bt/esp_ble_mesh/mesh_core/ |
D | fast_prov.c | 63 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-latest/components/bt/host/bluedroid/btc/include/btc/ |
D | btc_config.h | 22 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); 33 size_t btc_config_get_bin_length(const char *section, const char *key);
|
/hal_espressif-latest/components/bt/common/osi/ |
D | hash_functions.c | 23 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()
|
D | hash_map.c | 46 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 …]
|
D | config.c | 27 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-latest/components/bt/common/osi/include/osi/ |
D | config.h | 59 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… 110 bool config_remove_key(config_t *config, const char *section, const char *key);
|
D | hash_map.h | 29 const void *key; member 37 typedef hash_index_t (*hash_index_fn)(const void *key); 80 bool hash_map_has_key(const hash_map_t *hash_map, const void *key); 84 void *hash_map_get(const hash_map_t *hash_map, const void *key); 91 bool hash_map_set(hash_map_t *hash_map, const void *key, void *data); 97 bool hash_map_erase(hash_map_t *hash_map, const void *key);
|
/hal_espressif-latest/components/esp_wifi/include/ |
D | esp_wifi_crypto_types.h | 68 typedef int (*esp_aes_128_encrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned ch… 79 typedef int (*esp_aes_128_decrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned ch… 114 typedef int (*esp_hmac_sha256_vector_t)(const unsigned char *key, int key_len, int num_elem, 129 typedef int (*esp_sha256_prf_t)(const unsigned char *key, int key_len, const char *label, 142 typedef int (*esp_hmac_md5_t)(const unsigned char *key, unsigned int key_len, const unsigned char *… 156 typedef int (*esp_hmac_md5_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int n… 169 typedef int (*esp_hmac_sha1_t)(const unsigned char *key, unsigned int key_len, const unsigned char … 183 typedef int (*esp_hmac_sha1_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int … 201 typedef int (*esp_sha1_prf_t)(const unsigned char *key, unsigned int key_len, const char *label, 248 typedef int (*esp_rc4_skip_t)(const unsigned char *key, unsigned int keylen, unsigned int skip, [all …]
|
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/crypto/ |
D | crypto_mbedtls.c | 132 struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, in crypto_hash_init() argument 187 ret = mbedtls_md_hmac_starts(ctx, key, key_len); in crypto_hash_init() 295 const u8 *key, size_t key_len, in hmac_vector() argument 316 ret = mbedtls_md_hmac_starts(&md_ctx, key, key_len); in hmac_vector() 336 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha384_vector() argument 339 return hmac_vector(MBEDTLS_MD_SHA384, key, key_len, num_elem, addr, in hmac_sha384_vector() 344 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, in hmac_sha384() argument 347 return hmac_sha384_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha384() 350 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha256_vector() argument 353 return hmac_vector(MBEDTLS_MD_SHA256, key, key_len, num_elem, addr, in hmac_sha256_vector() [all …]
|