From 9f3d15a7bdf3487535c2565817ee704cf7cb0486 Mon Sep 17 00:00:00 2001 From: Ernst Klamer Date: Tue, 10 Oct 2023 19:35:04 +0200 Subject: [PATCH] Add better explanation for the counter in encrypted messages --- src/encryption.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/encryption.html b/src/encryption.html index c993f63..71f4b33 100644 --- a/src/encryption.html +++ b/src/encryption.html @@ -50,8 +50,12 @@

The input

231d39c1d7cc1ab1aee224cd096db932.

- We also need a Counter, which is a 4 bytes long value, which - is changed every advertisement. Let's take 0x00112233 as example. + We also need a Counter, which is a 4 bytes long value (unsigned + 32-bit little-endian integer), which should increase every advertisement. This + counter can be used to implement the replay protection features of AES-CCM, but has + to be implemented on the receiving side (e.g. by verifying that the counter has increased + compared to the previous counter value). + In the example we use 0x00112233 as value for the counter.

Last thing we need is the MAC address of the sensor device,