Skip to main content

data_block_int_key

Function data_block_int_key 

Source
pub fn data_block_int_key(root_key: &[u8; 16]) -> [u8; 16]
Expand description

Derives the key that signs a data block, section 3.3.

§Arguments

  • root_key - the device’s GenAppKey on LoRaWAN 1.0.x, or its AppKey on 1.1.

§Returns

The DataBlockIntKey, which only ever signs data blocks.

§Examples

use pamoja_lorawan::packages::fragment::data_block_int_key;

let key = data_block_int_key(&[0x2B; 16]);
assert_ne!(key, [0x2B; 16], "it is a key of its own");