DeriveLegacyAppSKey derives the LoRaWAN Application Session Key - If a LoRaWAN 1.0 device joins a LoRaWAN 1.0/1.1 network, the AppKey is used as "key" - If a LoRaWAN 1.1 device joins a LoRaWAN 1.0 network, the NwkKey is used as "key"
(key types.AES128Key, jn types.JoinNonce, nid types.NetID, dn types.DevNonce)
| 69 | // - If a LoRaWAN 1.0 device joins a LoRaWAN 1.0/1.1 network, the AppKey is used as "key" |
| 70 | // - If a LoRaWAN 1.1 device joins a LoRaWAN 1.0 network, the NwkKey is used as "key" |
| 71 | func DeriveLegacyAppSKey(key types.AES128Key, jn types.JoinNonce, nid types.NetID, dn types.DevNonce) types.AES128Key { |
| 72 | return deriveLegacySKey(key, 0x02, jn, nid, dn) |
| 73 | } |
| 74 | |
| 75 | // DeriveLegacyNwkSKey derives the LoRaWAN 1.0 Network Session Key. AppNonce is entered as JoinNonce. |
| 76 | // - If a LoRaWAN 1.0 device joins a LoRaWAN 1.0/1.1 network, the AppKey is used as "key" |