KEY HANDLING BASICS(9)
β¨ Key handling basics β¨
okay so this is the Key handling basics page from the Kernel API Manual, section 9, and itβs lowkey all about how mac80211 deals with keys. bestie, letβs get into it π
Key handling in mac80211 happens based on per-interface (sub_if_data) keys and per-station keys. And since each station belongs to an interface, each station key also belongs to that interface. itβs giving very organized little key family tree πΈ
Hardware acceleration is done on a best-effort basis for algorithms that are implemented in software. For each key, the hardware is asked to enable that key for offloading, but if it cannot do that, the key is simply kept for software encryption β unless it is for an algorithm that isnβt implemented in software. There is currently no way of knowing whether a key is handled in SW or HW except by looking into debugfs. so yeah, no vibe check for key offload status, u just gotta peek π
All key management is internally protected by a mutex. Within all other parts of mac80211, key references are, just as STA structure references, protected by RCU. Note, however, that some things are unprotected β namely the key->sta dereferences within the hardware acceleration functions. This means that sta_info_destroy must remove the key, which waits for an RCU grace period. periodt, that part is important π₯
πΈ SEE ALSO πΈ
- Kernel file
./net/mac80211/key.c
This page lives under ./net/mac80211, itβs dated October 2026, and the manual is Key handling basics(9). mwah, go read the key code bestie π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms