ccmp.h 864 B

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