/hal_espressif-latest/components/wpa_supplicant/src/crypto/ |
D | crypto_internal-cipher.c | 103 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument 110 if (plain != crypt) in crypto_cipher_encrypt() 111 os_memcpy(crypt, plain, len); in crypto_cipher_encrypt() 122 ctx->u.aes.cbc[j] ^= plain[j]; in crypto_cipher_encrypt() 126 plain += AES_BLOCK_SIZE; in crypto_cipher_encrypt() 136 ctx->u.des3.cbc[j] ^= plain[j]; in crypto_cipher_encrypt() 140 plain += 8; in crypto_cipher_encrypt() 150 ctx->u.des3.cbc[j] ^= plain[j]; in crypto_cipher_encrypt() 154 plain += 8; in crypto_cipher_encrypt() 167 u8 *plain, size_t len) in crypto_cipher_decrypt() argument [all …]
|
D | crypto_ops.c | 20 static int esp_aes_wrap(const u8 *kek, int n, const u8 *plain, u8 *cipher) in esp_aes_wrap() argument 22 return aes_wrap(kek, DEFAULT_KEK_LEN, n, plain, cipher); in esp_aes_wrap() 25 static int esp_aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain) in esp_aes_unwrap() argument 27 return aes_unwrap(kek, DEFAULT_KEK_LEN, n, cipher, plain); in esp_aes_unwrap() 30 static void esp_aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in esp_aes_encrypt() argument 32 aes_encrypt(ctx, plain, crypt); in esp_aes_encrypt() 35 static void esp_aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in esp_aes_decrypt() argument 37 aes_decrypt(ctx, crypt, plain); in esp_aes_decrypt()
|
D | des_i.h | 18 void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt); 19 void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain); 22 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt); 23 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain);
|
D | des-internal.c | 435 void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt) in des_block_encrypt() argument 438 work[0] = WPA_GET_BE32(plain); in des_block_encrypt() 439 work[1] = WPA_GET_BE32(plain + 4); in des_block_encrypt() 446 void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain) in des_block_decrypt() argument 452 WPA_PUT_BE32(plain, work[0]); in des_block_decrypt() 453 WPA_PUT_BE32(plain + 4, work[1]); in des_block_decrypt() 469 void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt) in des3_encrypt() argument 473 work[0] = WPA_GET_BE32(plain); in des3_encrypt() 474 work[1] = WPA_GET_BE32(plain + 4); in des3_encrypt() 483 void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain) in des3_decrypt() argument [all …]
|
D | ccmp.c | 146 u8 *plain; in ccmp_decrypt() local 151 plain = os_malloc(data_len + AES_BLOCK_SIZE); in ccmp_decrypt() 152 if (plain == NULL) in ccmp_decrypt() 170 data + 8 + mlen, plain) < 0) { in ccmp_decrypt() 171 os_free(plain); in ccmp_decrypt() 174 wpa_hexdump(MSG_MSGDUMP, "CCMP decrypted", plain, mlen); in ccmp_decrypt() 177 return plain; in ccmp_decrypt() 288 u8 *plain; in ccmp_256_decrypt() local 293 plain = os_malloc(data_len + AES_BLOCK_SIZE); in ccmp_256_decrypt() 294 if (plain == NULL) in ccmp_256_decrypt() [all …]
|
D | aes_wrap.h | 21 int __must_check aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, 24 const u8 *cipher, u8 *plain); 54 const u8 *plain, size_t plain_len, 61 u8 *plain); 66 size_t M, const u8 *plain, size_t plain_len, 71 u8 *plain);
|
D | aes-unwrap.c | 27 u8 *plain) in aes_unwrap() argument 36 r = plain; in aes_unwrap() 51 r = plain + (n - 1) * 8; in aes_unwrap()
|
D | aes.h | 15 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); 18 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
|
D | aes-ccm.c | 150 size_t M, const u8 *plain, size_t plain_len, in aes_ccm_ae() argument 165 aes_ccm_auth(aes, plain, plain_len, x); in aes_ccm_ae() 169 aes_ccm_encr(aes, L, plain, plain_len, crypt, a); in aes_ccm_ae() 181 const u8 *aad, size_t aad_len, const u8 *auth, u8 *plain) in aes_ccm_ad() argument 200 aes_ccm_encr(aes, L, crypt, crypt_len, plain, a); in aes_ccm_ad() 203 aes_ccm_auth(aes, plain, crypt_len, x); in aes_ccm_ad()
|
D | aes-wrap.c | 26 int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher) in aes_wrap() argument 38 os_memcpy(r, plain, 8 * n); in aes_wrap()
|
D | crypto_internal-rsa.c | 113 u8 *plain, size_t *plain_len) in crypto_public_key_decrypt_pkcs1() argument 116 crypt, crypt_len, plain, plain_len); in crypto_public_key_decrypt_pkcs1()
|
D | aes-gcm.c | 255 const u8 *plain, size_t plain_len, in aes_gcm_ae() argument 270 aes_gcm_gctr(aes, J0, plain, plain_len, crypt); in aes_gcm_ae() 290 const u8 *aad, size_t aad_len, const u8 *tag, u8 *plain) in aes_gcm_ad() argument 304 aes_gcm_gctr(aes, J0, crypt, crypt_len, plain); in aes_gcm_ad()
|
D | crypto.h | 129 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); 152 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain); 254 const u8 *plain, u8 *crypt, size_t len); 269 const u8 *crypt, u8 *plain, size_t len); 419 u8 *plain, size_t *plain_len);
|
D | aes-internal-enc.c | 119 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument 122 rijndaelEncrypt(ctx, rk[AES_PRIV_NR_POS], plain, crypt); in aes_encrypt()
|
D | aes-internal-dec.c | 151 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument 154 rijndaelDecrypt(ctx, rk[AES_PRIV_NR_POS], crypt, plain); in aes_decrypt()
|
/hal_espressif-latest/components/wpa_supplicant/src/tls/ |
D | pkcs1.c | 136 u8 *plain, size_t *plain_len) in pkcs1_decrypt_public_key() argument 142 if (crypto_rsa_exptmod(crypt, crypt_len, plain, &len, key, 0) < 0) in pkcs1_decrypt_public_key() 157 plain[0] != 0x00 || plain[1] != 0x01) { in pkcs1_decrypt_public_key() 160 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in pkcs1_decrypt_public_key() 164 pos = plain + 3; in pkcs1_decrypt_public_key() 166 if (plain[2] != 0xff) { in pkcs1_decrypt_public_key() 169 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in pkcs1_decrypt_public_key() 172 while (pos < plain + len && *pos == 0xff) in pkcs1_decrypt_public_key() 175 if (pos - plain - 2 < 8) { in pkcs1_decrypt_public_key() 179 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in pkcs1_decrypt_public_key() [all …]
|
D | pkcs1.h | 23 u8 *plain, size_t *plain_len);
|
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/crypto/ |
D | crypto_mbedtls-rsa.c | 338 u8 *plain, size_t *plain_len) in crypto_public_key_decrypt_pkcs1() argument 348 if (mbedtls_rsa_public(mbedtls_pk_rsa(*pkey), crypt, plain) < 0) in crypto_public_key_decrypt_pkcs1() 363 plain[0] != 0x00 || plain[1] != 0x01) { in crypto_public_key_decrypt_pkcs1() 366 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in crypto_public_key_decrypt_pkcs1() 370 pos = plain + 3; in crypto_public_key_decrypt_pkcs1() 372 if (plain[2] != 0xff) { in crypto_public_key_decrypt_pkcs1() 375 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in crypto_public_key_decrypt_pkcs1() 378 while (pos < plain + len && *pos == 0xff) in crypto_public_key_decrypt_pkcs1() 381 if (pos - plain - 2 < 8) { in crypto_public_key_decrypt_pkcs1() 385 wpa_hexdump_key(MSG_DEBUG, "Signature EB", plain, len); in crypto_public_key_decrypt_pkcs1() [all …]
|
D | crypto_mbedtls.c | 430 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt) in aes_encrypt() argument 432 return aes_crypt(ctx, MBEDTLS_AES_ENCRYPT, plain, crypt); in aes_encrypt() 445 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain) in aes_decrypt() argument 447 return aes_crypt(ctx, MBEDTLS_AES_DECRYPT, crypt, plain); in aes_decrypt() 613 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain, in crypto_cipher_encrypt() argument 619 ret = mbedtls_cipher_update(&ctx->ctx_enc, plain, len, crypt, &olen); in crypto_cipher_encrypt() 633 u8 *plain, size_t len) in crypto_cipher_decrypt() argument 638 ret = mbedtls_cipher_update(&ctx->ctx_dec, crypt, len, plain, &olen); in crypto_cipher_decrypt() 643 ret = mbedtls_cipher_finish(&ctx->ctx_dec, plain + olen, &olen); in crypto_cipher_decrypt() 687 int aes_wrap(const u8 *kek, size_t kek_len, int n, const u8 *plain, u8 *cipher) in aes_wrap() argument [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/wps/ |
D | wps_enrollee.c | 212 struct wpabuf *msg, *plain; in wps_build_m5() local 216 plain = wpabuf_alloc(200); in wps_build_m5() 217 if (plain == NULL) in wps_build_m5() 222 wpabuf_free(plain); in wps_build_m5() 229 wps_build_e_snonce1(wps, plain) || in wps_build_m5() 230 wps_build_key_wrap_auth(wps, plain) || in wps_build_m5() 231 wps_build_encr_settings(wps, msg, plain) || in wps_build_m5() 234 wpabuf_clear_free(plain); in wps_build_m5() 238 wpabuf_clear_free(plain); in wps_build_m5() 354 static int wps_build_ap_settings(struct wps_data *wps, struct wpabuf *plain) in wps_build_ap_settings() argument [all …]
|
D | wps_common.c | 374 struct wpabuf *plain; in wps_get_oob_cred() local 376 plain = wpabuf_alloc(500); in wps_get_oob_cred() 377 if (plain == NULL) { in wps_get_oob_cred() 387 if (wps_build_cred(&data, plain) || in wps_get_oob_cred() 388 (rf_band && wps_build_rf_bands_attr(plain, rf_band)) || in wps_get_oob_cred() 389 (channel && wps_build_ap_channel(plain, channel)) || in wps_get_oob_cred() 390 wps_build_mac_addr(plain, wps->dev.mac_addr) || in wps_get_oob_cred() 391 wps_build_wfa_ext(plain, 0, NULL, 0, 0)) { in wps_get_oob_cred() 393 wpabuf_clear_free(plain); in wps_get_oob_cred() 422 return plain; in wps_get_oob_cred()
|
D | wps_registrar.c | 1873 struct wpabuf *msg, *plain; in wps_build_ap_cred() local 1879 plain = wpabuf_alloc(200); in wps_build_ap_cred() 1880 if (plain == NULL) { in wps_build_ap_cred() 1885 if (wps_build_ap_settings(wps, plain)) { in wps_build_ap_cred() 1886 wpabuf_clear_free(plain); in wps_build_ap_cred() 1892 wpabuf_put_be16(msg, wpabuf_len(plain)); in wps_build_ap_cred() 1893 wpabuf_put_buf(msg, plain); in wps_build_ap_cred() 1894 wpabuf_clear_free(plain); in wps_build_ap_cred() 1949 struct wpabuf *plain = wpabuf_alloc(500); in wps_build_m2() local 1950 if (plain == NULL || in wps_build_m2() [all …]
|
D | wps_attr_build.c | 400 struct wpabuf *plain) in wps_build_encr_settings() argument 409 pad_len = block_size - wpabuf_len(plain) % block_size; in wps_build_encr_settings() 410 os_memset(wpabuf_put(plain, pad_len), pad_len, pad_len); in wps_build_encr_settings() 413 wpabuf_put_be16(msg, block_size + wpabuf_len(plain)); in wps_build_encr_settings() 420 wpabuf_put_buf(msg, plain); in wps_build_encr_settings() 421 if (aes_128_cbc_encrypt(wps->keywrapkey, iv, data, wpabuf_len(plain))) in wps_build_encr_settings()
|
D | wps_i.h | 167 struct wpabuf *plain);
|
/hal_espressif-latest/components/esp_wifi/include/ |
D | esp_wifi_crypto_types.h | 90 typedef int (*esp_aes_wrap_t)(const unsigned char *kek, int n, const unsigned char *plain, unsigned… 101 …_aes_unwrap_t)(const unsigned char *kek, int n, const unsigned char *cipher, unsigned char *plain); 270 typedef void (*esp_aes_encrypt_t)(void *ctx, const unsigned char *plain, unsigned char *crypt); 295 typedef void (*esp_aes_decrypt_t)(void *ctx, const unsigned char *crypt, unsigned char *plain);
|