I am trying to generate an ECDSA signature using ARM's CryptoCell 310 (hardware cryptography module) and verify the signature using mbedTLS software library.
The harware module documentation says that the ECDSA is performed according to ANS X9.62 standard.
The cryptocell generated signature for SECP256R1 is 64 bytes long and looks like this:
I need to convert it into DER encoded signature so that mbedTLS can verify it, but I don't know how the R and S parameters are encoded in it. I have tried to take first half of that string as the R parameter, second half as S and encode it to DER like this:
Unfortunately it didn't work. I have also tried to do big/little endian swaps, trying the second half as R and first as S, but it still didn't work.
I have tried to obtain the X9.62 standard, but couldn't find anything about the encoding.
Does anyone know what encoding is that?
Thanks in advance.