LDN services: Difference between revisions
Line 1,186: | Line 1,186: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 || 0x20 || [[#NetworkInfo]]+0x0 | | 0x0 || 0x20 || [[#NetworkInfo]]+0x0. The u64/u16 are big-endian. | ||
|- | |- | ||
| 0x20 || 0x1 || Must be 0x1-0xF. | | 0x20 || 0x1 || Must be 0x1-0xF. | ||
|- | |- | ||
| 0x21 || 0x1 || | | 0x21 || 0x1 || Encryption type: 1 = plaintext, 2 = encrypted, {frames with other values are ignored by [[#Scan]]/[[#ScanPrivate]]}. Must match the type which is currently being used: with [[#Scan]]/[[#ScanPrivate]] this is determined via this field, otherwise [[#SecurityConfig]] is used to determine this. | ||
|- | |- | ||
| 0x22 || 0x2 || Big-endian u16 size for the data starting at +0x48, must be <=0x500, and must match {total frame size relative to +0x0 above} + 0x48. | | 0x22 || 0x2 || Big-endian u16 size for the data starting at +0x48, must be <=0x500, and must match {total frame size relative to +0x0 above} + 0x48. | ||
Line 1,201: | Line 1,201: | ||
|} | |} | ||
When encryption is enabled, the encrypted data is +0x28 with size {remaining frame size}. This is encrypted with AES-128-CTR. The CTR is {raw Counter above without byte-swap}, with the rest cleared to zeros. | When encryption is enabled, the encrypted data is +0x28 with size {remaining frame size}. This is encrypted with AES-128-CTR. The key is derived from the raw 0x20-bytes at +0x0. The CTR is {raw Counter above without byte-swap}, with the rest cleared to zeros. | ||
<fill this in> | <fill this in> |