/* Software CCMP (AES-CCM) RX decryption: see ccmp.c. * * The 7265D firmware's RX crypto path can fail to use keys that are correctly * installed with ADD_STA_KEY (SEC_ENC_ERR with the matching key ID), while TX * works. The RX path therefore decrypts the frame in software using the * same TK/GTK. */ #ifndef CCMP_H #define CCMP_H /* Decrypt one FromDS CCMP-protected MPDU in place. * * frame the 802.11 MPDU (header, CCMP header, ciphertext, 8-byte MIC) * len full MPDU length * hdr 802.11 header length (24, or 26 with a QoS control field) * key 16-byte CCMP key (TK for key ID 0, GTK for the group key ID) * * Returns 0 and leaves the plaintext at frame + hdr + 8, or -1 on a MIC * failure or malformed frame. */ int ccmp_rx_decrypt(unsigned char *frame, unsigned int len, unsigned int hdr, const unsigned char key[16]); #endif