Hi @fvjdxe ,
Thanks for the information! Indeed the factory reset also deletes all Security Objects including the EC curve parameters.
You have to Create the NIST-P256 curve first (see below). The following code snip works for me (after I have executed the factory reset first).
// Create EC Auth. Object
status = Se05x_API_CreateCurve_prime256v1(pSe05xSession, kSE05x_ECCurve_NIST_P256);
LOG_I("Se05x_API_CreateCurve_prime256v1 status = %04X", status);
const uint8_t gPublicKey[] = { 0x04, 0x97, 0x03, 0x51, 0xD3, 0xC8,
0xBB, 0x56, 0xAB, 0x9C, 0x57, 0x1F, 0x8C, 0xE4,
0x1D, 0x6B, 0xE0, 0xBB, 0xF8, 0x7D, 0x8B, 0x7B,
0xA7, 0xAB, 0xD3, 0x69, 0xEA, 0x04, 0x06, 0xEB,
0x4C, 0x1B, 0x88, 0xC5, 0xC6, 0x55, 0xEF, 0xBE,
0x10, 0x98, 0x4B, 0x7F, 0x4A, 0x90, 0x1E, 0xE7,
0xD2, 0xFF, 0x4B, 0x12, 0xAE, 0xD4, 0x97, 0x30,
0xFB, 0x2A, 0x67, 0x55, 0xEB, 0x73, 0xE0, 0x2C,
0xD4, 0x14, 0x4D};
int r = Se05x_API_WriteECKey(pSe05xSession,
NULL,
SE05x_MaxAttemps_UNLIMITED,
0x00000100UL,
kSE05x_ECCurve_NIST_P256,
NULL,
0,
gPublicKey,
sizeof(gPublicKey),
kSE05x_AttestationType_AUTH | kSE05x_TransientType_Persistent,
kSE05x_KeyPart_Public);
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.
-------------------------------------------------------------------------------