Skip to contentSkip to conversation

Consolidate Michael MIC code into mac80211

PATCH Superseded Eric Biggers 5 participants 18 messages Apr 5 – Apr 7

Subsystems (16)
Arm (32-bit) PowerPC MIPS Crypto API +12 more subsystems

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Consolidate Michael MIC code into mac80211

Michael MIC is an inherently weak algorithm that is specific to WPA TKIP, which itself was an interim security solution to replace the broken WEP standard.

Currently, the primary implementation of Michael MIC in the kernel is the one in the mac80211 module. But there's also a duplicate implementation in crypto/michael_mic.c which is exposed via the crypto_shash API. It's used only by a few wireless drivers.

Seeing as Michael MIC is specific to WPA TKIP and should never be used elsewhere, this series migrates those few drivers to the mac80211 implementation of Michael MIC, then removes the crypto implementation of Michael MIC. This consolidates duplicate code and prevents other kernel subsystems from accidentally using this insecure algorithm.

This series is targeting wireless-next.

Eric Biggers (6):
wifi: mac80211: Export michael_mic()
wifi: ath11k: Use michael_mic() from mac80211
wifi: ath12k: Use michael_mic() from mac80211
wifi: ipw2x00: Depend on MAC80211
wifi: ipw2x00: Use michael_mic() from mac80211
crypto: Remove michael_mic from crypto_shash API

 arch/arm/configs/omap2plus_defconfig          |   1 -
 arch/arm/configs/spitz_defconfig              |   1 -
 arch/arm64/configs/defconfig                  |   1 -
 arch/m68k/configs/amiga_defconfig             |   1 -
 arch/m68k/configs/apollo_defconfig            |   1 -
 arch/m68k/configs/atari_defconfig             |   1 -
 arch/m68k/configs/bvme6000_defconfig          |   1 -
 arch/m68k/configs/hp300_defconfig             |   1 -
 arch/m68k/configs/mac_defconfig               |   1 -
 arch/m68k/configs/multi_defconfig             |   1 -
 arch/m68k/configs/mvme147_defconfig           |   1 -
 arch/m68k/configs/mvme16x_defconfig           |   1 -
 arch/m68k/configs/q40_defconfig               |   1 -
 arch/m68k/configs/sun3_defconfig              |   1 -
 arch/m68k/configs/sun3x_defconfig             |   1 -
 arch/mips/configs/bigsur_defconfig            |   1 -
 arch/mips/configs/decstation_64_defconfig     |   1 -
 arch/mips/configs/decstation_defconfig        |   1 -
 arch/mips/configs/decstation_r4k_defconfig    |   1 -
 arch/mips/configs/gpr_defconfig               |   1 -
 arch/mips/configs/ip32_defconfig              |   1 -
 arch/mips/configs/lemote2f_defconfig          |   1 -
 arch/mips/configs/malta_qemu_32r6_defconfig   |   1 -
 arch/mips/configs/maltaaprp_defconfig         |   1 -
 arch/mips/configs/maltasmvp_defconfig         |   1 -
 arch/mips/configs/maltasmvp_eva_defconfig     |   1 -
 arch/mips/configs/maltaup_defconfig           |   1 -
 arch/mips/configs/mtx1_defconfig              |   1 -
 arch/mips/configs/rm200_defconfig             |   1 -
 arch/mips/configs/sb1250_swarm_defconfig      |   1 -
 arch/parisc/configs/generic-32bit_defconfig   |   1 -
 arch/parisc/configs/generic-64bit_defconfig   |   1 -
 arch/powerpc/configs/g5_defconfig             |   1 -
 arch/powerpc/configs/linkstation_defconfig    |   1 -
 arch/powerpc/configs/mvme5100_defconfig       |   1 -
 arch/powerpc/configs/powernv_defconfig        |   1 -
 arch/powerpc/configs/ppc64_defconfig          |   1 -
 arch/powerpc/configs/ppc64e_defconfig         |   1 -
 arch/powerpc/configs/ppc6xx_defconfig         |   1 -
 arch/powerpc/configs/ps3_defconfig            |   1 -
 arch/s390/configs/debug_defconfig             |   1 -
 arch/s390/configs/defconfig                   |   1 -
 arch/sh/configs/sh2007_defconfig              |   1 -
 arch/sh/configs/titan_defconfig               |   1 -
 arch/sh/configs/ul2_defconfig                 |   1 -
 arch/sparc/configs/sparc32_defconfig          |   1 -
 arch/sparc/configs/sparc64_defconfig          |   1 -
 crypto/Kconfig                                |  12 --
 crypto/Makefile                               |   1 -
 crypto/michael_mic.c                          | 176 ------------------
 crypto/tcrypt.c                               |   4 -
 crypto/testmgr.c                              |   6 -
 crypto/testmgr.h                              |  50 -----
 drivers/net/wireless/ath/ath11k/Kconfig       |   1 -
 drivers/net/wireless/ath/ath11k/dp.c          |   2 -
 drivers/net/wireless/ath/ath11k/dp_rx.c       |  60 +-----
 drivers/net/wireless/ath/ath11k/peer.h        |   1 -
 drivers/net/wireless/ath/ath12k/Kconfig       |   1 -
 drivers/net/wireless/ath/ath12k/dp.c          |   2 -
 drivers/net/wireless/ath/ath12k/dp_peer.h     |   1 -
 drivers/net/wireless/ath/ath12k/dp_rx.c       |  55 +-----
 drivers/net/wireless/ath/ath12k/dp_rx.h       |   4 -
 drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c |   7 +-
 drivers/net/wireless/intel/ipw2x00/Kconfig    |   7 +-
 .../intel/ipw2x00/libipw_crypto_tkip.c        | 120 +-----------
 include/linux/ieee80211.h                     |   5 +
 net/mac80211/michael.c                        |   5 +-
 net/mac80211/michael.h                        |  22 ---
 net/mac80211/wpa.c                            |   1 -
 69 files changed, 32 insertions(+), 558 deletions(-)
 delete mode 100644 crypto/michael_mic.c
 delete mode 100644 net/mac80211/michael.h

base-commit: dbd94b9831bc52a1efb7ff3de841ffc3457428ce

Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/6 wifi: mac80211: Export michael_mic()

Export the michael_mic() function so that it can be reused by the ath11k, ath12k, and ipw2x00 drivers. Currently they have their own local implementations of it based on crypto_shash, which is redundant and inefficient.

---
 include/linux/ieee80211.h |  5 +++++
 net/mac80211/michael.c    |  5 ++++-
 net/mac80211/michael.h    | 22 ----------------------
 net/mac80211/wpa.c        |  1 -
 4 files changed, 9 insertions(+), 24 deletions(-)
 delete mode 100644 net/mac80211/michael.h
