This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Security and internal flash storage maximum read/write operations: advice needed...

Hi
In order to implement some kind of secure custom advertisement, mainly to defeat reply attacks, I am thinking to implement a counter and exchange it in every advertisement.
For now, advertisement is configured for 5sec period and it will remain like that during deployment.


In order to "survive" to nrf51822 shutdowns (at least during battery replacement) and keep counter counting, I am thinking to store counter into internal flash (as nrf51822 does not have EEPROM).
But this way I have to read and write to/from flash every five seconds...

My question is: does nrf51822 internal flash have a known maximum number of reads/writes/readWrites?
If so, counter will be wrong incremented at certain time, in future, and listeners will probably reject all advertisements due to "reply attack" presence...

Is flash the right memory to store counter? Any alternatives. Any advices?

REM: as nodes are broadcasting important manufacturer data, I must protect it in terms of secrecy (encrypting it (done.)), source authentication (using manufacturer ID (done)) and reply attacks (using incrementing counter)

Thanks

Alex

Related