How to save secure data to SE050

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to save secure data to SE050

跳至解决方案
2,599 次查看
namht
Contributor III

Hi all,

Currenly, i'm working with secure element SE050. 
I readed on SE050's datasheet and found content: "Secured user flash memory up to 50 kB for secure data or key storage".
My question: How to save/read my secure data to flash memory of SE050?

Thanks.

标签 (1)
0 项奖励
回复
1 解答
2,543 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @namht ,

 

There is another demo called "se05x_GetCertificate". Please kindly refer to simw-top\demos\se05x\se05x_GetCertificate for details.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

7 回复数
2,579 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @namht ,

 

Binary file is a secure object supported by SE050, so you may create a file object at first and store your secure data into it, for example, the device certificate . We provide a demo of se05x_InjectCertificate for that purpose. You may find this demo within the MW: https://www.nxp.com/webapp/Download?colCode=SE05x-PLUG-TRUST-MW&appType=license .

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

2,550 次查看
namht
Contributor III
Hi Kan,
Thank you for reply.
I tried following the example, but i don't know how to read back it again.
I tried "sss_key_store_get_key()" and return status = kStatus_SSS_Fail
0 项奖励
回复
2,544 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @namht ,

 

There is another demo called "se05x_GetCertificate". Please kindly refer to simw-top\demos\se05x\se05x_GetCertificate for details.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

2,523 次查看
namht
Contributor III

Hi @Kan_Li 

I tried demo of "se05x_InjectCertificate" for save data to SE050 and "se05x_GetCertificate" for read back this data from SE050 successly. Howerver, my secure data can be leak if anyone try  "brute force" keyID for get data, rights?

And, I tried a demo of "se05x_Minimal" for gets available memory from secure element. I see before and after Inject Certificate, Se05x_API_GetFreeMemory() return pfreeMem = 32767. Why available memory of SE050 not change?

 
0 项奖励
回复
2,510 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @namht ,

 

Yes, it is possible so we recommend binging with your host in real application, please kindly refer to https://www.nxp.com/docs/en/application-note/AN12662.pdf for details.

 

Actually the mem size should change, but I am not sure if you have enabled the following definition so the application deleted all custom defined secure objects from the beginning of the demo.

Kan_Li_0-1727248821234.png

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

2,507 次查看
namht
Contributor III

I call ex_sss_boot_factory_reset() → Se05x_API_GetFreeMemory() → InjectCertificate → Se05x_API_GetFreeMemory() .

Log :

App :INFO :mem=32767
App :INFO :Inject certificate example
App :INFO :Injecting ECC certificate at 0x00000014
App :INFO :mem=32767

0 项奖励
回复
2,497 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @namht ,

 

Is it possible to turn on the verbose log level? so I may have the APDU command log for analyzation. 

Kan_Li_0-1727328799825.png

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-1957639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%A6%82%E4%BD%95%E5%B0%86%E5%AE%89%E5%85%A8%E6%95%B0%E6%8D%AE%E4%BF%9D%E5%AD%98%E5%88%B0%20SE050%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1957639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E7%9B%AE%E5%89%8D%EF%BC%8C%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E5%AE%89%E5%85%A8%E5%85%83%E4%BB%B6%20SE050%E3%80%82%3CBR%20%2F%3E%E6%88%91%E9%98%85%E8%AF%BB%E4%BA%86%20SE050%20%E7%9A%84%E6%95%B0%E6%8D%AE%E8%A1%A8%E5%B9%B6%E5%8F%91%E7%8E%B0%E5%86%85%E5%AE%B9%EF%BC%9A%E2%80%9C%E5%AE%89%E5%85%A8%E7%9A%84%E7%94%A8%E6%88%B7%E9%97%AA%E5%AD%98%E9%AB%98%E8%BE%BE%2050%20kB%EF%BC%8C%E7%94%A8%E4%BA%8E%E5%AE%89%E5%85%A8%E6%95%B0%E6%8D%AE%E6%88%96%E5%AF%86%E9%92%A5%E5%AD%98%E5%82%A8%E2%80%9D%E3%80%82%3CBR%20%2F%3E%E6%88%91%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%9A%E5%A6%82%E4%BD%95%E5%B0%86%E6%88%91%E7%9A%84%E5%AE%89%E5%85%A8%E6%95%B0%E6%8D%AE%E4%BF%9D%E5%AD%98%2F%E8%AF%BB%E5%8F%96%E5%88%B0%20SE050%20%E7%9A%84%E9%97%AA%E5%AD%98%EF%BC%9F%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1957639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%20106x%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1961499%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%A6%82%E4%BD%95%E5%B0%86%E5%AE%89%E5%85%A8%E6%95%B0%E6%8D%AE%E4%BF%9D%E5%AD%98%E5%88%B0%20SE050%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1961499%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E8%B0%83%E7%94%A8%3CSTRONG%3Eex_sss_boot_factory_reset()%20%E2%86%92%3C%2FSTRONG%3E%20%3CSPAN%3E%3CSTRONG%3ESe05x_API_GetFreeMemory()%3C%2FSTRONG%3E%20%E2%86%92%20%3CSTRONG%3EInjectCertificate%3C%2FSTRONG%3E%20%E2%86%92%20%3CSTRONG%3ESe05x_API_GetFreeMemory()%3C%2FSTRONG%3E%20%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%E6%97%A5%E5%BF%97%20%EF%BC%9A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%EF%BC%9A%E4%BF%A1%E6%81%AF%EF%BC%9Amem%3D32767%3CBR%20%2F%3E%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%EF%BC%9A%E4%BF%A1%E6%81%AF%EF%BC%9A%E6%B3%A8%E5%85%A5%E8%AF%81%E4%B9%A6%E7%A4%BA%E4%BE%8B%3CBR%20%2F%3E%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%EF%BC%9A%E4%BF%A1%E6%81%AF%EF%BC%9A%E5%9C%A8%200x00000014%20%E5%A4%84%E6%B3%A8%E5%85%A5%20ECC%20%E8%AF%81%E4%B9%A6%3CBR%20%2F%3E%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%EF%BC%9A%E4%BF%A1%E6%81%AF%EF%BC%9Amem%3D32767%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1960235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%A6%82%E4%BD%95%E5%B0%86%E5%AE%89%E5%85%A8%E6%95%B0%E6%8D%AE%E4%BF%9D%E5%AD%98%E5%88%B0%20SE050%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1960235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E4%BD%A0%E5%A5%BD%EF%BC%8CKan%EF%BC%8C%3CBR%20%2F%3E%E8%B0%A2%E8%B0%A2%E6%82%A8%E7%9A%84%E5%9B%9E%E5%A4%8D%E3%80%82%3CBR%20%2F%3E%E6%88%91%E5%B0%9D%E8%AF%95%E6%8C%89%E7%85%A7%E8%BF%99%E4%B8%AA%E4%BE%8B%E5%AD%90%EF%BC%8C%E4%BD%86%E6%88%91%E4%B8%8D%E7%9F%A5%E9%81%93%E5%A6%82%E4%BD%95%E5%86%8D%E6%AC%A1%E8%AF%BB%E5%9B%9E%E5%AE%83%E3%80%82%3CBR%20%2F%3E%E6%88%91%E5%B0%9D%E8%AF%95%E4%BA%86%E2%80%9Csss_key_store_get_key()%E2%80%9D%E5%B9%B6%E8%BF%94%E5%9B%9E%E7%8A%B6%E6%80%81%3D%20kStatus_SSS_Fail%3C%2FLINGO-BODY%3E