2 * Copyright 2002-2004, Instant802 Networks, Inc.
3 * Copyright 2005, Devicescape Software, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
10 #ifndef IEEE80211_KEY_H
11 #define IEEE80211_KEY_H
14 * struct ieee80211_key::key is encoded as a 256-bit (32 byte) data block:
15 * Temporal Encryption Key (128 bits)
16 * Temporal Authenticator Tx MIC Key (64 bits)
17 * Temporal Authenticator Rx MIC Key (64 bits)
23 #define ALG_TKIP_KEY_LEN 32
24 /* Starting offsets for each key */
25 #define ALG_TKIP_TEMP_ENCR_KEY 0
26 #define ALG_TKIP_TEMP_AUTH_TX_MIC_KEY 16
27 #define ALG_TKIP_TEMP_AUTH_RX_MIC_KEY 24
29 #define TKIP_ICV_LEN 4
31 #define ALG_CCMP_KEY_LEN 16
32 #define CCMP_HDR_LEN 8
33 #define CCMP_MIC_LEN 8
34 #define CCMP_TK_LEN 16
37 #define NUM_RX_DATA_QUEUES 17
39 struct ieee80211_key
{
40 int hw_key_idx
; /* filled and used by low-level driver */
41 ieee80211_key_alg alg
;
50 /* last received RSC */
51 u32 iv32_rx
[NUM_RX_DATA_QUEUES
];
52 u16 iv16_rx
[NUM_RX_DATA_QUEUES
];
53 u16 p1k_rx
[NUM_RX_DATA_QUEUES
][5];
54 int rx_initialized
[NUM_RX_DATA_QUEUES
];
58 /* TODO: for WME make this replay counter per AC */
59 u8 rx_pn
[NUM_RX_DATA_QUEUES
][6];
61 #define AES_STATE_LEN 44
63 u32 aes_state
[AES_STATE_LEN
];
64 u32 replays
; /* dot11RSNAStatsCCMPReplays */
67 int tx_rx_count
; /* number of times this key has been used */
70 /* if the low level driver can provide hardware acceleration it should
72 int force_sw_encrypt
:1;
73 int keyidx
:8; /* WEP key index */
74 int default_tx_key
:1; /* This key is the new default TX key
75 * (used only for broadcast keys). */
80 #endif /* IEEE80211_KEY_H */
This page took 0.047867 seconds and 5 git commands to generate.