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.