How to encode R and S of an ECDSA signature to ASN1 sequence

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to encode R and S of an ECDSA signature to ASN1 sequence

William Roberts
I can successfully deconstruct an an ECDSA Signature Sequence, but now I need
to construct it, and I am getting lost.

The format I need to build is:
sECDSA-Sig-Value ::= SEQUENCE { r INTEGER, s INTEGER }

I have r and s as buffers in the same format as returned from:
d2i_ASN1_INTEGER() if one used it to remove r or s from the sequence above.

I am not sure how to compose the sequence given r and s, and if their is a routine to
essentially do the opposite of d2i_ASN1_INTEGER.

Thanks,
Bill

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users