Protect sensitive data in embedded devices?

What is the secure way to store sensitive data on an embedded device?

At my work, I develop a product for the consumer market, he will have an eMMC card, in which there will be very valuable data. I want to know what is the best way to protect this data, i.e. Does not allow someone to understand its contents. (ps: this is not code, this is the actual data set)

It seems to me that the design is to put data in an eMMC, encrypt it using AES (is a 128-bit key enough?). The keys will be stored in the MCU flash memory. The MCU I use provides functionality to prevent reading flash memory and overwriting flash memory. However, an eMMC with data (but without an encryption key) will be available to the hacker if he simply installs eMMC on his computer. Therefore, the decrypted data will be temporarily located in the system’s RAM.

So, if I use the functions of my MCU correctly to block flash memory, will it be safe? Or are there any other ways to extract the contents of flash memory (built-in to the MCU) each, if it is protected? Like hardware mods or the like. Or can I do something from the data, even if I hide the key in the flash?

Please avoid answers like "... should be fine." I would like to have an idea of ​​the worst case scenarios.

For reference, here we use the read / write protection functions of the MCU that we use, but my question has a common purpose, not necessarily related to one MCU. http://www.st.com/content/ccc/resource/technical/document/application_note/89/12/c5/e2/0d/0e/45/7f/DM00186528.pdf/files/DM00186528.pdf/jcr: content / translations / en.DM00186528.pdf

+6
source share
4 answers

It completely depends on the functionality of your device (or your protected information). Typically, AES-128 bit encryption is enough for a reasonable level of security for embedded devices. But storing keys in insecure memory (processor flash memory) causes serious security problems. There are many physical / logical ways to extract data from non-volatile memory.

You can store your keys in the SRAM shared memory and protect the system using unauthorized access keys or use the MCU with a built-in crypto corrector and secure key storage (for example, lpc18s, lpc43s, etc.) or use an external cryptograph chip like TPM or SAM for increase security. But, as mentioned earlier, you have to decide how and when you need en / decrypt data, is it necessary to transfer simple data (decrypted information) to insecure data strings? You can get more information in the link below, which I asked a long time ago: https://electronics.stackexchange.com/questions/198274/storing-a-secure-key-in-an-embedded-devices-memory

+2
source

I was developing credit card machines, the most common attacks were:

  1. A human resource leak when an engineer missed sensitive data or inserted backdoors into a product. This is not related to your question, I will not expand.
  2. Hacking software in which an attacker tries to download your firmware or try to provide root access using JTAG, UART, Ethernet, USB and any other port that your product may have. No matter how secure your key is, if they get a JTAG to run, the key will be easily recovered. Same thing with the root console via the serial port or, if they can load, hack and reprogram your flash memory.
  3. Bus detection when an attacker connects spies to your buses (mmc, spi, uart, etc., even into memory such as the DDR3 bus) to monitor data. If you transfer unencrypted confidential data to a bus that can be snooped, this will be a security breach. In order not to bury the bus in the circuit board and use only BGA, do not allow access to them in the outer layers.
  4. Encrypt everything. There were attacks when the memory chips were hatched (physically!), And the bit states were visually read out by the microscope!

This is the order of the most common attacks I know.

You can always use secure chips, secure bootloaders and rammers to erase all this in case of abuse.

+3
source

Security costs depend on how valuable secure data is. If it is really that valuable for a Secure Cryptoprocessor with Tamper resistance.

Basically, these are devices that somehow “break down” into physical interference with events, and also try to prevent indirect sniffing of signals.

+1
source

It depends on the use of your data.

If your embedded device also needs data, you need to use a symmetric key .

If you want to store data, but the device itself no longer needs to read it, you should use an asymmetric key .
Then it is impossible to recover data even with the full contents of the flash.
It is not difficult to implement with a good library.

But problems remain.
You can still retrieve data while creating it.
How this can be avoided depends on the design of your system.

+1
source

Source: https://habr.com/ru/post/1014339/


All Articles