-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to provision/store keys in TA secure storage #3766
Comments
Even without RPMB the secure storage still provides confidentiality, rollback-protection is a so-so though. Another option is to derive the key from HUK via the System PTA, TA function |
Thanks for your answer,
If I understand it correctly, you propose to generate the key inside the Optee/TA, I'm correct ? The key returned by |
If you know what the key will be because it has been recorded during production or so you'll have a shared secret. |
I continue my research on this topic and I found this #3346 which may be a solution for my problem. I don't fully got it (I'm a beginner with security and Optee). My understanding is
But how can the key be embedded with the TA ?
Just to be sure, in which version of Optee the possibility to use encrypted TA was added ? my current version (3.6) does not have this feature. |
It should be safe to store the key in the TA as long as the TA is encrypted on the device. The TA (and therefore the key) would be decrypted only when OP-TEE loads the TA and at that point it would reside in secure memory only.
The encrypted TAs you're referring to were added in commit 2de17fd ("TA dev kit: add support for TA encryption"), and are documented here, see "3. (REE-FS) Encrypted TAs". This feature has not been included in a release yet. However, there is another option to encrypt TAs called "Secure storage TAs", see here. The main difference with the above is, the TA is not pre-encrypted, instead it is encrypted by OP-TEE when you install it. So, you need to have the unencrypted TA on the device first, then install it, then delete/scrub the unencrypted TA. It may or may not cause deployment issues, depending on your use case. In fact, this mechanism was introduced as a part of a bigger framework which could potentially deal with remote installation, upgrade etc. |
Thanks all for your support. I've a view of the possible solutions. I will report to my team to see what will fit better with our flow @jenswi-linaro About the encrypted TA - #3346, it can be backported to my project or still under testing or something ? Any deadline for the release ? |
I missed one point:
It is possible to get info about this framework ? |
It should be safe and easy to backport.
Well it is now more than 3 months since 3.8.0, so in theory it would be time for a new release. @jbech-linaro what do you think? |
Never happened, discussed in #1928. |
May 22nd is the target date for 3.9.0. I.e. pushed a bit more than previous years. |
Just to update here that encrypted TAs support is present in OP-TEE v3.8.0 release (commit 2de17fd present). Its just the documentation which was updated recently, thanks to @jforissier reminder. |
@b49020 you're right, my mistake. What happened is, I ran |
@jforissier no worries. |
Thanks for all the support. I started experimentation around Secure Storage TA |
How is it possible to securely store/provision keys in a TA's secure storage ?
I've devices which communicates together. The message are encrypted/decrypted by
Optee using AES GCM. In the current prototype, the key is hard-coded in TA (which
is bad).
I'd like to provision/store this key in the secure storage, but:
key should read by the REE (Linux) before it can be sent to the TA
I-m using OP-TEE version 3.6.0 (a5a43d3c6-dev)
Thanks for your help
The text was updated successfully, but these errors were encountered: