SE050: Failed to generate new ECC keypair

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

SE050: Failed to generate new ECC keypair

跳至解决方案
2,657 次查看
aleksei1
Contributor I

Hello. I'm trying to generate a ECC keypair (NIST-P256) on #SE050C. But I get an error

I've tried using ssscli

$ ssscli generate ecc 0x7777 NIST_P256
Generating ECC Key Pair at KeyID = 0x00007777, curvetype=NIST_P256
sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :WARN :Communication channel is Plain.
sss :WARN :!!!Not recommended for production use.!!!
smCom :ERROR:PAL Read status error status = ff
smCom :ERROR:phNxpEseProto7816_GetRawFrame phNxpEse_read failed , status : 0xff
smCom :ERROR:phNxpEseProto7816_ProcessResponse phNxpEseProto7816_GetRawFrame failed starting recovery
sss :WARN :nxEnsure:'ret == SM_OK' failed. At Line:6884 Function:sss_se05x_TXn
sss :WARN :nxEnsure:'status == SM_OK' failed. At Line:3457 Function:sss_se05x_key_store_generate_key
ERROR:sss.keystore:sss_key_store_generate_key FAILED
ERROR! Could not generate ECC Key Pair at KeyID 0x00007777

I've augmented 'i2c_a7.c' to print I2C traffic and got the following (i2c messages in cursive):


Generating ECC Key Pair at KeyID = 0x00007777, curvetype=NIST_P256

i2c_read returned -1, errno: 5
i2c_write: (Len=5)
5A C0 00 FF FC
i2c_read: (Len=2)
A5 E0
i2c_read: (Len=1)
00
i2c_read: (Len=2)
3F 19
i2c_write: (Len=5)
5A C7 00 F7 B1
i2c_read: (Len=2)
A5 E7
i2c_read: (Len=1)
23
i2c_read: (Len=37)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F 2A 8D
i2c_write: (Len=27)
5A 00 16 00 A4 04 00 10 A0 00 00 03 96 54 53 00
00 00 01 03 00 00 00 00 00 A8 C8
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read: (Len=2)
A5 00
i2c_read: (Len=1)
09
i2c_read: (Len=11)
03 01 01 6F FF 01 0B 90 00 CC 8B

sss :INFO :atr (Len=35)
00 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 08
01 00 00 00 00 64 00 00 0A 4A 43 4F 50 34 20 41
54 50 4F
sss :WARN :Communication channel is Plain.
sss :WARN :!!!Not recommended for production use.!!!

i2c_write: (Len=16)
5A 40 0B 80 04 00 27 06 41 04 00 00 77 77 9C 01
i2c_read: (Len=2)
A5 40
i2c_read: (Len=1)
05
i2c_read: (Len=7)
41 01 02 90 00 B9 C0
i2c_write: (Len=10)
5A 00 05 80 02 0B 25 00 A0 48
i2c_read: (Len=2)
A5 00
i2c_read: (Len=1)
17
i2c_read: (Len=25)
41 82 00 11 01 01 02 01 01 01 01 01 01 01 01 01
01 01 01 01 01 90 00 34 77
i2c_write: (Len=16)
5A 40 0B 80 04 00 27 06 41 04 00 00 77 77 9C 01
i2c_read: (Len=2)
A5 40
i2c_read: (Len=1)
05
i2c_read: (Len=7)
41 01 02 90 00 B9 C0
i2c_write: (Len=19)
5A 00 0E 80 81 61 00 09 41 04 00 00 77 77 42 01
03 5C 5E
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5

.. 490 lines of the same error omitted ...

i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5
i2c_read returned -1, errno: 5


smCom :ERROR:PAL Read status error status = ff
smCom :ERROR:phNxpEseProto7816_GetRawFrame phNxpEse_read failed , status : 0xff
smCom :ERROR:phNxpEseProto7816_ProcessResponse phNxpEseProto7816_GetRawFrame failed starting recovery


i2c_read returned -1, errno: 5
i2c_write: (Len=5)
5A 81 00 41 A3
i2c_read: (Len=2)
A5 82
i2c_read: (Len=1)
00
i2c_read: (Len=2)
DA 4F
i2c_write: (Len=19)
5A 00 0E 80 81 61 00 09 41 04 00 00 77 77 42 01
03 5C 5E
i2c_read returned -1, errno: 5
i2c_read: (Len=2)
A5 00
i2c_read: (Len=1)
02
i2c_read: (Len=4)
6D 00 72 63


sss :WARN :nxEnsure:'ret == SM_OK' failed. At Line:6884 Function:sss_se05x_TXn
sss :WARN :nxEnsure:'status == SM_OK' failed. At Line:3457 Function:sss_se05x_key_store_generate_key
ERROR:sss.keystore:sss_key_store_generate_key FAILED

 

i2c_write: (Len=5)
5A C5 00 47 82
i2c_read: (Len=2)
A5 E5
i2c_read: (Len=1)
00
i2c_read: (Len=2)
87 67

ERROR! Could not generate ECC Key Pair at KeyID 0x00007777

 

It looks like after sending the following command over I2C, SE050 stops responding on I2C bus.

 

5A 00 0E 80 81 61 00 09 41 04 00 00 77 77 42 01 03 5C 5E

 

The SE050 stops responding to reads from I2C.

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
2,633 次查看
aleksei1
Contributor I

> are you using the latest MW?

 

I'm using v04.01.01 of MW. I think that is the latest to date.

 

The problem was that power supply for SE050 does not provide enough current during key generations and voltage drops below permissible levels.

@Kan_Li Thank you for the reply, please consider the issue resolved.

在原帖中查看解决方案

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

Hi @aleksei1 ,

 

I tried to reproduce your issue here but no success, the ssscli commands work well from my side, are you using the latest MW? what is the dev kit on your hands? Did you modify the ssscli tool or use this tool out of box? Please kindly clarify.

 

Please have my result as below:

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

 

0 项奖励
回复
2,634 次查看
aleksei1
Contributor I

> are you using the latest MW?

 

I'm using v04.01.01 of MW. I think that is the latest to date.

 

The problem was that power supply for SE050 does not provide enough current during key generations and voltage drops below permissible levels.

@Kan_Li Thank you for the reply, please consider the issue resolved.

0 项奖励
回复