include/linux/ieee80211.h +5 -0
index b5d649db123fe..da6fcdc742e7c 100644
@@ -1919,10 +1919,15 @@ enum ieee80211_radio_measurement_actioncode {
 #define FILS_ERP_MAX_RRK_LEN		64
 
 #define PMK_MAX_LEN			64
 #define SAE_PASSWORD_MAX_LEN		128
 
+#define MICHAEL_MIC_LEN			8
+
+void michael_mic(const u8 *key, struct ieee80211_hdr *hdr,
+		 const u8 *data, size_t data_len, u8 *mic);
+
 /* Public action codes (IEEE Std 802.11-2016, 9.6.8.1, Table 9-307) */
 enum ieee80211_pub_actioncode {
 	WLAN_PUB_ACTION_20_40_BSS_COEX = 0,
 	WLAN_PUB_ACTION_DSE_ENABLEMENT = 1,
 	WLAN_PUB_ACTION_DSE_DEENABLEMENT = 2,
net/mac80211/michael.c +4 -1
index 8a1afc93e7499..50cdb67f0503d 100644
@@ -6,11 +6,13 @@
 #include <linux/types.h>
 #include <linux/bitops.h>
 #include <linux/ieee80211.h>
 #include <linux/unaligned.h>
 
-#include "michael.h"
+struct michael_mic_ctx {
+	u32 l, r;
+};
 
 static void michael_block(struct michael_mic_ctx *mctx, u32 val)
 {
 	mctx->l ^= val;
 	mctx->r ^= rol32(mctx->l, 17);
@@ -79,5 +81,6 @@ void michael_mic(const u8 *key, struct ieee80211_hdr *hdr,
 	michael_block(&mctx, 0);
 
 	put_unaligned_le32(mctx.l, mic);
 	put_unaligned_le32(mctx.r, mic + 4);
 }
+EXPORT_SYMBOL_GPL(michael_mic);
net/mac80211/michael.h deleted +0 -22
deleted file mode 100644
index a7fdb8e84615a..0000000000000
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Michael MIC implementation - optimized for TKIP MIC operations
- * Copyright 2002-2003, Instant802 Networks, Inc.
- */
-
-#ifndef MICHAEL_H
-#define MICHAEL_H
-
-#include <linux/types.h>
-#include <linux/ieee80211.h>
-
-#define MICHAEL_MIC_LEN 8
-
-struct michael_mic_ctx {
-	u32 l, r;
-};
-
-void michael_mic(const u8 *key, struct ieee80211_hdr *hdr,
-		 const u8 *data, size_t data_len, u8 *mic);
-
-#endif /* MICHAEL_H */
net/mac80211/wpa.c +0 -1
index 64a57475ce506..724ec831a8857 100644
@@ -16,11 +16,10 @@
 #include <net/mac80211.h>
 #include <crypto/aes.h>
 #include <crypto/utils.h>
 
 #include "ieee80211_i.h"
-#include "michael.h"
 #include "tkip.h"
 #include "aes_ccm.h"
 #include "aes_cmac.h"
 #include "aes_gmac.h"
 #include "aes_gcm.h"
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/6 wifi: ath11k: Use michael_mic() from mac80211

In reply to Eric Biggers

Just use the michael_mic() function from mac80211 instead of a local implementation of it on top of the crypto_shash API.

Preserve the check for fips_enabled which was present implicitly in the crypto_shash-based code.

---
 drivers/net/wireless/ath/ath11k/Kconfig |  1 -
 drivers/net/wireless/ath/ath11k/dp.c    |  2 -
 drivers/net/wireless/ath/ath11k/dp_rx.c | 60 +++----------------------
 drivers/net/wireless/ath/ath11k/peer.h  |  1 -
 4 files changed, 7 insertions(+), 57 deletions(-)
drivers/net/wireless/ath/ath11k/Kconfig +0 -1
index 47dfd39caa89a..385513cfdc30e 100644
@@ -1,10 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause-Clear
 config ATH11K
 	tristate "Qualcomm Technologies 802.11ax chipset support"
 	depends on MAC80211 && HAS_DMA
-	select CRYPTO_MICHAEL_MIC
 	select ATH_COMMON
 	select QCOM_QMI_HELPERS
 	help
 	  This module adds support for Qualcomm Technologies 802.11ax family of
 	  chipsets.
drivers/net/wireless/ath/ath11k/dp.c +0 -2
index c940de285276d..bbb86f1651419 100644
@@ -3,11 +3,10 @@
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 
-#include <crypto/hash.h>
 #include <linux/export.h>
 #include "core.h"
 #include "dp_tx.h"
 #include "hal_tx.h"
 #include "hif.h"
@@ -37,11 +36,10 @@ void ath11k_dp_peer_cleanup(struct ath11k *ar, int vdev_id, const u8 *addr)
 		return;
 	}
 
 	ath11k_peer_rx_tid_cleanup(ar, peer);
 	peer->dp_setup_done = false;
-	crypto_free_shash(peer->tfm_mmic);
 	spin_unlock_bh(&ab->base_lock);
 }
 
 int ath11k_dp_peer_setup(struct ath11k *ar, int vdev_id, const u8 *addr)
 {
drivers/net/wireless/ath/ath11k/dp_rx.c +7 -53

129 lines not on this page · raw message

drivers/net/wireless/ath/ath11k/peer.h +0 -1
index 3ad2f3355b14f..f5ef1a27f8f25 100644
@@ -27,11 +27,10 @@ struct ath11k_peer {
 	struct rhash_head rhash_addr;
 
 	/* Info used in MMIC verification of
 	 * RX fragments
 	 */
-	struct crypto_shash *tfm_mmic;
 	u8 mcast_keyidx;
 	u8 ucast_keyidx;
 	u16 sec_type;
 	u16 sec_type_grp;
 	bool is_authorized;
Signature · 1 line
2.53.0
#3 lore raw

PATCH 3/6 wifi: ath12k: Use michael_mic() from mac80211

In reply to Eric Biggers

Just use the michael_mic() function from mac80211 instead of a local implementation of it on top of the crypto_shash API.

Preserve the check for fips_enabled which was present implicitly in the crypto_shash-based code.

---
 drivers/net/wireless/ath/ath12k/Kconfig       |  1 -
 drivers/net/wireless/ath/ath12k/dp.c          |  2 -
 drivers/net/wireless/ath/ath12k/dp_peer.h     |  1 -
 drivers/net/wireless/ath/ath12k/dp_rx.c       | 55 ++-----------------
 drivers/net/wireless/ath/ath12k/dp_rx.h       |  4 --
 drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c |  7 +--
 6 files changed, 8 insertions(+), 62 deletions(-)
drivers/net/wireless/ath/ath12k/Kconfig +0 -1
index 1ea1af1b8f6c5..d39c075758bda 100644
@@ -1,10 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause-Clear
 config ATH12K
 	tristate "Qualcomm Technologies Wi-Fi 7 support (ath12k)"
 	depends on MAC80211 && HAS_DMA && PCI
-	select CRYPTO_MICHAEL_MIC
 	select QCOM_QMI_HELPERS
 	select MHI_BUS
 	select QRTR
 	select QRTR_MHI
 	select PCI_PWRCTRL_PWRSEQ if HAVE_PWRCTRL
drivers/net/wireless/ath/ath12k/dp.c +0 -2
index 1c82d927d27b2..90802ed1aa59f 100644
@@ -2,11 +2,10 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
  * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 
-#include <crypto/hash.h>
 #include "core.h"
 #include "dp_tx.h"
 #include "hif.h"
 #include "hal.h"
 #include "debug.h"
@@ -39,11 +38,10 @@ void ath12k_dp_peer_cleanup(struct ath12k *ar, int vdev_id, const u8 *addr)
 		spin_unlock_bh(&dp->dp_lock);
 		return;
 	}
 
 	ath12k_dp_rx_peer_tid_cleanup(ar, peer);
-	crypto_free_shash(peer->dp_peer->tfm_mmic);
 	peer->dp_peer->dp_setup_done = false;
 	spin_unlock_bh(&dp->dp_lock);
 }
 
 int ath12k_dp_peer_setup(struct ath12k *ar, int vdev_id, const u8 *addr)
drivers/net/wireless/ath/ath12k/dp_peer.h +0 -1
index 20294ff095131..113b8040010fa 100644
@@ -137,11 +137,10 @@ struct ath12k_dp_peer {
 
 	u16 sec_type_grp;
 	u16 sec_type;
 
 	/* Info used in MMIC verification of * RX fragments */
-	struct crypto_shash *tfm_mmic;
 	struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1];
 	struct ath12k_dp_link_peer __rcu *link_peers[ATH12K_NUM_MAX_LINKS];
 	struct ath12k_reoq_buf reoq_bufs[IEEE80211_NUM_TIDS + 1];
 	struct ath12k_dp_rx_tid rx_tid[IEEE80211_NUM_TIDS + 1];
 };
drivers/net/wireless/ath/ath12k/dp_rx.c +5 -50

111 lines not on this page · raw message

drivers/net/wireless/ath/ath12k/dp_rx.h +0 -4
index bd62af0c80d46..55a31e669b3b0 100644
@@ -4,11 +4,10 @@
  * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
  */
 #ifndef ATH12K_DP_RX_H
 #define ATH12K_DP_RX_H
 
-#include <crypto/hash.h>
 #include "core.h"
 #include "debug.h"
 
 #define DP_MAX_NWIFI_HDR_LEN	30
 
@@ -202,13 +201,10 @@ u64 ath12k_dp_rx_h_get_pn(struct ath12k_dp *dp, struct sk_buff *skb);
 void ath12k_dp_rx_h_sort_frags(struct ath12k_hal *hal,
 			       struct sk_buff_head *frag_list,
 			       struct sk_buff *cur_frag);
 void ath12k_dp_rx_h_undecap_frag(struct ath12k_pdev_dp *dp_pdev, struct sk_buff *msdu,
 				 enum hal_encrypt_type enctype, u32 flags);
