linux/net/wireless/lib80211_crypt_wep.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * lib80211 crypt: host-based WEP encryption implementation for lib80211
 *
 * Copyright (c) 2002-2004, Jouni Malinen <[email protected]>
 * Copyright (c) 2008, John W. Linville <[email protected]>
 */

#include <linux/err.h>
#include <linux/fips.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/scatterlist.h>
#include <linux/skbuff.h>
#include <linux/mm.h>
#include <asm/string.h>

#include <net/lib80211.h>

#include <crypto/arc4.h>
#include <linux/crc32.h>

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

struct lib80211_wep_data {};

static void *lib80211_wep_init(int keyidx)
{}

static void lib80211_wep_deinit(void *priv)
{}

/* Add WEP IV/key info to a frame that has at least 4 bytes of headroom */
static int lib80211_wep_build_iv(struct sk_buff *skb, int hdr_len,
			       u8 *key, int keylen, void *priv)
{}

/* Perform WEP encryption on given skb that has at least 4 bytes of headroom
 * for IV and 4 bytes of tailroom for ICV. Both IV and ICV will be transmitted,
 * so the payload length increases with 8 bytes.
 *
 * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))
 */
static int lib80211_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
{}

/* Perform WEP decryption on given buffer. Buffer includes whole WEP part of
 * the frame: IV (4 bytes), encrypted payload (including SNAP header),
 * ICV (4 bytes). len includes both IV and ICV.
 *
 * Returns 0 if frame was decrypted successfully and ICV was correct and -1 on
 * failure. If frame is OK, IV and ICV will be removed.
 */
static int lib80211_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
{}

static int lib80211_wep_set_key(void *key, int len, u8 * seq, void *priv)
{}

static int lib80211_wep_get_key(void *key, int len, u8 * seq, void *priv)
{}

static void lib80211_wep_print_stats(struct seq_file *m, void *priv)
{}

static struct lib80211_crypto_ops lib80211_crypt_wep =;

static int __init lib80211_crypto_wep_init(void)
{}

static void __exit lib80211_crypto_wep_exit(void)
{}

module_init();
module_exit(lib80211_crypto_wep_exit);