rsn

package
v0.548.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package rsn decodes the IEEE 802.11 RSN (Robust Security Network) Information Element — the WPA2/WPA3 element in beacons, probe responses and association requests — into named cipher and AKM suites, the management-frame-protection (PMF) state, and a derived security posture.

Wrap-vs-native judgement

Native. The RSNE layout and the 00-0F-AC suite-number assignments are a public IEEE standard (802.11-2020 §9.4.2.24, Tables 9-151/9-152), implemented identically by hostapd, wpa_supplicant, aircrack-ng and Wireshark. Decoding is a short walker over a byte slice plus two static number→name tables; no crypto, no hardware, no SDR. The existing internal/ieee80211 decoder surfaces the raw suite OUIs ("000FAC-04") but, by its own note, leaves suite naming + the RSN-capabilities (PMF) bits to a follow-on Spec — this is that Spec: it turns the raw RSNE into the security-posture readout an operator triages an AP by (WPA2-Personal vs WPA3-SAE vs WPA3 transition vs Enterprise vs Enhanced-Open/OWE, and whether PMF is required — which decides deauth / KRACK / downgrade exposure).

No confidently-wrong output

Only suite numbers under the standard 00-0F-AC OUI are named; a vendor-OUI suite or an unassigned number is surfaced as its raw "OUI-type" form, never guessed. Optional trailing fields (RSN capabilities, PMKID list, group-management cipher) are parsed only when the bytes are present; a truncated element yields the fields parsed so far plus a note.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RSN

type RSN struct {
	Version         int      `json:"version"`
	GroupCipher     Suite    `json:"group_cipher"`
	PairwiseCiphers []Suite  `json:"pairwise_ciphers"`
	AKMSuites       []Suite  `json:"akm_suites"`
	HasCapabilities bool     `json:"has_capabilities"`
	CapabilitiesHex string   `json:"capabilities_hex,omitempty"`
	PMFCapable      bool     `json:"pmf_capable"`
	PMFRequired     bool     `json:"pmf_required"`
	PreAuth         bool     `json:"preauth"`
	PMKIDCount      int      `json:"pmkid_count,omitempty"`
	GroupMgmtCipher *Suite   `json:"group_mgmt_cipher,omitempty"`
	Security        string   `json:"security"` // derived posture
	Notes           []string `json:"notes,omitempty"`
}

RSN is the decoded view of an RSN Information Element.

func Decode

func Decode(hexStr string) (*RSN, error)

Decode parses a hex-encoded RSN element. The input may be the bare RSNE body (starting at the 2-byte version) or the full Information Element (element ID 0x30 + length + body); the IE header is stripped.

func DecodeBytes

func DecodeBytes(b []byte) (*RSN, error)

DecodeBytes parses a bare RSNE body.

type Suite

type Suite struct {
	OUI  string `json:"oui"`  // "00-0F-AC" for standard suites
	Type int    `json:"type"` // suite number
	Name string `json:"name"` // canonical name, or "OUI-type" raw form when not standard
}

Suite is one cipher or AKM suite selector.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL