/hal_espressif-latest/components/wpa_supplicant/src/crypto/ |
D | crypto_internal.c | 35 size_t key_len; member 40 size_t key_len) in crypto_hash_init() argument 76 if (key_len > sizeof(k_pad)) { in crypto_hash_init() 78 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init() 81 key_len = 16; in crypto_hash_init() 83 os_memcpy(ctx->key, key, key_len); in crypto_hash_init() 84 ctx->key_len = key_len; in crypto_hash_init() 86 os_memcpy(k_pad, key, key_len); in crypto_hash_init() 87 if (key_len < sizeof(k_pad)) in crypto_hash_init() 88 os_memset(k_pad + key_len, 0, sizeof(k_pad) - key_len); in crypto_hash_init() [all …]
|
D | aes-siv.c | 64 static int aes_s2v(const u8 *key, size_t key_len, in aes_s2v() argument 79 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 84 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); in aes_s2v() 89 ret = omac1_aes_vector(key, key_len, 1, &addr[i], &len[i], in aes_s2v() 104 ret = omac1_aes_vector(key, key_len, 1, data, &len[i], mac); in aes_s2v() 115 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 119 int aes_siv_encrypt(const u8 *key, size_t key_len, in aes_siv_encrypt() argument 132 (key_len != 32 && key_len != 48 && key_len != 64)) in aes_siv_encrypt() 135 key_len /= 2; in aes_siv_encrypt() 137 k2 = key + key_len; in aes_siv_encrypt() [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 43 if (key_len > 64) { in hmac_sha256_vector() 44 if (sha256_vector(1, &key, &key_len, tk) < 0) in hmac_sha256_vector() 47 key_len = 32; 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 44 if (key_len > 64) { in hmac_sha1_vector() 45 if (sha1_vector(1, &key, &key_len, tk)) in hmac_sha1_vector() 48 key_len = 20; 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()
|
D | md5.c | 26 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_md5_vector() argument 44 if (key_len > 64) { in hmac_md5_vector() 45 if (md5_vector(1, &key, &key_len, tk)) in hmac_md5_vector() 48 key_len = 16; in hmac_md5_vector() 62 os_memcpy(k_pad, key, key_len); in hmac_md5_vector() 79 os_memcpy(k_pad, key, key_len); in hmac_md5_vector() 105 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, in hmac_md5() argument 108 return hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); in hmac_md5()
|
D | sha256-prf.c | 30 int sha256_prf(const u8 *key, size_t key_len, const char *label, in sha256_prf() argument 33 return sha256_prf_bits(key, key_len, label, data, data_len, buf, in sha256_prf() 54 int sha256_prf_bits(const u8 *key, size_t key_len, const char *label, in sha256_prf_bits() argument 81 if (hmac_sha256_vector(key, key_len, 4, addr, len, in sha256_prf_bits() 86 if (hmac_sha256_vector(key, key_len, 4, addr, len, in sha256_prf_bits()
|
D | sha384-prf.c | 30 int sha384_prf(const u8 *key, size_t key_len, const char *label, in sha384_prf() argument 33 return sha384_prf_bits(key, key_len, label, data, data_len, buf, in sha384_prf() 54 int sha384_prf_bits(const u8 *key, size_t key_len, const char *label, in sha384_prf_bits() argument 81 if (hmac_sha384_vector(key, key_len, 4, addr, len, in sha384_prf_bits() 86 if (hmac_sha384_vector(key, key_len, 4, addr, len, in sha384_prf_bits()
|
D | aes_wrap.h | 25 int __must_check omac1_aes_vector(const u8 *key, size_t key_len, 36 int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, 52 int __must_check aes_gcm_ae(const u8 *key, size_t key_len, 57 int __must_check aes_gcm_ad(const u8 *key, size_t key_len, 62 int __must_check aes_gmac(const u8 *key, size_t key_len, 65 int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, 68 int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
|
D | sha1.h | 14 int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len, 18 int sha1_prf(const u8 *key, size_t key_len, const char *label, 20 int sha1_t_prf(const u8 *key, size_t key_len, const char *label,
|
D | sha256.h | 14 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, 18 int sha256_prf(const u8 *key, size_t key_len, const char *label, 20 int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
|
D | sha384.h | 15 int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, 17 int hmac_sha384(const u8 *key, size_t key_len, const u8 *data, 19 int sha384_prf(const u8 *key, size_t key_len, const char *label, 21 int sha384_prf_bits(const u8 *key, size_t key_len, const char *label,
|
D | sha1-prf.c | 30 int sha1_prf(const u8 *key, size_t key_len, const char *label, in sha1_prf() argument 51 if (hmac_sha1_vector(key, key_len, 3, addr, len, in sha1_prf() 56 if (hmac_sha1_vector(key, key_len, 3, addr, len, in sha1_prf()
|
D | crypto_internal-cipher.c | 45 size_t key_len) in crypto_cipher_init() argument 57 if (key_len > sizeof(ctx->u.rc4.key)) { in crypto_cipher_init() 61 ctx->u.rc4.keylen = key_len; in crypto_cipher_init() 62 os_memcpy(ctx->u.rc4.key, key, key_len); in crypto_cipher_init() 65 ctx->u.aes.ctx_enc = aes_encrypt_init(key, key_len); in crypto_cipher_init() 70 ctx->u.aes.ctx_dec = aes_decrypt_init(key, key_len); in crypto_cipher_init() 79 if (key_len != 24) { in crypto_cipher_init() 87 if (key_len != 8) { in crypto_cipher_init()
|
D | aes-gcm.c | 175 static void * aes_gcm_init_hash_subkey(const u8 *key, size_t key_len, u8 *H) in aes_gcm_init_hash_subkey() argument 179 aes = aes_encrypt_init(key, key_len); in aes_gcm_init_hash_subkey() 254 int aes_gcm_ae(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ae() argument 263 aes = aes_gcm_init_hash_subkey(key, key_len, H); in aes_gcm_ae() 288 int aes_gcm_ad(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ad() argument 297 aes = aes_gcm_init_hash_subkey(key, key_len, H); in aes_gcm_ad() 322 int aes_gmac(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gmac() argument 325 return aes_gcm_ae(key, key_len, iv, iv_len, NULL, 0, aad, aad_len, NULL, in aes_gmac()
|
D | md5.h | 14 int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
|
D | aes_siv.h | 12 int aes_siv_encrypt(const u8 *key, size_t key_len, 16 int aes_siv_decrypt(const u8 *key, size_t key_len,
|
D | aes-ctr.c | 25 int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, in aes_ctr_encrypt() argument 34 ctx = aes_encrypt_init(key, key_len); in aes_ctr_encrypt()
|
D | sha1-tprf.c | 29 int sha1_t_prf(const u8 *key, size_t key_len, const char *label, in sha1_t_prf() argument 57 if (hmac_sha1_vector(key, key_len, 5, addr, len, hash)) in sha1_t_prf()
|
D | aes-ccm.c | 149 int aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ae() argument 160 aes = aes_encrypt_init(key, key_len); in aes_ccm_ae() 179 int aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce, in aes_ccm_ad() argument 191 aes = aes_encrypt_init(key, key_len); in aes_ccm_ad()
|
D | crypto_ops.c | 40 static int esp_aes_gmac(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in esp_aes_gmac() argument 44 return aes_gmac(key, key_len, iv, iv_len, aad, aad_len, tag); in esp_aes_gmac()
|
/hal_espressif-latest/components/wpa_supplicant/src/wps/ |
D | wps_attr_process.c | 170 const u8 *key, size_t key_len) in wps_process_cred_network_key() argument 185 wpa_hexdump_key(MSG_DEBUG, "WPS: Network Key", key, key_len); in wps_process_cred_network_key() 186 if (key_len <= sizeof(cred->key)) { in wps_process_cred_network_key() 187 os_memcpy(cred->key, key, key_len); in wps_process_cred_network_key() 188 cred->key_len = key_len; in wps_process_cred_network_key() 214 cred->key_len > 8 && cred->key_len < 64 && in wps_workaround_cred_key() 215 cred->key[cred->key_len - 1] == 0) { in wps_workaround_cred_key() 220 cred->key, cred->key_len); in wps_workaround_cred_key() 230 cred->key_len--; in wps_workaround_cred_key() 236 (cred->key_len < 8 || has_ctrl_char(cred->key, cred->key_len))) { in wps_workaround_cred_key() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/crypto/ |
D | crypto_mbedtls.c | 133 size_t key_len) 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 …]
|
/hal_espressif-latest/components/esp_wifi/include/ |
D | esp_wifi_crypto_types.h | 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,
|
/hal_espressif-latest/components/wpa_supplicant/src/eap_peer/ |
D | eap_peap_common.c | 18 peap_prfplus(int version, const u8 *key, size_t key_len, in peap_prfplus() argument 75 if (hmac_sha1_vector(key, key_len, 5, addr, len, hash) < 0) in peap_prfplus()
|
/hal_espressif-latest/components/mbedtls/esp_crt_bundle/ |
D | esp_crt_bundle.c | 130 size_t key_len = s_crt_bundle.crts[middle][2] << 8 | s_crt_bundle.crts[middle][3]; in esp_crt_verify_callback() local 131 … esp_crt_check_signature(child, s_crt_bundle.crts[middle] + CRT_HEADER_OFFSET + name_len, key_len); in esp_crt_verify_callback() 182 size_t key_len = cur_crt[2] << 8 | cur_crt[3]; in esp_crt_bundle_init() local 183 cur_crt = cur_crt + CRT_HEADER_OFFSET + name_len + key_len; in esp_crt_bundle_init()
|