Hi,
It appears that ITS encryption would be required for PSA Certified Level 3. I'm seeing that this would required a platform specific HAL implementation. Is there some reason PSA Crypto APIs were not used like they were for attestation?
Encryption in ITS =================
The ITS can optionally be configured to encrypt the internal trusted storage data. To support encryption in ITS the target platform must provide an implementation of the APIs defined in ``platform/include/tfm_hal_its_encryption.h``::
enum tfm_hal_status_t tfm_hal_its_aead_generate_nonce(uint8_t *nonce, const size_t nonce_size);
enum tfm_hal_status_t tfm_hal_its_aead_encrypt( struct tfm_hal_its_auth_crypt_ctx *ctx, const uint8_t *plaintext, const size_t plaintext_size, uint8_t *ciphertext, const size_t ciphertext_size, uint8_t *tag, const size_t tag_size);
enum tfm_hal_status_t tfm_hal_its_aead_decrypt( struct tfm_hal_its_auth_crypt_ctx *ctx, const uint8_t *ciphertext, const size_t ciphertext_size, uint8_t *tag, const size_t tag_size, uint8_t *plaintext, const size_t plaintext_size);
Regards,
Brian Quach SimpleLink MCU Texas Instruments Inc. 12500 TI Blvd, MS F-4000 Dallas, TX 75243 214-479-4076
Hello Brian,
The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have introduced the circular dependency: crypto -> ITS -> crypto
That was not acceptable, so it was decided to use a HAL API in order to avoid this.
Regards,
GEORGIOS VASILAKIS | R&D Engineer
M +47 93 97 24 90 | Trondheim, Norway
nordicsemi.comhttp://www.nordicsemi.com/ | devzone.nordicsemi.comhttps://devzone.nordicsemi.com/
[Nordic_logo_signature]http://www.nordicsemi.com/
________________________________ From: Quach, Brian via TF-M tf-m@lists.trustedfirmware.org Sent: Tuesday, February 27, 2024 6:51 PM To: tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Subject: [TF-M] ITS encryption
Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
It appears that ITS encryption would be required for PSA Certified Level 3. I’m seeing that this would required a platform specific HAL implementation. Is there some reason PSA Crypto APIs were not used like they were for attestation?
Encryption in ITS
=================
The ITS can optionally be configured to encrypt the internal trusted storage
data.
To support encryption in ITS the target platform must provide an
implementation of the APIs defined in ``platform/include/tfm_hal_its_encryption.h``::
enum tfm_hal_status_t tfm_hal_its_aead_generate_nonce(uint8_t *nonce,
const size_t nonce_size);
enum tfm_hal_status_t tfm_hal_its_aead_encrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *plaintext,
const size_t plaintext_size,
uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size);
enum tfm_hal_status_t tfm_hal_its_aead_decrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size,
uint8_t *plaintext,
const size_t plaintext_size);
Regards,
Brian Quach
SimpleLink MCU
Texas Instruments Inc.
12500 TI Blvd, MS F-4000
Dallas, TX 75243
214-479-4076
Thanks for the explanation Georgios! I suppose combining the crypto and ITS into a single partition would work around this but reduce the isolation.
Regards, Brian
From: Vasilakis, Georgios georgios.vasilakis@nordicsemi.no Sent: Wednesday, February 28, 2024 2:14 AM To: tf-m@lists.trustedfirmware.org; Quach, Brian brian@ti.com Subject: [EXTERNAL] Re: ITS encryption
Hello Brian, The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have ZjQcmQRYFpfptBannerStart This message was sent from outside of Texas Instruments.
Do not click links or open attachments unless you recognize the source of this email and know the content is safe.
ZjQcmQRYFpfptBannerEnd Hello Brian,
The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have introduced the circular dependency: crypto -> ITS -> crypto
That was not acceptable, so it was decided to use a HAL API in order to avoid this.
Regards,
GEORGIOS VASILAKIS | R&D Engineer
M +47 93 97 24 90 | Trondheim, Norway
nordicsemi.comhttps://urldefense.com/v3/__http:/www.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35YpmX8bWA$ | devzone.nordicsemi.comhttps://urldefense.com/v3/__https:/devzone.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35ZVALaeHQ$
[Nordic_logo_signature]https://urldefense.com/v3/__http:/www.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35YpmX8bWA$
________________________________ From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Tuesday, February 27, 2024 6:51 PM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] ITS encryption
Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
It appears that ITS encryption would be required for PSA Certified Level 3. I'm seeing that this would required a platform specific HAL implementation. Is there some reason PSA Crypto APIs were not used like they were for attestation?
Encryption in ITS
=================
The ITS can optionally be configured to encrypt the internal trusted storage
data.
To support encryption in ITS the target platform must provide an
implementation of the APIs defined in ``platform/include/tfm_hal_its_encryption.h``::
enum tfm_hal_status_t tfm_hal_its_aead_generate_nonce(uint8_t *nonce,
const size_t nonce_size);
enum tfm_hal_status_t tfm_hal_its_aead_encrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *plaintext,
const size_t plaintext_size,
uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size);
enum tfm_hal_status_t tfm_hal_its_aead_decrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size,
uint8_t *plaintext,
const size_t plaintext_size);
Regards,
Brian Quach
SimpleLink MCU
Texas Instruments Inc.
12500 TI Blvd, MS F-4000
Dallas, TX 75243
214-479-4076
Hey Brian,
Combining the crypto and ITS partition together is a possible solution indeed since both crypto and ITS are PRoT partitions. Separation of concern is always a good idea, but this doesn't technically break the security requirements.
It was in fact discussed here in the mailing list in the ITS encryption thread:
https://lists.trustedfirmware.org/archives/list/tf-m@lists.trustedfirmware.o...
The decision was to go with the simpler solution which follows the security requirements and has minimal impact on the partitions.
Regards,
GEORGIOS VASILAKIS | R&D Engineer
M +47 93 97 24 90 | Trondheim, Norway
nordicsemi.comhttp://www.nordicsemi.com/ | devzone.nordicsemi.comhttps://devzone.nordicsemi.com/
[Nordic_logo_signature]http://www.nordicsemi.com/
________________________________ From: Quach, Brian brian@ti.com Sent: Thursday, February 29, 2024 9:57 PM To: Vasilakis, Georgios georgios.vasilakis@nordicsemi.no; tf-m@lists.trustedfirmware.org tf-m@lists.trustedfirmware.org Subject: RE: ITS encryption
You don't often get email from brian@ti.com. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Thanks for the explanation Georgios! I suppose combining the crypto and ITS into a single partition would work around this but reduce the isolation.
Regards, Brian
From: Vasilakis, Georgios georgios.vasilakis@nordicsemi.no Sent: Wednesday, February 28, 2024 2:14 AM To: tf-m@lists.trustedfirmware.org; Quach, Brian brian@ti.com Subject: [EXTERNAL] Re: ITS encryption
Hello Brian, The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have
ZjQcmQRYFpfptBannerStart
This message was sent from outside of Texas Instruments.
Do not click links or open attachments unless you recognize the source of this email and know the content is safe.
ZjQcmQRYFpfptBannerEnd
Hello Brian,
The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have introduced the circular dependency: crypto -> ITS -> crypto
That was not acceptable, so it was decided to use a HAL API in order to avoid this.
Regards,
GEORGIOS VASILAKIS | R&D Engineer
M +47 93 97 24 90 | Trondheim, Norway
nordicsemi.comhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__http%3A%2Fwww.nordicsemi.com%2F__%3B!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35YpmX8bWA%24&data=05%7C02%7Cgeorgios.vasilakis%40nordicsemi.no%7C342bb9c11daa40d44b4708dc3969154c%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C638448370698477822%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=YrwrKmOjaaUNxr8nhShnSAGykKjKGy8nP3Cg%2FS4%2Bk6I%3D&reserved=0 | devzone.nordicsemi.comhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2Fdevzone.nordicsemi.com%2F__%3B!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35ZVALaeHQ%24&data=05%7C02%7Cgeorgios.vasilakis%40nordicsemi.no%7C342bb9c11daa40d44b4708dc3969154c%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C638448370698488225%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=JfojlCRJNIb9zRGJCfOHpUQXzDKBOs8oDyfPD6AbdwE%3D&reserved=0
________________________________
From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Tuesday, February 27, 2024 6:51 PM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] ITS encryption
Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
It appears that ITS encryption would be required for PSA Certified Level 3. I’m seeing that this would required a platform specific HAL implementation. Is there some reason PSA Crypto APIs were not used like they were for attestation?
Encryption in ITS
=================
The ITS can optionally be configured to encrypt the internal trusted storage
data.
To support encryption in ITS the target platform must provide an
implementation of the APIs defined in ``platform/include/tfm_hal_its_encryption.h``::
enum tfm_hal_status_t tfm_hal_its_aead_generate_nonce(uint8_t *nonce,
const size_t nonce_size);
enum tfm_hal_status_t tfm_hal_its_aead_encrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *plaintext,
const size_t plaintext_size,
uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size);
enum tfm_hal_status_t tfm_hal_its_aead_decrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size,
uint8_t *plaintext,
const size_t plaintext_size);
Regards,
Brian Quach
SimpleLink MCU
Texas Instruments Inc.
12500 TI Blvd, MS F-4000
Dallas, TX 75243
214-479-4076
Hi all,
It should be a good idea to combine Crypto and ITS to one partition. Both are RoT PSA Services, so the isolation is not really required.
Best regards, Andrej Butok
From: Quach, Brian via TF-M tf-m@lists.trustedfirmware.org Sent: Thursday, February 29, 2024 9:57 PM To: Vasilakis, Georgios georgios.vasilakis@nordicsemi.no; tf-m@lists.trustedfirmware.org Subject: [TF-M] Re: ITS encryption
Thanks for the explanation Georgios! I suppose combining the crypto and ITS into a single partition would work around this but reduce the isolation.
Regards, Brian
From: Vasilakis, Georgios <georgios.vasilakis@nordicsemi.nomailto:georgios.vasilakis@nordicsemi.no> Sent: Wednesday, February 28, 2024 2:14 AM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; Quach, Brian <brian@ti.commailto:brian@ti.com> Subject: [EXTERNAL] Re: ITS encryption
Hello Brian, The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have ZjQcmQRYFpfptBannerStart This message was sent from outside of Texas Instruments. Do not click links or open attachments unless you recognize the source of this email and know the content is safe. ZjQcmQRYFpfptBannerEnd Hello Brian,
The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have introduced the circular dependency: crypto -> ITS -> crypto
That was not acceptable, so it was decided to use a HAL API in order to avoid this.
Regards,
GEORGIOS VASILAKIS | R&D Engineer
M +47 93 97 24 90 | Trondheim, Norway
nordicsemi.comhttps://urldefense.com/v3/__http:/www.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35YpmX8bWA$ | devzone.nordicsemi.comhttps://urldefense.com/v3/__https:/devzone.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35ZVALaeHQ$
[Nordic_logo_signature]https://urldefense.com/v3/__http:/www.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35YpmX8bWA$
________________________________ From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Tuesday, February 27, 2024 6:51 PM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] ITS encryption
Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
It appears that ITS encryption would be required for PSA Certified Level 3. I'm seeing that this would required a platform specific HAL implementation. Is there some reason PSA Crypto APIs were not used like they were for attestation?
Encryption in ITS
=================
The ITS can optionally be configured to encrypt the internal trusted storage
data.
To support encryption in ITS the target platform must provide an
implementation of the APIs defined in ``platform/include/tfm_hal_its_encryption.h``::
enum tfm_hal_status_t tfm_hal_its_aead_generate_nonce(uint8_t *nonce,
const size_t nonce_size);
enum tfm_hal_status_t tfm_hal_its_aead_encrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *plaintext,
const size_t plaintext_size,
uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size);
enum tfm_hal_status_t tfm_hal_its_aead_decrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size,
uint8_t *plaintext,
const size_t plaintext_size);
Regards,
Brian Quach
SimpleLink MCU
Texas Instruments Inc.
12500 TI Blvd, MS F-4000
Dallas, TX 75243
214-479-4076
As an added benefit, that would eliminate the overhead of PSA calls from Crypto to ITS for key storage.
Regards, Brian
From: Andrej Butok andrey.butok@nxp.com Sent: Monday, March 4, 2024 5:03 AM To: Quach, Brian brian@ti.com; Vasilakis, Georgios georgios.vasilakis@nordicsemi.no; tf-m@lists.trustedfirmware.org Subject: [EXTERNAL] RE: ITS encryption
Hi all, It should be a good idea to combine Crypto and ITS to one partition. Both are RoT PSA Services, so the isolation is not really required. Best regards, Andrej Butok From: Quach, Brian via TF-M <tf-m@ lists. trustedfirmware. org> Sent: ZjQcmQRYFpfptBannerStart This message was sent from outside of Texas Instruments.
Do not click links or open attachments unless you recognize the source of this email and know the content is safe.
ZjQcmQRYFpfptBannerEnd Hi all,
It should be a good idea to combine Crypto and ITS to one partition. Both are RoT PSA Services, so the isolation is not really required.
Best regards, Andrej Butok
From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Thursday, February 29, 2024 9:57 PM To: Vasilakis, Georgios <georgios.vasilakis@nordicsemi.nomailto:georgios.vasilakis@nordicsemi.no>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org Subject: [TF-M] Re: ITS encryption
Thanks for the explanation Georgios! I suppose combining the crypto and ITS into a single partition would work around this but reduce the isolation.
Regards, Brian
From: Vasilakis, Georgios <georgios.vasilakis@nordicsemi.nomailto:georgios.vasilakis@nordicsemi.no> Sent: Wednesday, February 28, 2024 2:14 AM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org; Quach, Brian <brian@ti.commailto:brian@ti.com> Subject: [EXTERNAL] Re: ITS encryption
Hello Brian, The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have ZjQcmQRYFpfptBannerStart This message was sent from outside of Texas Instruments.
Do not click links or open attachments unless you recognize the source of this email and know the content is safe.
ZjQcmQRYFpfptBannerEnd Hello Brian,
The reason that ITS could not use the crypto partition to encrypt its data is that the crypto partition uses the ITS to store keys with persistent lifetime. As a result, using the PSA crypto partition from inside ITS will have introduced the circular dependency: crypto -> ITS -> crypto
That was not acceptable, so it was decided to use a HAL API in order to avoid this.
Regards,
GEORGIOS VASILAKIS | R&D Engineer
M +47 93 97 24 90 | Trondheim, Norway
nordicsemi.comhttps://urldefense.com/v3/__http:/www.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35YpmX8bWA$ | devzone.nordicsemi.comhttps://urldefense.com/v3/__https:/devzone.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35ZVALaeHQ$
[Nordic_logo_signature]https://urldefense.com/v3/__http:/www.nordicsemi.com/__;!!G3vK!S849bJA4ffJN5SgyTulDThtmU4TexbyazCWV5lIeJ2Qj3bvpuNj6-GPLlZTXWCITvP16olO2Lkzg7ANa35YpmX8bWA$
________________________________ From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Sent: Tuesday, February 27, 2024 6:51 PM To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Subject: [TF-M] ITS encryption
Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
It appears that ITS encryption would be required for PSA Certified Level 3. I’m seeing that this would required a platform specific HAL implementation. Is there some reason PSA Crypto APIs were not used like they were for attestation?
Encryption in ITS
=================
The ITS can optionally be configured to encrypt the internal trusted storage
data.
To support encryption in ITS the target platform must provide an
implementation of the APIs defined in ``platform/include/tfm_hal_its_encryption.h``::
enum tfm_hal_status_t tfm_hal_its_aead_generate_nonce(uint8_t *nonce,
const size_t nonce_size);
enum tfm_hal_status_t tfm_hal_its_aead_encrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *plaintext,
const size_t plaintext_size,
uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size);
enum tfm_hal_status_t tfm_hal_its_aead_decrypt(
struct tfm_hal_its_auth_crypt_ctx *ctx,
const uint8_t *ciphertext,
const size_t ciphertext_size,
uint8_t *tag,
const size_t tag_size,
uint8_t *plaintext,
const size_t plaintext_size);
Regards,
Brian Quach
SimpleLink MCU
Texas Instruments Inc.
12500 TI Blvd, MS F-4000
Dallas, TX 75243
214-479-4076
tf-m@lists.trustedfirmware.org