[gnutls-help] How to encode/decode ECDSA signatures to raw format

Nicolas Mora nicolas at babelouest.org
Fri May 26 17:55:09 CEST 2017


Le 2017-05-26 à 03:05, Nikos Mavrogiannopoulos a écrit :
> The integers returned by that function are (left) zero-padded to avoid
> having them interpreted as negative integers. About the size being 48
> or 49 irrespective of key, it seems something is wrong there. Most
> likely you are using the SECP384 curve. If not could you send a small
> reproducer?
> 
Oooooohhhh I think you're right, I was using bad certificates for my 
tests...

For some reason, sometimes I have r.size that is less than the expected 
size. But I assume this is not a bug and I add 0 padding to complete the 
signature.

Thanks a lot for your help, very much appreciated!

/Nicolas Mora



More information about the Gnutls-help mailing list