ECC key pair format

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,962件の閲覧回数
Jeff-CF-Huang
Contributor III

Hi Sir,

I can generate a ECC key pair like this.

-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgEKbBHDa1DSl01d9c
kRoXkD866VoGC+Zi8j3CsFEJB06hRANCAASAaYdAi8oA7XJR5OHjpc7DTCoQ3JYU
sCPK8LhzyHVZDVCn7YTddZztpaFD92e0TLUjLEE2shv9LXlPN1N81+Sw
-----END PRIVATE KEY-----

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgGmHQIvKAO1yUeTh46XOw0wqENyW
FLAjyvC4c8h1WQ1Qp+2E3XWc7aWhQ/dntEy1IyxBNrIb/S15TzdTfNfksA==
-----END PUBLIC KEY-----

But, I don't know  how to convert them like below example.
Is there any way/tool to do it?

/* ECC NIST-P256 Key Pair */
static uint8_t eccP256BootKeyPub[] =
{
/*Qx*/
0xd6, 0x60, 0x62, 0x71, 0x13, 0x1e, 0x7e, 0x7e, 0x61, 0x7a, 0x81, 0xaa, 0x11, 0xf0, 0x9e, 0x7e,
0xd5, 0x63, 0x11, 0x82, 0x88, 0x23, 0x36, 0x7a, 0x86, 0x9b, 0x45, 0x40, 0x40, 0xb3, 0xf9, 0x05,
/*Qy*/
0xcf, 0x48, 0x97, 0x76, 0x61, 0x31, 0xaa, 0x8b, 0x7f, 0x80, 0x45, 0x3a, 0x15, 0xbf, 0x90, 0xf7,
0x51, 0x78, 0x78, 0x57, 0x9d, 0x5a, 0x4f, 0x97, 0x3a, 0xea, 0x5b, 0xb1, 0x15, 0x42, 0xe0, 0x7f
};
static uint8_t eccP256BootKeyPriv[] =
{
/*k*/
0x00, 0xd0, 0x07, 0xe1, 0xb9, 0xaf, 0xcc, 0x31, 0x2e, 0xec, 0x9c, 0xec, 0xff, 0xa0, 0x28, 0x07,
0x52, 0xbb, 0xd1, 0x95, 0x31, 0x82, 0xed, 0xef, 0x12, 0xf3, 0xfc, 0x36, 0x6e, 0x8f, 0x43, 0x56
};

0 件の賞賛
返信
1 解決策
1,837件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for the feedback. For what we can see under the S32G tools, there is no Qx/Qy generation. It seems that you should be able to use OpenSSL for this situation, but we don't see any documentation on this specific regard (inside the S32G related documentation). We do apologize.

Please, let us know.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,918件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @Jeff-CF-Huang 

Which device are you using?

0 件の賞賛
返信
1,906件の閲覧回数
Jeff-CF-Huang
Contributor III
S32G234M & S32G399
0 件の賞賛
返信
1,838件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for the feedback. For what we can see under the S32G tools, there is no Qx/Qy generation. It seems that you should be able to use OpenSSL for this situation, but we don't see any documentation on this specific regard (inside the S32G related documentation). We do apologize.

Please, let us know.

0 件の賞賛
返信