#embedded/wifi/key_data
Xu 0.13.1 API
import: #embedded/wifi/key_data
counts: 2 functions, 0 methods, 1 types, 0 constants, 0 method sets
RFC 3394 AES-128 unwrap for WPA2 descriptor-version 2 key data. Empty means malformed ciphertext, a failed AES block or integrity mismatch. This does not install keys. The AES implementation is variable-time.
unwrap
pub fn unwrap(kek &string, cipher &string) string
Purpose
RFC 3394 AES-128 unwrap for WPA2 descriptor-version 2 key data. Empty means malformed ciphertext, a failed AES block or integrity mismatch. This does not install keys. The AES implementation is variable-time.
Parameters
kek &string- kek (read-only borrow; caller keeps the original; type &string)
cipher &string- cipher (read-only borrow; caller keeps the original; type &string)
Returns
string — result string
struct GroupKey
pub struct GroupKey {
pub valid bool
pub index int
pub key string
}
Purpose
Structure encapsulating valid, index, key.
Public fields
valid bool- field (bool)
index int- field (int)
key string- key
parse
pub fn parse(plain &string, ap_rsn &string) GroupKey
Purpose
Parse only the deliberately narrow PSK/CCMP profile. Require the complete AP RSN IE captured before association, and exactly one CCMP GTK KDE. The caller retains the independently verified RSC for replay protection. Unknown IEs and incomplete padding fail closed instead of installing keys.
Parameters
plain &string- plain (read-only borrow; caller keeps the original; type &string)
ap_rsn &string- ap_rsn (read-only borrow; caller keeps the original; type &string)
Returns
GroupKey — a value of this type