Open cjhdev opened 1 month ago
Thank you very much for you feedback. After confirmation with LoRa Alliance members, the expected behavior is the one you implemented. Similarly to the layer2 spec evolution, the intend is to add physical layer elements to the MIC. This reduces the risk of replay attack of the same frame on a different frequency and data rate.
One more thing to add to this ticket, I also notice that wor_compute_mic_ack()
doesn't add the pad16
field when calculating the MIC.
Perhaps this array should be 16B long and initialized to zero.
Hi, This will be fixed in the next coming release.
I think there is a mistake in v4.5.0
relay_tx_check_decode_ack()
where the WOR channel frequency and datarate is used to calculate the ACK MIC, instead of the frequency and datarate extracted from the WOR frame that is being acknowledged.The values are set in
ack_mic_info
which is then passed towor_compute_mic_ack()
.Line 793 of TS011-1.0.0 defines the MIC as:
CMAC = aes128_cmac(WorSIntKey, B0 | AckUplinkEnc | WOR | pad16)
Table 20 shows how to make WOR.
Line 797 immediately before table 20 says:
WOR contains the data received in the WOR Relay Class A Uplink and is defined as: