1

(1 replies, posted in wolfCrypt)

I want to convert the signature  R and S portions of an ECC signature into a DER-encoded ECDSA signature

ret = wc_ecc_sign_hash(Random, u8RandLen, out, &x, &rng, &cliKey); 
 
//To convert ecc signature to r and s
  ret = wc_ecc_sig_to_rs(out,x,r,&sr,s,&ss);  (Till this it is working fine)




but while trying to  convert back with below function I am getting 0xFFFFFF87 as return status. Please help.
  x =sizeof(out);

ret = wc_ecc_rs_to_sig(r,s,out,&x);

Regards,
Manoj Chandran R

2

(2 replies, posted in wolfCrypt)

Hi Chris,

i could solve the issue. It was the header bytes.

0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2A, 0x86,
0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A,
0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03,
0x42, 0x00, 0x04,

The above bytes where header and the below was the key - 64 byte.

0xC4, 0xFA, 0x2F, 0xB4, 0x67,
0x1B, 0xCF, 0x52, 0x71, 0xB6, 0x4C, 0x8D, 0xC2,
0x98, 0x03, 0x48, 0x5E, 0xE9, 0x74, 0x43, 0xB1,
0x99, 0xFC, 0x55, 0xFD, 0x40, 0x58, 0x17, 0xA7,
0x67, 0x65, 0xA4, 0x1B, 0xE1, 0x34, 0xFA, 0xB6,
0xE0, 0xC1, 0xAA, 0x2A, 0xC8, 0x01, 0xF3, 0xD7,
0xC7, 0x41, 0xCD, 0xB7, 0x67, 0x77, 0x62, 0x7D,
0x97, 0x0F, 0x0B, 0xB6, 0xC5, 0xE8, 0x0F, 0xB3,
0xB1, 0x1E, 0xAB,

Thanks and regards,
Manoj

3

(2 replies, posted in wolfCrypt)

Hi,

I our project, we have two embedded hardware (STM32F4) based modules. In Module-1  we are using wolfSSL library and in Module-2 we are using Atmel's cryptoAuthLib. We are finding some interoperability issue in the public key size format. The public key generated in the wolfSSL is 91 Byte size and Public key generated by ATECC508 is 64 Bytes. Can you please help me in converting the format of public Key and Private key, ie from 91 byte format to 64 byte format or vice versa.

Thanks and regards,
Manoj Chandran R

Hi,

I want to generate Public key and Private Key in DER format. I was able to generate  ecc key using  wc_ecc_make_key function. Please help me to identify a API to generate Public key and Private Key DER array.

Thanks
Manoj