-
Notifications
You must be signed in to change notification settings - Fork 19
Secure data storage with authentication #13
Comments
Hi, this generation of the security solution cannot cryptographically authenticate attempts to read or write data to/from the memory, follow up our updates to check for new solutions. It is possible though to filter modify attempts using the lifecycle management (so everyone can read, but no one can modify after the lock has been performed) of the chip. This isn't an official proposal from Infineon, you might want to cross check this functionality in the Solution Reference Manual. I'm expressing my opinion here, this means it can have security flaws. You can establish a shared secret using the Trust X, then derive a symmetric key using this shared secret (I believe you already started to work in this direction), then encrypt your data with this key, store the content in the arbitrary data object, then lock it. |
Thanks for the reply. May i know what do you mean "lock" it. How can we lock/unlock data. Is there some authentication process we can perform to "lock/unlock" the data? |
This user will get in this case the access, you are right, but the data stored should be encrypted with the symmetrical key. Steps to what you do with the arduino library, use private key OID, generate a shared secret, then generate a symmetrical AES key, which only the original MCU knows, and this key isn't pre-programmed, you can generate it once per chip. |
By locking I mean this wiki artickle. Here you see in the figure various states Creation(0x01) -> Initialisation(0x03) -> Operational(0x07) -> Termination(0x0F). |
Thats a good idea, as long as the person cannot read the corresponding public key from MCU. As you know general purpose MCUs are not secure, and thats the purpose we are putting data on a secure chip at the first place. Although it will require more effort to get the data but not impossible. Am i right? |
Knowing the public key doesn't give anything reasonable to an attacker. You can do the following (again, this is only imo):
|
Thanks alot for explaination. Now can you please also tell me the steps how to unlock/decrypt the object |
There are no examples for the arduino libray, but you can use this software framework to add required functions. Here is the full example on writing the Trust Anchor Object ID. The sample code which might be interesting for you is here /**
* Sample metadata
*/
static uint8_t metadata [] = {
//Metadata tag in the data object
0x20, 0x05,
//Read tag in the metadata
0xD1, 0x03,
//LcsO < Operation
0xE1 , 0xFB, 0x03,
};
You also need to update the lifecycle state itself to the operational. More information you can fine here and here (SRM, pdf) |
I am not asking exact implementation details. I am asking, how we can decrypt the stored data that is locked? Please tell me same steps as you said before. |
It is locked for follow up writes. You still can read this data. The data can be decrypted using the same symmetrical key you have derived previously. |
So the symmetric key and encrypted data both are stored on Optiga? |
No, if we are still discussing my proposal, then the symmetric key is generated once (step 3 in my message above) an stored on the side of the MCU. |
Thanks. So that means to access the Secure info from the OPTIGA we need to send a key that is stored on an "unsecure MCU". So anyone who can read the key stored on "unsecured MCU" can access the data from OPTIGA. |
This generation of OPTIGA(TM) Trust X doesn't support AES encryption/decryption direct on the chip, this should be performed on the MCU side, on the exact details I can't unfortunately help you. |
Thanks alot 👍 |
I just found this on OPTIGA datasheet Key features page 1: Cryptographic support: ECCNIST P256and P384, AES-128(via DTLS client), SHA-256, TRNG, DRNG AES 128 is mentioned their. |
You are welcome. |
Thanks. Is there anyway i can program my own firmware in OPTIGA? or change the existing one? I guess the functionality i am looking for cant be done securely without changing OPTIGA firmware. |
We want to securely store some data on the chip, that can only be accessed after valid authentication. The authentication will be perfermed by OPTIGA internally. We are looking for following functionality all together:
1- Secure storage of data in OPTIGA
2- Secure the storage using some authentication mechanism such as a password
3- Log the wrong attempts of password, that after X wrong attempts, we erase the password and the data stored
4- The password shouldnt be able to read from chip and it can be modified after authentication
Is it possible to achieve the above mentioned functionality using existing APIs of OPTIGA X?
Or do we need to modify OPTIGA X firmware to achieve it?
Please advise.
The text was updated successfully, but these errors were encountered: