mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-10 20:11:53 +01:00
H/W decryption of Mgmt frames was disabled for PMF and done through S/W. If ESPNOW packets go through this path, it affects backward compatibility since method of decrypting Mgmt packets is different in H/W. To address PMF + ESPNOW Co-existance, CCMP decryption method is modified for ESPNOW packets so that they can be decrypted correctly. Since Tx of ESPNOW packets can still be done in H/W alongside PMF, no change required in encryption method in S/W. Co-Authored-By: Nachiket Kukade <nachiket.kukade@espressif.com> Co-Authored-By: zhangyanjiao <zhangyanjiao@espressif.com> Co-Authored-By: kapil.gupta <kapil.gupta@espressif.com>
29 lines
1.0 KiB
C
29 lines
1.0 KiB
C
/*
|
|
* wlantest - IEEE 802.11 protocol monitoring and testing tool
|
|
* Copyright (c) 2010-2013, Jouni Malinen <j@w1.fi>
|
|
*
|
|
* This software may be distributed under the terms of the BSD license.
|
|
* See README for more details.
|
|
*/
|
|
|
|
#ifdef CONFIG_IEEE80211W
|
|
#ifndef CCMP_H
|
|
#define CCMP_H
|
|
|
|
u8 * ccmp_decrypt(const u8 *tk, const u8 *hdr, const u8 *data,
|
|
size_t data_len, size_t *decrypted_len, bool espnow_pkt);
|
|
u8 * ccmp_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen,
|
|
u8 *pn, int keyid, size_t *encrypted_len);
|
|
u8 * ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3,
|
|
const u8 *frame, size_t len,
|
|
size_t hdrlen, const u8 *pn, int keyid,
|
|
size_t *encrypted_len);
|
|
void ccmp_get_pn(u8 *pn, const u8 *data);
|
|
u8 * ccmp_256_decrypt(const u8 *tk, const u8 *hdr, const u8 *data,
|
|
size_t data_len, size_t *decrypted_len);
|
|
u8 * ccmp_256_encrypt(const u8 *tk, u8 *frame, size_t len, size_t hdrlen,
|
|
u8 *pn, int keyid, size_t *encrypted_len);
|
|
|
|
#endif /* CCMP_H */
|
|
#endif /* CONFIG_IEEE80211W */
|