MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / DeriveNwkSEncKey

Function DeriveNwkSEncKey

pkg/crypto/key_derivation.go:58–60  ·  view source on GitHub ↗

DeriveNwkSEncKey derives the LoRaWAN 1.1 Network Session Encryption Key

(nwkKey types.AES128Key, jn types.JoinNonce, joinEUI types.EUI64, dn types.DevNonce)

Source from the content-addressed store, hash-verified

56
57// DeriveNwkSEncKey derives the LoRaWAN 1.1 Network Session Encryption Key
58func DeriveNwkSEncKey(nwkKey types.AES128Key, jn types.JoinNonce, joinEUI types.EUI64, dn types.DevNonce) types.AES128Key {
59 return deriveSKey(nwkKey, 0x04, jn, joinEUI, dn)
60}
61
62// DeriveAppSKey derives the LoRaWAN Application Session Key
63// - If a LoRaWAN 1.1 device joins a LoRaWAN 1.1 network, the AppKey is used as "key"

Callers 5

DeriveNwkSKeysMethod · 0.92
TestHandleJoinFunction · 0.92
test.goFile · 0.92
processDownlinkFunction · 0.92
TestKeyDerivationFunction · 0.85

Calls 1

deriveSKeyFunction · 0.85

Tested by 2

TestHandleJoinFunction · 0.74
TestKeyDerivationFunction · 0.68