-int ath12k_dp_rx_h_michael_mic(struct crypto_shash *tfm, u8 *key,
-			       struct ieee80211_hdr *hdr, u8 *data,
-			       size_t data_len, u8 *mic);
 int ath12k_dp_rx_ampdu_start(struct ath12k *ar,
 			     struct ieee80211_ampdu_params *params,
 			     u8 link_id);
 int ath12k_dp_rx_ampdu_stop(struct ath12k *ar,
 			    struct ieee80211_ampdu_params *params,
drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c +3 -4
index e6a934d74e85d..945680b3ebdfc 100644
@@ -981,11 +981,11 @@ static int ath12k_wifi7_dp_rx_h_verify_tkip_mic(struct ath12k_pdev_dp *dp_pdev,
 	struct hal_rx_desc *rx_desc = (struct hal_rx_desc *)msdu->data;
 	struct ieee80211_rx_status *rxs = IEEE80211_SKB_RXCB(msdu);
 	struct ieee80211_key_conf *key_conf;
 	struct ieee80211_hdr *hdr;
 	u8 mic[IEEE80211_CCMP_MIC_LEN];
-	int head_len, tail_len, ret;
+	int head_len, tail_len;
 	size_t data_len;
 	u32 hdr_len, hal_rx_desc_sz = hal->hal_desc_sz;
 	u8 *key, *data;
 	u8 key_idx;
 
@@ -1009,13 +1009,12 @@ static int ath12k_wifi7_dp_rx_h_verify_tkip_mic(struct ath12k_pdev_dp *dp_pdev,
 
 	data = msdu->data + head_len;
 	data_len = msdu->len - head_len - tail_len;
 	key = &key_conf->key[NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY];
 
-	ret = ath12k_dp_rx_h_michael_mic(peer->tfm_mmic, key, hdr, data,
-					 data_len, mic);
-	if (ret || memcmp(mic, data + data_len, IEEE80211_CCMP_MIC_LEN))
+	michael_mic(key, hdr, data, data_len, mic);
+	if (memcmp(mic, data + data_len, IEEE80211_CCMP_MIC_LEN))
 		goto mic_fail;
 
 	return 0;
 
 mic_fail:
Signature · 1 line
2.53.0
#4 lore raw

PATCH 4/6 wifi: ipw2x00: Depend on MAC80211

In reply to Eric Biggers

While the ipw2100 and ipw2200 hardware is "Full MAC" in the sense that it handles management frames (like association and scanning), it doesn't implement various cryptographic protocols, such as the Michael MIC algorithm used in the (deprecated) TKIP.

Currently ipw2x00 accesses Michael MIC via the crypto_shash API. Yet, the mac80211 module already has its own Michael MIC implementation. ipw2x00 is the only code in the kernel tree that needs a Michael MIC implementation that doesn't already depend on CONFIG_MAC80211.

Just add the dependency on MAC80211 so that we'll be able to consolidate the Michael MIC code in mac80211 and remove it from crypto_shash.

Alternatives considered:

- Move michael_mic() from mac80211 to cfg80211. Probably not worth it just for ipw2x00.

- Move michael_mic() to its own independent module. Again, probably not worth it just for ipw2x00.

- Copy michael_mic() into ipw2x00. It seems better to avoid the duplicate copy.

---
 drivers/net/wireless/intel/ipw2x00/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/intel/ipw2x00/Kconfig +3 -3
index b92df91adb3a4..13d69f94c889a 100644
@@ -3,11 +3,11 @@
 # Intel Centrino wireless drivers
 #
 
 config IPW2100
 	tristate "Intel PRO/Wireless 2100 Network Connection"
-	depends on PCI && CFG80211
+	depends on PCI && MAC80211
 	select WIRELESS_EXT
 	select WEXT_PRIV
 	select FW_LOADER
 	select LIBIPW
 	help
@@ -62,11 +62,11 @@ config IPW2100_DEBUG
 	  If you are not trying to debug or develop the IPW2100 driver, you
 	  most likely want to say N here.
 
 config IPW2200
 	tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
-	depends on PCI && CFG80211
+	depends on PCI && MAC80211
 	select WIRELESS_EXT
 	select WEXT_PRIV
 	select FW_LOADER
 	select LIBIPW
 	help
@@ -149,11 +149,11 @@ config IPW2200_DEBUG
 
 	  If you are not sure, say N here.
 
 config LIBIPW
 	tristate
-	depends on PCI && CFG80211
+	depends on PCI && MAC80211
 	select WIRELESS_EXT
 	select CRYPTO
 	select CRYPTO_MICHAEL_MIC
 	select CRYPTO_LIB_ARC4
 	select CRC32
Signature · 1 line
2.53.0
#7 lore raw

PATCH 5/6 wifi: ipw2x00: Use michael_mic() from mac80211

In reply to Eric Biggers

Just use the michael_mic() function from mac80211 instead of a local implementation of it on top of the crypto_shash API.

---
 drivers/net/wireless/intel/ipw2x00/Kconfig    |   1 -
 .../intel/ipw2x00/libipw_crypto_tkip.c        | 120 +-----------------
 2 files changed, 5 insertions(+), 116 deletions(-)
drivers/net/wireless/intel/ipw2x00/Kconfig +0 -1
index 13d69f94c889a..20d1392e1d61c 100644
@@ -152,11 +152,10 @@ config IPW2200_DEBUG
 config LIBIPW
 	tristate
 	depends on PCI && MAC80211
 	select WIRELESS_EXT
 	select CRYPTO
-	select CRYPTO_MICHAEL_MIC
 	select CRYPTO_LIB_ARC4
 	select CRC32
 	help
 	This option enables the hardware independent IEEE 802.11
 	networking stack.  This component is deprecated in favor of the
drivers/net/wireless/intel/ipw2x00/libipw_crypto_tkip.c +5 -115

205 lines not on this page · raw message

Signature · 1 line
2.53.0
#8 lore raw

PATCH 6/6 crypto: Remove michael_mic from crypto_shash API

In reply to Eric Biggers

Remove the "michael_mic" crypto_shash algorithm, since it's no longer used. Its only users were wireless drivers, which have now been converted to use the michael_mic() function instead.

It makes sense that no other users ever appeared: Michael MIC is an insecure algorithm that is specific to WPA TKIP, which itself was an interim security solution to replace the broken WEP standard.

---
 arch/arm/configs/omap2plus_defconfig        |   1 -
 arch/arm/configs/spitz_defconfig            |   1 -
 arch/arm64/configs/defconfig                |   1 -
 arch/m68k/configs/amiga_defconfig           |   1 -
 arch/m68k/configs/apollo_defconfig          |   1 -
 arch/m68k/configs/atari_defconfig           |   1 -
 arch/m68k/configs/bvme6000_defconfig        |   1 -
 arch/m68k/configs/hp300_defconfig           |   1 -
 arch/m68k/configs/mac_defconfig             |   1 -
 arch/m68k/configs/multi_defconfig           |   1 -
 arch/m68k/configs/mvme147_defconfig         |   1 -
 arch/m68k/configs/mvme16x_defconfig         |   1 -
 arch/m68k/configs/q40_defconfig             |   1 -
 arch/m68k/configs/sun3_defconfig            |   1 -
 arch/m68k/configs/sun3x_defconfig           |   1 -
 arch/mips/configs/bigsur_defconfig          |   1 -
 arch/mips/configs/decstation_64_defconfig   |   1 -
 arch/mips/configs/decstation_defconfig      |   1 -
 arch/mips/configs/decstation_r4k_defconfig  |   1 -
 arch/mips/configs/gpr_defconfig             |   1 -
 arch/mips/configs/ip32_defconfig            |   1 -
 arch/mips/configs/lemote2f_defconfig        |   1 -
 arch/mips/configs/malta_qemu_32r6_defconfig |   1 -
 arch/mips/configs/maltaaprp_defconfig       |   1 -
 arch/mips/configs/maltasmvp_defconfig       |   1 -
 arch/mips/configs/maltasmvp_eva_defconfig   |   1 -
 arch/mips/configs/maltaup_defconfig         |   1 -
 arch/mips/configs/mtx1_defconfig            |   1 -
 arch/mips/configs/rm200_defconfig           |   1 -
 arch/mips/configs/sb1250_swarm_defconfig    |   1 -
 arch/parisc/configs/generic-32bit_defconfig |   1 -
 arch/parisc/configs/generic-64bit_defconfig |   1 -
 arch/powerpc/configs/g5_defconfig           |   1 -
 arch/powerpc/configs/linkstation_defconfig  |   1 -
 arch/powerpc/configs/mvme5100_defconfig     |   1 -
 arch/powerpc/configs/powernv_defconfig      |   1 -
 arch/powerpc/configs/ppc64_defconfig        |   1 -
 arch/powerpc/configs/ppc64e_defconfig       |   1 -
 arch/powerpc/configs/ppc6xx_defconfig       |   1 -
 arch/powerpc/configs/ps3_defconfig          |   1 -
 arch/s390/configs/debug_defconfig           |   1 -
 arch/s390/configs/defconfig                 |   1 -
 arch/sh/configs/sh2007_defconfig            |   1 -
 arch/sh/configs/titan_defconfig             |   1 -
 arch/sh/configs/ul2_defconfig               |   1 -
 arch/sparc/configs/sparc32_defconfig        |   1 -
 arch/sparc/configs/sparc64_defconfig        |   1 -
 crypto/Kconfig                              |  12 --
 crypto/Makefile                             |   1 -
 crypto/michael_mic.c                        | 176 --------------------
 crypto/tcrypt.c                             |   4 -
 crypto/testmgr.c                            |   6 -
 crypto/testmgr.h                            |  50 ------
 53 files changed, 296 deletions(-)
 delete mode 100644 crypto/michael_mic.c
arch/arm/configs/omap2plus_defconfig +0 -1
index 0464f6552169b..ae2883d3ff0ea 100644
@@ -702,11 +702,10 @@ CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_ROOT_NFS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_SECURITY=y
-CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_GHASH_ARM_CE=m
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_AES_ARM_BS=m
 CONFIG_CRYPTO_DEV_OMAP=m
 CONFIG_CRYPTO_DEV_OMAP_SHAM=m
arch/arm/configs/spitz_defconfig +0 -1
index c130af6d44d48..f116a01c3f5f1 100644
@@ -228,11 +228,10 @@ CONFIG_CRYPTO_KHAZAD=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TEA=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_FONTS=y
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
arch/arm64/configs/defconfig +0 -1
index b67d5b1fc45b0..a2a5884f0ac82 100644
@@ -1912,11 +1912,10 @@ CONFIG_NLS_ISO8859_1=y
 CONFIG_SECURITY=y
 CONFIG_CRYPTO_USER=y
 CONFIG_CRYPTO_CHACHA20=m
 CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_ECHAINIV=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA3=m
 CONFIG_CRYPTO_USER_API_RNG=m
 CONFIG_CRYPTO_GHASH_ARM64_CE=y
 CONFIG_CRYPTO_SM3_ARM64_CE=m
 CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
arch/m68k/configs/amiga_defconfig +0 -1
index 31d16cba9879f..c4230232634a3 100644
@@ -576,11 +576,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/apollo_defconfig +0 -1
index c0c419ec9a9e9..740edd4f3ca14 100644
@@ -533,11 +533,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/atari_defconfig +0 -1
index 2b7547ecc4c41..1773533ead702 100644
@@ -553,11 +553,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/bvme6000_defconfig +0 -1
index 0b63787cff0da..6aaf126a646ea 100644
@@ -525,11 +525,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/hp300_defconfig +0 -1
index 308836b60bba4..9a2076458de8f 100644
@@ -535,11 +535,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/mac_defconfig +0 -1
index 97e108c0d24f2..76bac1bedf1c6 100644
@@ -552,11 +552,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/multi_defconfig +0 -1
index 7e9f83af9af46..9d3b9b9d0c15e 100644
@@ -639,11 +639,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/mvme147_defconfig +0 -1
index 2fe33271d2494..e705aff2fa200 100644
@@ -525,11 +525,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/mvme16x_defconfig +0 -1
index 4308daaa7f74c..286f7c949fcb2 100644
@@ -526,11 +526,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/q40_defconfig +0 -1
index 36eb29ec54eeb..3cedc6a76bc9f 100644
@@ -542,11 +542,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/sun3_defconfig +0 -1
index 524a89fa69531..91c6060f42922 100644
@@ -523,11 +523,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/m68k/configs/sun3x_defconfig +0 -1
index f4fbc65c52d9a..8bb0ac877f652 100644
@@ -523,11 +523,10 @@ CONFIG_CRYPTO_HCTR2=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/mips/configs/bigsur_defconfig +0 -1
index 349e9e0b4f547..3b64e151e187f 100644
@@ -220,11 +220,10 @@ CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
arch/mips/configs/decstation_64_defconfig +0 -1
index dad98c5752928..7c43352fac6bd 100644
@@ -178,11 +178,10 @@ CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_CMAC=m
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_CRC32=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_ARC4=m
arch/mips/configs/decstation_defconfig +0 -1
index 4e1b51a4ad900..aee10274f0488 100644
@@ -173,11 +173,10 @@ CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_CMAC=m
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_CRC32=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_ARC4=m
arch/mips/configs/decstation_r4k_defconfig +0 -1
index 4e550dffc23df..a1698049aa7a7 100644
@@ -173,11 +173,10 @@ CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_CMAC=m
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_CRC32=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_ARC4=m
arch/mips/configs/gpr_defconfig +0 -1
index 437ef6dc0b4c2..fdd28a89e3369 100644
@@ -273,11 +273,10 @@ CONFIG_NLS_CODEPAGE_850=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_CRYPTO_AUTHENC=m
 CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST5=m
arch/mips/configs/ip32_defconfig +0 -1
index 7568838eb08b2..68558d0d3f52c 100644
@@ -157,11 +157,10 @@ CONFIG_CRYPTO_ECB=y
 CONFIG_CRYPTO_LRW=y
 CONFIG_CRYPTO_PCBC=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=y
 CONFIG_CRYPTO_MD4=y
-CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=y
 CONFIG_CRYPTO_WP512=y
 CONFIG_CRYPTO_ANUBIS=y
arch/mips/configs/lemote2f_defconfig +0 -1
index 8d3f20ed19b56..eb3565a3f292c 100644
@@ -306,11 +306,10 @@ CONFIG_CRYPTO_FCRYPT=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_DEFLATE=m
arch/mips/configs/malta_qemu_32r6_defconfig +0 -1
index accb471a1d93f..46a69e8984c5a 100644
@@ -165,11 +165,10 @@ CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
arch/mips/configs/maltaaprp_defconfig +0 -1
index 6bda67c5f68f8..74a0e5f6a8860 100644
@@ -166,11 +166,10 @@ CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
arch/mips/configs/maltasmvp_defconfig +0 -1
index e4082537f80fb..873bfc59623b8 100644
@@ -167,11 +167,10 @@ CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
arch/mips/configs/maltasmvp_eva_defconfig +0 -1
index 58f5af45fa983..c9230b2c4ea8d 100644
@@ -169,11 +169,10 @@ CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
arch/mips/configs/maltaup_defconfig +0 -1
index 9bfef7de0d1cf..79fd3ccab3393 100644
@@ -165,11 +165,10 @@ CONFIG_CIFS_XATTR=y
 CONFIG_CIFS_POSIX=y
 CONFIG_NLS_CODEPAGE_437=m
 CONFIG_NLS_ISO8859_1=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
arch/mips/configs/mtx1_defconfig +0 -1
index 77050ae3945fc..930c0178cc670 100644
@@ -661,11 +661,10 @@ CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
 CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST6=m
 CONFIG_CRYPTO_KHAZAD=m
arch/mips/configs/rm200_defconfig +0 -1
index b507dc4dddd48..b1e67ff0c4f08 100644
@@ -380,11 +380,10 @@ CONFIG_NLS_KOI8_U=m
 CONFIG_NLS_UTF8=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAMELLIA=m
 CONFIG_CRYPTO_CAST6=m
arch/mips/configs/sb1250_swarm_defconfig +0 -1
index ae2afff00e01a..4a25b8d3e5078 100644
@@ -83,11 +83,10 @@ CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAMELLIA=m
 CONFIG_CRYPTO_CAST5=m
arch/parisc/configs/generic-32bit_defconfig +0 -1
index 5444ce6405f3a..a2cb2a7a02db8 100644
@@ -257,11 +257,10 @@ CONFIG_CRYPTO_CAST6=m
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_FONTS=y
 CONFIG_PRINTK_TIME=y
arch/parisc/configs/generic-64bit_defconfig +0 -1
index ce91f9d1fdbfb..4dd6cf6a2cb9b 100644
@@ -285,11 +285,10 @@ CONFIG_NLS_UTF8=m
 CONFIG_CRYPTO_FCRYPT=m
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_HW is not set
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_STRIP_ASM_SYMS=y
arch/powerpc/configs/g5_defconfig +0 -1
index 428f17b455132..466f196ee8b29 100644
@@ -236,11 +236,10 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_MUTEXES=y
 CONFIG_BOOTX_TEXT=y
 CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST5=m
arch/powerpc/configs/linkstation_defconfig +0 -1
index b564f9e33a0df..31f84d08b6efe 100644
@@ -127,11 +127,10 @@ CONFIG_NLS_ISO8859_1=m
 CONFIG_NLS_UTF8=m
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
 CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_DEFLATE=m
arch/powerpc/configs/mvme5100_defconfig +0 -1
index fa2b3b9c59452..c82754c14e15e 100644
@@ -113,11 +113,10 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=20
 CONFIG_CRYPTO_CBC=y
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TWOFISH=m
arch/powerpc/configs/powernv_defconfig +0 -1
index 9ac746cfb4be3..675462b783200 100644
@@ -317,11 +317,10 @@ CONFIG_FTR_FIXUP_SELFTEST=y
 CONFIG_MSI_BITMAP_SELFTEST=y
 CONFIG_XMON=y
 CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST6=m
arch/powerpc/configs/ppc64_defconfig +0 -1
index 2b0720f2753bc..e3e1cad668d9a 100644
@@ -380,11 +380,10 @@ CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST6=m
 CONFIG_CRYPTO_SERPENT=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_LZO=m
 CONFIG_CRYPTO_AES_GCM_P10=m
 CONFIG_CRYPTO_DEV_NX=y
arch/powerpc/configs/ppc64e_defconfig +0 -1
index 90247b2a0ab0c..e877598fe3562 100644
@@ -223,11 +223,10 @@ CONFIG_XMON=y
 CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_CCM=m
 CONFIG_CRYPTO_GCM=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_CAST6=m
arch/powerpc/configs/ppc6xx_defconfig +0 -1
index 3c08f46f3d41f..27d4350e8fdbe 100644
@@ -1075,11 +1075,10 @@ CONFIG_CRYPTO_CTS=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_ANUBIS=m
arch/powerpc/configs/ps3_defconfig +0 -1
index 0b48d2b776c44..7cfae0b7b2f35 100644
@@ -144,11 +144,10 @@ CONFIG_ROOT_NFS=y
 CONFIG_CIFS=m
 CONFIG_NLS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_CRYPTO_PCBC=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_LZO=m
 CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_MEMORY_INIT=y
arch/s390/configs/debug_defconfig +0 -1
index 98fd0a2f51c6a..b74f96eec4658 100644
@@ -792,11 +792,10 @@ CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_GCM=y
 CONFIG_CRYPTO_SEQIV=y
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA3=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/s390/configs/defconfig +0 -1
index 0f4cedcab3cef..0c831481e43fd 100644
@@ -776,11 +776,10 @@ CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_AEGIS128=m
 CONFIG_CRYPTO_GCM=y
 CONFIG_CRYPTO_SEQIV=y
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
 CONFIG_CRYPTO_SHA3=m
 CONFIG_CRYPTO_SM3_GENERIC=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_XCBC=m
arch/sh/configs/sh2007_defconfig +0 -1
index e32d2ce72699f..5d90804994857 100644
@@ -168,11 +168,10 @@ CONFIG_CRYPTO_LRW=y
 CONFIG_CRYPTO_PCBC=y
 CONFIG_CRYPTO_XTS=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_XCBC=y
 CONFIG_CRYPTO_MD4=y
-CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=y
 CONFIG_CRYPTO_TGR192=y
 CONFIG_CRYPTO_WP512=y
arch/sh/configs/titan_defconfig +0 -1
index 896e980d04e14..00863ecb228e8 100644
@@ -244,11 +244,10 @@ CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_BUGVERBOSE is not set
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_ECB=y
 CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MICHAEL_MIC=y
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_TGR192=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_AES=y
arch/sh/configs/ul2_defconfig +0 -1
index 0d1c858754dbb..00a37944b043c 100644
@@ -77,6 +77,5 @@ CONFIG_ROOT_NFS=y
 CONFIG_NFSD=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_932=y
 CONFIG_NLS_ISO8859_1=y
 # CONFIG_ENABLE_MUST_CHECK is not set
-CONFIG_CRYPTO_MICHAEL_MIC=y
arch/sparc/configs/sparc32_defconfig +0 -1
index e021ecfb5a771..48d834acafb4a 100644
@@ -80,11 +80,10 @@ CONFIG_KGDB=y
 CONFIG_KGDB_TESTS=y
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_MD4=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_AES=m
 CONFIG_CRYPTO_ARC4=m
 CONFIG_CRYPTO_BLOWFISH=m
arch/sparc/configs/sparc64_defconfig +0 -1
index 9f3f41246ae6d..632081a262bae 100644
@@ -208,11 +208,10 @@ CONFIG_CRYPTO_BENCHMARK=m
 CONFIG_CRYPTO_LRW=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_XCBC=y
 CONFIG_CRYPTO_MD4=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_SHA256=m
 CONFIG_CRYPTO_SHA512=m
 CONFIG_CRYPTO_TGR192=m
 CONFIG_CRYPTO_WP512=m
 CONFIG_CRYPTO_AES=m
crypto/Kconfig +0 -12
index b4bb85e8e2261..769aef52a7851 100644
@@ -914,22 +914,10 @@ config CRYPTO_MD5
 	select CRYPTO_HASH
 	select CRYPTO_LIB_MD5
 	help
 	  MD5 message digest algorithm (RFC1321), including HMAC support.
 
-config CRYPTO_MICHAEL_MIC
-	tristate "Michael MIC"
-	select CRYPTO_HASH
-	help
-	  Michael MIC (Message Integrity Code) (IEEE 802.11i)
-
-	  Defined by the IEEE 802.11i TKIP (Temporal Key Integrity Protocol),
-	  known as WPA (Wif-Fi Protected Access).
-
-	  This algorithm is required for TKIP, but it should not be used for
-	  other purposes because of the weakness of the algorithm.
-
 config CRYPTO_RMD160
 	tristate "RIPEMD-160"
 	select CRYPTO_HASH
 	help
 	  RIPEMD-160 hash function (ISO/IEC 10118-3)
crypto/Makefile +0 -1
index 04e269117589a..aa35ba03222f7 100644
@@ -148,11 +148,10 @@ obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
 obj-$(CONFIG_CRYPTO_SEED) += seed.o
 obj-$(CONFIG_CRYPTO_ARIA) += aria_generic.o
 obj-$(CONFIG_CRYPTO_CHACHA20) += chacha.o
 CFLAGS_chacha.o += -DARCH=$(ARCH)
 obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
-obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
 obj-$(CONFIG_CRYPTO_CRC32C) += crc32c-cryptoapi.o
 crc32c-cryptoapi-y := crc32c.o
 obj-$(CONFIG_CRYPTO_CRC32) += crc32-cryptoapi.o
 crc32-cryptoapi-y := crc32.o
 obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
crypto/michael_mic.c deleted +0 -176

176 lines not on this page · raw message

crypto/tcrypt.c +0 -4
index aded375461374..24f0ccc767961 100644
@@ -1555,14 +1555,10 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
 
 	case 16:
 		ret = min(ret, tcrypt_test("ecb(arc4)"));
 		break;
 
-	case 17:
-		ret = min(ret, tcrypt_test("michael_mic"));
-		break;
-
 	case 18:
 		ret = min(ret, tcrypt_test("crc32c"));
 		break;
 
 	case 19:
crypto/testmgr.c +0 -6
index 4985411dedaec..d5c38683bf46f 100644
@@ -5195,16 +5195,10 @@ static const struct alg_test_desc alg_test_descs[] = {
 		.generic_driver = "md5-lib",
 		.test = alg_test_hash,
 		.suite = {
 			.hash = __VECS(md5_tv_template)
 		}
-	}, {
-		.alg = "michael_mic",
-		.test = alg_test_hash,
-		.suite = {
-			.hash = __VECS(michael_mic_tv_template)
-		}
 	}, {
 		.alg = "p1363(ecdsa-nist-p192)",
 		.test = alg_test_null,
 	}, {
 		.alg = "p1363(ecdsa-nist-p256)",
crypto/testmgr.h +0 -50

60 lines not on this page · raw message

Signature · 1 line
2.53.0
#5 lore raw

Re: [PATCH wireless-next 4/6] wifi: ipw2x00: Depend on MAC80211

In reply to Eric Biggers

On 4/4/2026 10:27 PM, Eric Biggers wrote:
...

drivers/net/wireless/intel/ipw2x00/Kconfig config IPW2200_DEBUG · line 157

Quoted 11 lines
drivers/net/wireless/intel/ipw2x00/Kconfig +1 -1
@@ -149,11 +149,11 @@ config IPW2200_DEBUG
 
 	  If you are not sure, say N here.
 
 config LIBIPW
 	tristate
-	depends on PCI && CFG80211
+	depends on PCI && MAC80211
 	select WIRELESS_EXT
 	select CRYPTO
 	select CRYPTO_MICHAEL_MIC

remove??

Quoted 2 lines
drivers/net/wireless/intel/ipw2x00/Kconfig +0 -0
 	select CRYPTO_LIB_ARC4
 	select CRC32
#10 lore raw
In reply to Eric Biggers
Quoted 99 lines · Eric Biggers

Michael MIC is an inherently weak algorithm that is specific to WPA TKIP, which itself was an interim security solution to replace the broken WEP standard.

Currently, the primary implementation of Michael MIC in the kernel is the one in the mac80211 module. But there's also a duplicate implementation in crypto/michael_mic.c which is exposed via the crypto_shash API. It's used only by a few wireless drivers.

Seeing as Michael MIC is specific to WPA TKIP and should never be used elsewhere, this series migrates those few drivers to the mac80211 implementation of Michael MIC, then removes the crypto implementation of Michael MIC. This consolidates duplicate code and prevents other kernel subsystems from accidentally using this insecure algorithm.

This series is targeting wireless-next.

Eric Biggers (6):
wifi: mac80211: Export michael_mic()
wifi: ath11k: Use michael_mic() from mac80211
wifi: ath12k: Use michael_mic() from mac80211
wifi: ipw2x00: Depend on MAC80211
wifi: ipw2x00: Use michael_mic() from mac80211
crypto: Remove michael_mic from crypto_shash API

 arch/arm/configs/omap2plus_defconfig          |   1 -
 arch/arm/configs/spitz_defconfig              |   1 -
 arch/arm64/configs/defconfig                  |   1 -
 arch/m68k/configs/amiga_defconfig             |   1 -
 arch/m68k/configs/apollo_defconfig            |   1 -
 arch/m68k/configs/atari_defconfig             |   1 -
 arch/m68k/configs/bvme6000_defconfig          |   1 -
 arch/m68k/configs/hp300_defconfig             |   1 -
 arch/m68k/configs/mac_defconfig               |   1 -
 arch/m68k/configs/multi_defconfig             |   1 -
 arch/m68k/configs/mvme147_defconfig           |   1 -
 arch/m68k/configs/mvme16x_defconfig           |   1 -
 arch/m68k/configs/q40_defconfig               |   1 -
 arch/m68k/configs/sun3_defconfig              |   1 -
 arch/m68k/configs/sun3x_defconfig             |   1 -
 arch/mips/configs/bigsur_defconfig            |   1 -
 arch/mips/configs/decstation_64_defconfig     |   1 -
 arch/mips/configs/decstation_defconfig        |   1 -
 arch/mips/configs/decstation_r4k_defconfig    |   1 -
 arch/mips/configs/gpr_defconfig               |   1 -
 arch/mips/configs/ip32_defconfig              |   1 -
 arch/mips/configs/lemote2f_defconfig          |   1 -
 arch/mips/configs/malta_qemu_32r6_defconfig   |   1 -
 arch/mips/configs/maltaaprp_defconfig         |   1 -
 arch/mips/configs/maltasmvp_defconfig         |   1 -
 arch/mips/configs/maltasmvp_eva_defconfig     |   1 -
 arch/mips/configs/maltaup_defconfig           |   1 -
 arch/mips/configs/mtx1_defconfig              |   1 -
 arch/mips/configs/rm200_defconfig             |   1 -
 arch/mips/configs/sb1250_swarm_defconfig      |   1 -
 arch/parisc/configs/generic-32bit_defconfig   |   1 -
 arch/parisc/configs/generic-64bit_defconfig   |   1 -
 arch/powerpc/configs/g5_defconfig             |   1 -
 arch/powerpc/configs/linkstation_defconfig    |   1 -
 arch/powerpc/configs/mvme5100_defconfig       |   1 -
 arch/powerpc/configs/powernv_defconfig        |   1 -
 arch/powerpc/configs/ppc64_defconfig          |   1 -
 arch/powerpc/configs/ppc64e_defconfig         |   1 -
 arch/powerpc/configs/ppc6xx_defconfig         |   1 -
 arch/powerpc/configs/ps3_defconfig            |   1 -
 arch/s390/configs/debug_defconfig             |   1 -
 arch/s390/configs/defconfig                   |   1 -
 arch/sh/configs/sh2007_defconfig              |   1 -
 arch/sh/configs/titan_defconfig               |   1 -
 arch/sh/configs/ul2_defconfig                 |   1 -
 arch/sparc/configs/sparc32_defconfig          |   1 -
 arch/sparc/configs/sparc64_defconfig          |   1 -
 crypto/Kconfig                                |  12 --
 crypto/Makefile                               |   1 -
 crypto/michael_mic.c                          | 176 ------------------
 crypto/tcrypt.c                               |   4 -
 crypto/testmgr.c                              |   6 -
 crypto/testmgr.h                              |  50 -----
 drivers/net/wireless/ath/ath11k/Kconfig       |   1 -
 drivers/net/wireless/ath/ath11k/dp.c          |   2 -
 drivers/net/wireless/ath/ath11k/dp_rx.c       |  60 +-----
 drivers/net/wireless/ath/ath11k/peer.h        |   1 -
 drivers/net/wireless/ath/ath12k/Kconfig       |   1 -
 drivers/net/wireless/ath/ath12k/dp.c          |   2 -
 drivers/net/wireless/ath/ath12k/dp_peer.h     |   1 -
 drivers/net/wireless/ath/ath12k/dp_rx.c       |  55 +-----
 drivers/net/wireless/ath/ath12k/dp_rx.h       |   4 -
 drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c |   7 +-
 drivers/net/wireless/intel/ipw2x00/Kconfig    |   7 +-
 .../intel/ipw2x00/libipw_crypto_tkip.c        | 120 +-----------
 include/linux/ieee80211.h                     |   5 +
 net/mac80211/michael.c                        |   5 +-
 net/mac80211/michael.h                        |  22 ---
 net/mac80211/wpa.c                            |   1 -
 69 files changed, 32 insertions(+), 558 deletions(-)
 delete mode 100644 crypto/michael_mic.c
 delete mode 100644 net/mac80211/michael.h
Quoted 1 line

base-commit: dbd94b9831bc52a1efb7ff3de841ffc3457428ce

Note this series does not bisect cleanly since the introduction of the export in 1/6 causes build failures:

../drivers/net/wireless/intel/ipw2x00/libipw_crypto_tkip.c:467:12: error: conflicting types for 'michael_mic'; have 'int(struct crypto_shash *, u8 *, u8 *, u8 *, size_t, u8 *)' {aka 'int(struct crypto_shash *, unsigned char *, unsigned char *, unsigned char *, long unsigned int, unsigned char *)'}
467 | static int michael_mic(struct crypto_shash *tfm_michael, u8 *key, u8 *hdr,

      |            ^~~~~~~~~~~
In file included from ../drivers/net/wireless/intel/ipw2x00/libipw_crypto_tkip.c:25:
../include/linux/ieee80211.h:1926:6: note: previous declaration of 'michael_mic' with type 'void(const u8 *, struct ieee80211_hdr *, const u8 *, size_t,  u8 *)' {aka 'void(const unsigned char *, struct ieee80211_hdr *, const unsigned char *, long unsigned int,  unsigned char *)'}
 1926 | void michael_mic(const u8 *key, struct ieee80211_hdr *hdr,
      |      ^~~~~~~~~~~
#11 lore raw
Quoted 105 lines · Jeff Johnson
Quoted 99 lines · Eric Biggers

Michael MIC is an inherently weak algorithm that is specific to WPA TKIP, which itself was an interim security solution to replace the broken WEP standard.

Currently, the primary implementation of Michael MIC in the kernel is the one in the mac80211 module. But there's also a duplicate implementation in crypto/michael_mic.c which is exposed via the crypto_shash API. It's used only by a few wireless drivers.

Seeing as Michael MIC is specific to WPA TKIP and should never be used elsewhere, this series migrates those few drivers to the mac80211 implementation of Michael MIC, then removes the crypto implementation of Michael MIC. This consolidates duplicate code and prevents other kernel subsystems from accidentally using this insecure algorithm.

This series is targeting wireless-next.

Eric Biggers (6):
wifi: mac80211: Export michael_mic()
wifi: ath11k: Use michael_mic() from mac80211
wifi: ath12k: Use michael_mic() from mac80211
wifi: ipw2x00: Depend on MAC80211
wifi: ipw2x00: Use michael_mic() from mac80211
crypto: Remove michael_mic from crypto_shash API

 arch/arm/configs/omap2plus_defconfig          |   1 -
 arch/arm/configs/spitz_defconfig              |   1 -
 arch/arm64/configs/defconfig                  |   1 -
 arch/m68k/configs/amiga_defconfig             |   1 -
 arch/m68k/configs/apollo_defconfig            |   1 -
 arch/m68k/configs/atari_defconfig             |   1 -
 arch/m68k/configs/bvme6000_defconfig          |   1 -
 arch/m68k/configs/hp300_defconfig             |   1 -
 arch/m68k/configs/mac_defconfig               |   1 -
 arch/m68k/configs/multi_defconfig             |   1 -
 arch/m68k/configs/mvme147_defconfig           |   1 -
 arch/m68k/configs/mvme16x_defconfig           |   1 -
 arch/m68k/configs/q40_defconfig               |   1 -
 arch/m68k/configs/sun3_defconfig              |   1 -
 arch/m68k/configs/sun3x_defconfig             |   1 -
 arch/mips/configs/bigsur_defconfig            |   1 -
 arch/mips/configs/decstation_64_defconfig     |   1 -
 arch/mips/configs/decstation_defconfig        |   1 -
 arch/mips/configs/decstation_r4k_defconfig    |   1 -
 arch/mips/configs/gpr_defconfig               |   1 -
 arch/mips/configs/ip32_defconfig              |   1 -
 arch/mips/configs/lemote2f_defconfig          |   1 -
 arch/mips/configs/malta_qemu_32r6_defconfig   |   1 -
 arch/mips/configs/maltaaprp_defconfig         |   1 -
 arch/mips/configs/maltasmvp_defconfig         |   1 -
 arch/mips/configs/maltasmvp_eva_defconfig     |   1 -
 arch/mips/configs/maltaup_defconfig           |   1 -
 arch/mips/configs/mtx1_defconfig              |   1 -
 arch/mips/configs/rm200_defconfig             |   1 -
 arch/mips/configs/sb1250_swarm_defconfig      |   1 -
 arch/parisc/configs/generic-32bit_defconfig   |   1 -
 arch/parisc/configs/generic-64bit_defconfig   |   1 -
 arch/powerpc/configs/g5_defconfig             |   1 -
 arch/powerpc/configs/linkstation_defconfig    |   1 -
 arch/powerpc/configs/mvme5100_defconfig       |   1 -
 arch/powerpc/configs/powernv_defconfig        |   1 -
 arch/powerpc/configs/ppc64_defconfig          |   1 -
 arch/powerpc/configs/ppc64e_defconfig         |   1 -
 arch/powerpc/configs/ppc6xx_defconfig         |   1 -
 arch/powerpc/configs/ps3_defconfig            |   1 -
 arch/s390/configs/debug_defconfig             |   1 -
 arch/s390/configs/defconfig                   |   1 -
 arch/sh/configs/sh2007_defconfig              |   1 -
 arch/sh/configs/titan_defconfig               |   1 -
 arch/sh/configs/ul2_defconfig                 |   1 -
 arch/sparc/configs/sparc32_defconfig          |   1 -
 arch/sparc/configs/sparc64_defconfig          |   1 -
 crypto/Kconfig                                |  12 --
 crypto/Makefile                               |   1 -
 crypto/michael_mic.c                          | 176 ------------------
 crypto/tcrypt.c                               |   4 -
 crypto/testmgr.c                              |   6 -
 crypto/testmgr.h                              |  50 -----
 drivers/net/wireless/ath/ath11k/Kconfig       |   1 -
 drivers/net/wireless/ath/ath11k/dp.c          |   2 -
 drivers/net/wireless/ath/ath11k/dp_rx.c       |  60 +-----
 drivers/net/wireless/ath/ath11k/peer.h        |   1 -
 drivers/net/wireless/ath/ath12k/Kconfig       |   1 -
 drivers/net/wireless/ath/ath12k/dp.c          |   2 -
 drivers/net/wireless/ath/ath12k/dp_peer.h     |   1 -
 drivers/net/wireless/ath/ath12k/dp_rx.c       |  55 +-----
 drivers/net/wireless/ath/ath12k/dp_rx.h       |   4 -
 drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c |   7 +-
 drivers/net/wireless/intel/ipw2x00/Kconfig    |   7 +-
 .../intel/ipw2x00/libipw_crypto_tkip.c        | 120 +-----------
 include/linux/ieee80211.h                     |   5 +
 net/mac80211/michael.c                        |   5 +-
 net/mac80211/michael.h                        |  22 ---
 net/mac80211/wpa.c                            |   1 -
 69 files changed, 32 insertions(+), 558 deletions(-)
 delete mode 100644 crypto/michael_mic.c
 delete mode 100644 net/mac80211/michael.h
Quoted 1 line

base-commit: dbd94b9831bc52a1efb7ff3de841ffc3457428ce

Note this series does not bisect cleanly since the introduction of the export in 1/6 causes build failures:

Quoted 6 lines

../drivers/net/wireless/intel/ipw2x00/libipw_crypto_tkip.c:467:12: error: conflicting types for 'michael_mic'; have 'int(struct crypto_shash *, u8 *, u8 *, u8 *, size_t, u8 *)' {aka 'int(struct crypto_shash *, unsigned char *, unsigned char *, unsigned char *, long unsigned int, unsigned char *)'}
467 | static int michael_mic(struct crypto_shash *tfm_michael, u8 *key, u8 *hdr,

      |            ^~~~~~~~~~~

In file included from ../drivers/net/wireless/intel/ipw2x00/libipw_crypto_tkip.c:25:
../include/linux/ieee80211.h:1926:6: note: previous declaration of 'michael_mic' with type 'void(const u8 *, struct ieee80211_hdr *, const u8 *, size_t, u8 *)' {aka 'void(const unsigned char *, struct ieee80211_hdr *, const unsigned char *, long unsigned int, unsigned char *)'}
1926 | void michael_mic(const u8 *key, struct ieee80211_hdr *hdr,

Thanks! I'll add a preparatory patch that temporarily renames the michael_mic() in libipw_crypto_tkip.c.

- Eric

#6 lore raw

Re: [PATCH wireless-next 4/6] wifi: ipw2x00: Depend on MAC80211

In reply to Jeff Johnson
Quoted 6 lines · Jeff Johnson

On 4/4/2026 10:27 PM, Eric Biggers wrote:
...

Quoted 4 lines
drivers/net/wireless/intel/ipw2x00/Kconfig +0 -0
@@ -149,11 +149,11 @@ config IPW2200_DEBUG
 
 	  If you are not sure, say N here.
 
Quoted 9 lines

drivers/net/wireless/intel/ipw2x00/Kconfig config IPW2200_DEBUG · line 157

Quoted 7 lines
drivers/net/wireless/intel/ipw2x00/Kconfig +1 -1
 config LIBIPW
 	tristate
-	depends on PCI && CFG80211
+	depends on PCI && MAC80211
 	select WIRELESS_EXT
 	select CRYPTO
 	select CRYPTO_MICHAEL_MIC

remove??

If you're asking for 'select CRYPTO_MICHAEL_MIC' to be removed, that's done in patch 5.

If you're asking for the "depends on" clause to be removed from LIBIPW (but not IPW2100 and IPW2200), sure we can do that as part of this patch if you want, since it's not actually necessary in LIBIPW.

- Eric

#13 lore raw
In reply to Johannes Berg
Quoted 10 lines · Johannes Berg

The one thing that feels odd to me in this is moving it to *mac80211* specifically, and then using that in the ancient drivers. Not only is that a big module those don't (otherwise) need, but also it makes it look like you need the softmac stack for those drivers, but they're really hardmac so that's a bit confusing.

I wouldn't want to have a separate module just for this, but I think since it's going to be exported anyway, we could move the whole michael.c file to net/wireless/ and make it part of cfg80211. All wireless drivers ought to depend on that anyway.

Just to clarify, mac80211 already contains the michael_mic() function. And every driver that needs Michael MIC already depends on mac80211 except for ipw2x00. So bloat-wise I assumed it's probably better to make that one driver depend on mac80211, rather than make every driver pull in the Michael MIC code (by moving it from mac80211 to cfg80211). But if you prefer that the code be in cfg80211 we can do it that way.

- Eric

maintainer
#14 lore raw
Quoted 7 lines · Eric Biggers
Quoted 6 lines · Johannes Berg

The one thing that feels odd to me in this is moving it to *mac80211* specifically, and then using that in the ancient drivers. Not only is that a big module those don't (otherwise) need, but also it makes it look like you need the softmac stack for those drivers, but they're really hardmac so that's a bit confusing.

Quoted 6 lines
Quoted 4 lines

I wouldn't want to have a separate module just for this, but I think since it's going to be exported anyway, we could move the whole michael.c file to net/wireless/ and make it part of cfg80211. All wireless drivers ought to depend on that anyway.

Just to clarify, mac80211 already contains the michael_mic() function.

Yes, for the SW crypto there, which apparently was never ported to the crypto functions.

Quoted 2 lines

And every driver that needs Michael MIC already depends on mac80211 except for ipw2x00.

I'm actually surprised it's any of those (actually) mac80211 based drivers at all, since they ought to just be able to hand the skb to mac80211 for checking. Not sure what's going on there, but I haven't looked carefully either.

Quoted 4 lines

So bloat-wise I assumed it's probably better to
make that one driver depend on mac80211, rather than make every driver pull in the Michael MIC code (by moving it from mac80211 to cfg80211). But if you prefer that the code be in cfg80211 we can do it that way.

I think you're probably right, but it's a pretty small function and architecturally, having those drivers depend on mac80211 but not actually use any of its "real" functionality is IMHO somewhat confusing, maybe especially from a Kconfig POV.

Also most drivers already use mac80211 so for those it makes no difference, but of course there are a number of non-mac80211 drivers that would get this function.

So I think overall, it still makes more sense in cfg80211 - we've been treating that as not just nl80211 but also "useful things for drivers" (for obvious reasons, every WiFi driver must use it), so that'd be the better place I think.

johannes

#15 lore raw
In reply to Eric Biggers
Quoted 6 lines · Eric Biggers

Just to clarify, mac80211 already contains the michael_mic() function. And every driver that needs Michael MIC already depends on mac80211 except for ipw2x00. So bloat-wise I assumed it's probably better to make that one driver depend on mac80211, rather than make every driver pull in the Michael MIC code (by moving it from mac80211 to cfg80211). But if you prefer that the code be in cfg80211 we can do it that way.

To me the most sensible thing would be to have a separate module for the code. If you don't want to expose it too widely for understandable reasons, keep the module in net/wireless/.

maintainer
#12 lore raw
In reply to Eric Biggers

Hi,

Quoted 3 lines · Eric Biggers

Michael MIC is an inherently weak algorithm that is specific to WPA TKIP, which itself was an interim security solution to replace the broken WEP standard.

Heh, yeah, we keep thinking about whether or not we can remove either of them completely, but ... backward compatibility is messy.

Quoted 5 lines

Seeing as Michael MIC is specific to WPA TKIP and should never be used elsewhere, this series migrates those few drivers to the mac80211 implementation of Michael MIC, then removes the crypto implementation of Michael MIC. This consolidates duplicate code and prevents other kernel subsystems from accidentally using this insecure algorithm.

Makes sense, mostly.

The one thing that feels odd to me in this is moving it to *mac80211* specifically, and then using that in the ancient drivers. Not only is that a big module those don't (otherwise) need, but also it makes it look like you need the softmac stack for those drivers, but they're really hardmac so that's a bit confusing.

I wouldn't want to have a separate module just for this, but I think since it's going to be exported anyway, we could move the whole michael.c file to net/wireless/ and make it part of cfg80211. All wireless drivers ought to depend on that anyway.

johannes

maintainer
#16 lore raw
In reply to Christoph Hellwig
Quoted 8 lines · Christoph Hellwig
Quoted 6 lines · Eric Biggers

Just to clarify, mac80211 already contains the michael_mic() function. And every driver that needs Michael MIC already depends on mac80211 except for ipw2x00. So bloat-wise I assumed it's probably better to make that one driver depend on mac80211, rather than make every driver pull in the Michael MIC code (by moving it from mac80211 to cfg80211). But if you prefer that the code be in cfg80211 we can do it that way.

Quoted 4 lines

To me the most sensible thing would be to have a separate module for the code. If you don't want to expose it too widely for understandable reasons, keep the module in net/wireless/.

Maybe, but that'd probably be more overhead than anything else? The text+data is 725 bytes (on x86-64).

johannes

#17 lore raw
Quoted 9 lines · Johannes Berg
Quoted 8 lines · Christoph Hellwig
Quoted 6 lines · Eric Biggers

Just to clarify, mac80211 already contains the michael_mic() function. And every driver that needs Michael MIC already depends on mac80211 except for ipw2x00. So bloat-wise I assumed it's probably better to make that one driver depend on mac80211, rather than make every driver pull in the Michael MIC code (by moving it from mac80211 to cfg80211). But if you prefer that the code be in cfg80211 we can do it that way.

Quoted 6 lines
Quoted 4 lines

To me the most sensible thing would be to have a separate module for the code. If you don't want to expose it too widely for understandable reasons, keep the module in net/wireless/.

Maybe, but that'd probably be more overhead than anything else? The text+data is 725 bytes (on x86-64).

Yeah. Just thinking out loud, if the wireless maintainers are fine with the cگg80211 version that's probably fine.

maintainer Acked-by on v1 6/6
#9 lore raw

Re: [PATCH wireless-next 6/6] crypto: Remove michael_mic from crypto_shash API

In reply to Eric Biggers
Quoted 10 lines · Eric Biggers

Remove the "michael_mic" crypto_shash algorithm, since it's no longer used. Its only users were wireless drivers, which have now been converted to use the michael_mic() function instead.

It makes sense that no other users ever appeared: Michael MIC is an insecure algorithm that is specific to WPA TKIP, which itself was an interim security solution to replace the broken WEP standard.

Quoted 12 lines
 arch/m68k/configs/amiga_defconfig           |   1 -
 arch/m68k/configs/apollo_defconfig          |   1 -
 arch/m68k/configs/atari_defconfig           |   1 -
 arch/m68k/configs/bvme6000_defconfig        |   1 -
 arch/m68k/configs/hp300_defconfig           |   1 -
 arch/m68k/configs/mac_defconfig             |   1 -
 arch/m68k/configs/multi_defconfig           |   1 -
 arch/m68k/configs/mvme147_defconfig         |   1 -
 arch/m68k/configs/mvme16x_defconfig         |   1 -
 arch/m68k/configs/q40_defconfig             |   1 -
 arch/m68k/configs/sun3_defconfig            |   1 -
 arch/m68k/configs/sun3x_defconfig           |   1 -

(although these would be removed during next defconfig refresh anyway)

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds