LDN services: Difference between revisions
→Beacon: 802.11-ify some of the language ("tag" -> "information element") |
→Beacon: Fully document the Nintendo IEs. Note: the Action frame is the same, except its encrypted section has app-provided data rather than TLVs -- if anyone wants to edit that in. :) |
||
Line 1,562: | Line 1,562: | ||
Note that during group creation the beacon may be missing the Nintendo IEs in some cases, since group creation didn't finish yet. | Note that during group creation the beacon may be missing the Nintendo IEs in some cases, since group creation didn't finish yet. | ||
The first Nintendo IE (ID 0x0600) contains the following | ==== Nintendo IE 0 ==== | ||
The first Nintendo IE (ID 0x0600) contains the following fixed parameters: | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,570: | Line 1,572: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 || 0x2 || | | 0x0 || 0x1 || Fixed 0x20; perhaps a version or other magic number. | ||
|- | |||
| 0x1 || 0x1 || [[#GroupInfo|SecurityType]] | |||
|- | |||
| 0x2 || 0x1 || [[#GroupInfo|StaticAesKeyIndex]] | |||
|- | |||
| 0x3 || 0x1 || Fixed zero; padding byte. | |||
|- | |- | ||
| | | 0x4 || 0x8 || Big-endian (i.e. byte-reversed) version of [[#GroupInfo|LocalCommunicationId]]. This is the only context where LocalCommunicationId is reversed. | ||
|- | |- | ||
| | | 0xC || 0x10 || Wrapped master key. Same as [[#GroupInfo]]+0x0. | ||
|- | |- | ||
| | | 0x1C || 0x4 || If encryption is enabled, a randomly-generated nonce, else nothing. Appending 8 zero bytes to this yields the AES-GCM IV. | ||
|- | |- | ||
| | | 0x20 || 0x10 || If encryption is enabled, the AES-GCM MAC tag, else nothing. All bytes prior to this (fixed 0x20 through nonce) are the additional authenticated data. All bytes after this are encrypted with key B. | ||
|} | |} | ||
After this, TLV tagged parameters occur. Each TLV tag is formatted as: | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,589: | Line 1,597: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 || 0x1 || | | 0x0 || 0x1 || Tag type | ||
|- | |||
| 0x1 || 0x1 || Length | |||
|- | |||
| 0x2 || {above size} || Data for the tag | |||
|} | |||
Known TLV tags: | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| 0x1 || | ! Type | ||
! Size | |||
! Description | |||
|- | |||
| 0x1 || 0x2 || Additional network parameters: 0xAB 0xCD. A=[[#GroupInfo]]+0x82, B=[[#GroupInfo|MemberCountMax]], C=[[#GroupInfo|NetworkMode]], D=[[#GroupInfo|PerformanceRequirement]]. | |||
|- | |||
| 0x2 || 0x8 || Flags: Bitwise-or of (1<<f) for each entry in [[#GroupInfo]]+0x40 | |||
|} | |||
==== Nintendo IE 1 ==== | |||
The second Nintendo IE (ID 0x0601) contains only TLVs. If encryption is enabled, a 0x4-byte nonce and 0x10-byte AES-GCM tag are written first, as above, and the TLVs are encrypted. Key C is used. | |||
Known TLV tags: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Type | |||
! Size | |||
! Description | |||
|- | |- | ||
| | | 0x21 || Varies || AdvertiseData | ||
|} | |} | ||