General questions about encryption and authentication

I've been having problems digging up information about encryption protocols and how they are supposed to work. Typically for example, you have a key and IV and keep the key secret and make the IV known publicly to the recipient of encrypted data.

I've built a library branch (GitHub - TMRh20/nrf_to_nrf at CCMEncryption) that uses the nrf52840 CCM AES encryption module to create an encrypted & authenticated wireless radio network.

This implementation has 3 items: A key, a counter and an IV.

Right now I am generating a random IV and sending it along with each packet. Mostly just wondering if the counter value needs to be updated as well or if I can just use a static counter value.

If anybody is interested/willing to take a look here that would be great. Here is the datasheet for reference: https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf

The CCM data structure is described here: CCM — AES CCM mode encryption

Found the answer, which is yes, the counter should be incremented and sent with each packet.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.