SE050 getting 0x6D00 response when create an object to store AES key

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

SE050 getting 0x6D00 response when create an object to store AES key

583 次查看
liexin00
Contributor I

Hi,

I recently try to store the AES-256 key into the SE050, however I got the response code 0x6D00 instead of 0x9000. I use the document of AN12313 SE050 APDU Specification, I couldn't found any solution from the forum too. 

Firstly, I soft reset the secure element before sending the APDU command. I think the problem should be on the APDU command instead of T=1 protocol. Anyone can help to tackle the issue?

Thanks.

typedef struct
{
uint8_t cla;
uint8_t ins;
uint8_t p1;
uint8_t p2;
uint8_t lc;
uint8_t data[256];
uint8_t le;
} ApduCommand;

static ApduCommand write_aeskey = {
.cla = 0x80,
.ins = 0x01,
.p1 = 0x03,
.p2 = 0x00,
.lc = 0x28,
.data = {
0x41, 0x04, 0x00, 0x00, 0x00, 0x05,
0x43, 0x20, 0x66, 0x49, 0x38, 0x55, 0x40, 0x59, 0x64, 0x6F, 0x61, 0x22, 0x52, 0x57, 0x35, 0x48, 0x34, 0x79,
0x32, 0x4C, 0x68, 0x50, 0x6C, 0x37, 0x4B, 0x6B, 0x77, 0x60, 0x79, 0x36, 0x47, 0x35, 0x74, 0x72},
.le = 0x00
};

标记 (1)
0 项奖励
回复
3 回复数

537 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @liexin00 ,

 

Did you develop your application based on the MW or just following the UM11225? Was the log a part of the communication or the whole log out of POR? Please kindly clarify.

 

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.
-------------------------------------------------------------------------------

0 项奖励
回复

529 次查看
liexin00
Contributor I

Hi @Kan_Li ,

Thanks for the reply. FYI, I am using STM32 to communicate with secure element. Since MW is not supported, thus I just followed the UM11225 to develop only the AES functions. The log only shows that I send the write symmetry key (AES) APDU command, then it response 0x6D00. Before sending this command, I have sent the soft reset and applet selection commands, both got the expected response as in UM11225

0 项奖励
回复

496 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @liexin00 ,

 

