Skip to content

Commit

Permalink
Add better explanation for the counter in encrypted messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernst79 committed Oct 10, 2023
1 parent ddf2b3a commit 9f3d15a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/encryption.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ <h3 id="input">The input</h3>
<code>231d39c1d7cc1ab1aee224cd096db932</code>.
</p>
<p>
We also need a <strong>Counter</strong>, which is a 4 bytes long value, which
is changed every advertisement. Let's take <code>0x00112233</code> as example.
We also need a <strong>Counter</strong>, 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 <code>0x00112233</code> as value for the counter.
</p>
<p>
Last thing we need is the <strong>MAC address</strong> of the sensor device,
Expand Down

0 comments on commit 9f3d15a

Please sign in to comment.