2011-04-22 03:49 AM
Crypto using STM32: what is the best solution
#crypto-backup-sram2011-05-17 05:32 AM
I need to know how to keep the encryption key secure.
Don't tell anyone what it is. Which of the steps are visible to the user? Where is the image enciphered? Do all devices have the same key? Can you use the BKP registers with tamper protection? Can you use the device unique ID? Can you use ROP?2011-05-17 05:32 AM
First, don't put the crypto key in flash. Keep it in a battery-backed RAM location and use tamper detect circuitry to shut off battery power (to erase the SRAM). This protects the key if the unit isn't powered. Otherwise generate an interrupt from the tamper to erase the key when the unit is running.
Never store the key in regular SRAM. Always keep it in a register when using it. Processors can be halted and the contents of regular SRAM dumped by any good reverse engineering company. Jack Peacock