Thanks for the info! Would you please specify which variant you are playing with? SE050E2? Please kindly clarify.

 

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.
-------------------------------------------------------------------------------

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2164227%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESE050%20%E5%9C%A8%E5%88%9B%E5%BB%BA%E5%AF%B9%E8%B1%A1%E4%BB%A5%E5%AD%98%E5%82%A8%20AES%20%E5%AF%86%E9%92%A5%E6%97%B6%E6%94%B6%E5%88%B0%200x6D00%20%E5%93%8D%E5%BA%94%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2164227%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E6%9C%80%E8%BF%91%E5%B0%9D%E8%AF%95%E5%B0%86%20AES-256%20%E5%AF%86%E9%92%A5%E5%AD%98%E5%82%A8%E5%88%B0%20SE050%20%E4%B8%AD%EF%BC%8C%E4%BD%86%E5%BE%97%E5%88%B0%E7%9A%84%E5%93%8D%E5%BA%94%E4%BB%A3%E7%A0%81%E6%98%AF%200x6D00%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%200x9000%E3%80%82%E6%88%91%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF%20AN12313%20SE050%20APDU%20%E8%A7%84%E8%8C%83%E6%96%87%E6%A1%A3%EF%BC%8C%E5%9C%A8%E8%AE%BA%E5%9D%9B%E4%B8%8A%E4%B9%9F%E6%B2%A1%E6%9C%89%E6%89%BE%E5%88%B0%E4%BB%BB%E4%BD%95%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E3%80%82%20%3C%2FP%3E%3CP%3E%E9%A6%96%E5%85%88%EF%BC%8C%E6%88%91%E5%9C%A8%E5%8F%91%E9%80%81%20APDU%20%E5%91%BD%E4%BB%A4%E4%B9%8B%E5%89%8D%E5%AF%B9%E5%AE%89%E5%85%A8%E5%85%83%E4%BB%B6%E8%BF%9B%E8%A1%8C%E4%BA%86%E8%BD%AF%E5%A4%8D%E4%BD%8D%E3%80%82%E6%88%91%E8%AE%A4%E4%B8%BA%E9%97%AE%E9%A2%98%E5%BA%94%E8%AF%A5%E5%87%BA%E5%9C%A8%20APDU%20%E5%91%BD%E4%BB%A4%E4%B8%8A%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%20T%3D1%20%E5%8D%8F%E8%AE%AE%E4%B8%8A%E3%80%82%E8%B0%81%E8%83%BD%E5%B8%AE%E5%8A%A9%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%EF%BC%9F%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E3%80%82%3C%2FP%3E%3CP%3Etypedef%20struct%3CBR%20%2F%3E%7B%3CBR%20%2F%3Euint8_t%20cla%3B%3CBR%20%2F%3Euint8_t%20ins%3B%3CBR%20%2F%3Euint8_t%20p1%3B%3CBR%20%2F%3Euint8_t%20p2%3B%3CBR%20%2F%3Euint8_t%20lc%3B%3CBR%20%2F%3Euint8_t%20data%5B256%5D%3B%3CBR%20%2F%3Euint8_t%20le%3B%3CBR%20%2F%3E%7DApduCommand%EF%BC%9B%3C%2FP%3E%3CP%3E%E9%9D%99%E6%80%81%20ApduCommand%20write_aeskey%20%3D%20%7B%3CBR%20%2F%3E.cla%3D%200x80%2C%3CBR%20%2F%3E.ins%3D%200x01%EF%BC%8C%3CBR%20%2F%3E.p1%3D%200x03%EF%BC%8C%3CBR%20%2F%3E.p2%3D%200x00%EF%BC%8C%3CBR%20%2F%3E.lc%3D%200x28%EF%BC%8C%3CBR%20%2F%3E.data%3D%20%7B%3CBR%20%2F%3E0x41%2C%200x04%2C%200x00%2C%200x00%2C%200x00%2C%200x05%2C%3CBR%20%2F%3E0x43%2C%200x20%2C%200x66%2C%200x49%2C%200x38%2C%200x55%2C%200x40%2C%200x59%2C%200x64%2C%200x6F%2C%200x61%2C%200x22%2C%200x52%2C%200x57%E3%80%810x35%2C%200x48%2C%200x34%2C%200x79%2C%3CBR%20%2F%3E0x32%2C%200x4C%2C%200x68%2C%200x50%2C%200x6C%2C%200x37%2C%200x4B%2C%200x6B%2C%200x77%2C%200x60%2C%200x79%2C%200x36%2C%200x47%2C%200x35%2C%200x74%2C%200x72%7D%2C%3CBR%20%2F%3E.%E5%98%9E%3D%200x00%3CBR%20%2F%3E%7D%EF%BC%9B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2165799%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SE050%20getting%200x6D00%20response%20when%20create%20an%20object%20to%20store%20AES%20key%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2165799%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254476%22%20target%3D%22_blank%22%3E%40liexin00%3C%2FA%3E%EF%BC%8C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%84%9F%E8%B0%A2%E6%82%A8%E6%8F%90%E4%BE%9B%E7%9A%84%E4%BF%A1%E6%81%AF%EF%BC%81%E8%AF%B7%E8%AF%B4%E6%98%8E%E6%82%A8%E7%8E%A9%E7%9A%84%E6%98%AF%E5%93%AA%E4%B8%AA%E5%8F%98%E4%BD%93%EF%BC%9FSE050E2%3F%E8%AF%B7%E4%BA%88%E4%BB%A5%E6%BE%84%E6%B8%85%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E7%A5%9D%E6%82%A8%E6%84%89%E5%BF%AB%EF%BC%8C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3E%E6%B3%A8%EF%BC%9A%3CBR%20%2F%3E-%20%E5%A6%82%E6%9E%9C%E6%9C%AC%E5%B8%96%E5%9B%9E%E7%AD%94%E4%BA%86%E6%82%A8%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%8C%E8%AF%B7%E7%82%B9%E5%87%BB%22%E6%A0%87%E8%AE%B0%E6%AD%A3%E7%A1%AE%22%20%E6%8C%89%E9%92%AE%E3%80%82%E8%B0%A2%E8%B0%A2%EF%BC%81%3CBR%20%2F%3E-%20%E6%88%91%E4%BB%AC%E4%BC%9A%E5%9C%A8%E6%9C%80%E5%90%8E%E4%B8%80%E6%AC%A1%E5%8F%91%E5%B8%96%E5%90%8E%E7%9A%84%207%20%E5%91%A8%E5%86%85%E8%B7%9F%E8%B8%AA%E4%B8%BB%E9%A2%98%EF%BC%8C%E4%B9%8B%E5%90%8E%E7%9A%84%E5%9B%9E%E5%A4%8D%E5%B0%86%E8%A2%AB%E5%BF%BD%E7%95%A5%3CBR%20%2F%3E%E5%A6%82%E6%9E%9C%E6%82%A8%E4%BB%A5%E5%90%8E%E6%9C%89%E7%9B%B8%E5%85%B3%E9%97%AE%E9%A2%98%EF%BC%8C%E8%AF%B7%E5%8F%A6%E5%BC%80%E6%96%B0%E4%B8%BB%E9%A2%98%EF%BC%8C%E5%B9%B6%E5%8F%82%E8%80%83%E5%B7%B2%E5%85%B3%E9%97%AD%E7%9A%84%E4%B8%BB%E9%A2%98%E3%80%82%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2164997%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SE050%20getting%200x6D00%20response%20when%20create%20an%20object%20to%20store%20AES%20key%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2164997%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F59276%22%20target%3D%22_blank%22%3E%40Kan_Li%3C%2FA%3E%E3%80%81%3C%2FP%3E%3CP%3E%E6%84%9F%E8%B0%A2%E6%82%A8%E7%9A%84%E5%9B%9E%E5%A4%8D%E3%80%82%20%E4%BB%85%E4%BE%9B%E5%8F%82%E8%80%83%EF%BC%8C%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%20STM32%20%E4%B8%8E%E5%AE%89%E5%85%A8%E5%85%83%E4%BB%B6%E9%80%9A%E4%BF%A1%E3%80%82%E7%94%B1%E4%BA%8E%E4%B8%8D%E6%94%AF%E6%8C%81%20MW%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%88%91%E5%8F%AA%E6%8C%89%E7%85%A7%20UM11225%20%E5%BC%80%E5%8F%91%E4%BA%86%20AES%20%E5%8A%9F%E8%83%BD%E3%80%82%E6%97%A5%E5%BF%97%E5%8F%AA%E6%98%BE%E7%A4%BA%E6%88%91%E5%8F%91%E9%80%81%E4%BA%86%E5%86%99%E5%AF%B9%E7%A7%B0%E5%AF%86%E9%92%A5%20(AES)%20APDU%20%E5%91%BD%E4%BB%A4%EF%BC%8C%E7%84%B6%E5%90%8E%E5%AE%83%E5%93%8D%E5%BA%94%200x6D00%E3%80%82%E5%9C%A8%E5%8F%91%E9%80%81%E8%BF%99%E4%B8%AA%E5%91%BD%E4%BB%A4%E4%B9%8B%E5%89%8D%EF%BC%8C%E6%88%91%E5%B7%B2%E7%BB%8F%E5%8F%91%E9%80%81%E4%BA%86%E8%BD%AF%E5%A4%8D%E4%BD%8D%E5%92%8C%E5%B0%8F%E7%A8%8B%E5%BA%8F%E9%80%89%E6%8B%A9%E5%91%BD%E4%BB%A4%EF%BC%8C%E4%B8%A4%E8%80%85%E9%83%BD%E5%BE%97%E5%88%B0%E4%BA%86%E9%A2%84%E6%9C%9F%E7%9A%84%E5%93%8D%E5%BA%94%EF%BC%8C%E5%B0%B1%E5%83%8F%20UM11225%20%E4%B8%80%E6%A0%B7%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2164967%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20SE050%20getting%200x6D00%20response%20when%20create%20an%20object%20to%20store%20AES%20key%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2164967%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254476%22%20target%3D%22_blank%22%3E%40liexin00%3C%2FA%3E%EF%BC%8C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%82%A8%E6%98%AF%E6%A0%B9%E6%8D%AE%20MW%20%E8%BF%98%E6%98%AF%E4%BB%85%E4%BB%85%E6%A0%B9%E6%8D%AE%20UM11225%20%E5%BC%80%E5%8F%91%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%EF%BC%9F%E6%97%A5%E5%BF%97%E6%98%AF%E9%80%9A%E4%BF%A1%E7%9A%84%E4%B8%80%E9%83%A8%E5%88%86%EF%BC%8C%E8%BF%98%E6%98%AF%20POR%20%E4%BB%A5%E5%A4%96%E7%9A%84%E5%85%A8%E9%83%A8%E6%97%A5%E5%BF%97%EF%BC%9F%E8%AF%B7%E6%BE%84%E6%B8%85%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E7%A5%9D%E6%82%A8%E6%84%89%E5%BF%AB%EF%BC%8C%3CBR%20%2F%3EKan%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3E%E6%B3%A8%EF%BC%9A%3CBR%20%2F%3E-%20%E5%A6%82%E6%9E%9C%E6%9C%AC%E5%B8%96%E5%9B%9E%E7%AD%94%E4%BA%86%E6%82%A8%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%8C%E8%AF%B7%E7%82%B9%E5%87%BB%22%E6%A0%87%E8%AE%B0%E6%AD%A3%E7%A1%AE%22%20%E6%8C%89%E9%92%AE%E3%80%82%E8%B0%A2%E8%B0%A2%EF%BC%81%3CBR%20%2F%3E-%20%E6%88%91%E4%BB%AC%E4%BC%9A%E5%9C%A8%E6%9C%80%E5%90%8E%E4%B8%80%E6%AC%A1%E5%8F%91%E5%B8%96%E5%90%8E%E7%9A%84%207%20%E5%91%A8%E5%86%85%E8%B7%9F%E8%B8%AA%E4%B8%BB%E9%A2%98%EF%BC%8C%E4%B9%8B%E5%90%8E%E7%9A%84%E5%9B%9E%E5%A4%8D%E5%B0%86%E8%A2%AB%E5%BF%BD%E7%95%A5%3CBR%20%2F%3E%E5%A6%82%E6%9E%9C%E6%82%A8%E4%BB%A5%E5%90%8E%E6%9C%89%E7%9B%B8%E5%85%B3%E9%97%AE%E9%A2%98%EF%BC%8C%E8%AF%B7%E5%8F%A6%E5%BC%80%E6%96%B0%E4%B8%BB%E9%A2%98%EF%BC%8C%E5%B9%B6%E5%8F%82%E8%80%83%E5%B7%B2%E5%85%B3%E9%97%AD%E7%9A%84%E4%B8%BB%E9%A2%98%E3%80%82%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E