xref: /linux/net/mac80211/tkip.h (revision 0898782247ae533d1f4e47a06bc5d4870931b284)
1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2f0706e82SJiri Benc /*
3f0706e82SJiri Benc  * Copyright 2002-2004, Instant802 Networks, Inc.
4f0706e82SJiri Benc  */
5f0706e82SJiri Benc 
6f0706e82SJiri Benc #ifndef TKIP_H
7f0706e82SJiri Benc #define TKIP_H
8f0706e82SJiri Benc 
9f0706e82SJiri Benc #include <linux/types.h>
10f0706e82SJiri Benc #include <linux/crypto.h>
112c8dccc7SJohannes Berg #include "key.h"
12f0706e82SJiri Benc 
13*5fdb3735SArd Biesheuvel int ieee80211_tkip_encrypt_data(struct arc4_ctx *ctx,
14f0706e82SJiri Benc 				struct ieee80211_key *key,
15523b02eaSJohannes Berg 				struct sk_buff *skb,
16523b02eaSJohannes Berg 				u8 *payload, size_t payload_len);
17523b02eaSJohannes Berg 
18f0706e82SJiri Benc enum {
19f0706e82SJiri Benc 	TKIP_DECRYPT_OK = 0,
20f0706e82SJiri Benc 	TKIP_DECRYPT_NO_EXT_IV = -1,
21f0706e82SJiri Benc 	TKIP_DECRYPT_INVALID_KEYIDX = -2,
22f0706e82SJiri Benc 	TKIP_DECRYPT_REPLAY = -3,
23f0706e82SJiri Benc };
24*5fdb3735SArd Biesheuvel int ieee80211_tkip_decrypt_data(struct arc4_ctx *ctx,
25f0706e82SJiri Benc 				struct ieee80211_key *key,
26f0706e82SJiri Benc 				u8 *payload, size_t payload_len, u8 *ta,
279ae4fda3SEmmanuel Grumbach 				u8 *ra, int only_iv, int queue,
2850741ae0SJohannes Berg 				u32 *out_iv32, u16 *out_iv16);
29f0706e82SJiri Benc 
30f0706e82SJiri Benc #endif /* TKIP_H */
31