Crypto++ includes a function for converting DSA signature formats. See
DSAConvertSignatureFormat() in dsa.h.
----- Original Message -----
From: "greatx" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, April 05, 2006 8:00 AM
Subject: Re: ECDSA Signature problem
I solved the problem... The signature I received in ASN1 as a
ECDSA-Sig-Value
needs to be converted into raw bytes for crypto++ VerifySignature().
I did this by concatenating r and s, but before concatenating, I had to
remove the leading zeroes from the ASN1 integers, for example:
-Original data:
SEQUENCE : <-- Signature bytes start here (inside OCTET STRING)
INTEGER :
0091C2CBF2B8DEED12C3DA9DCC4AE839EFD66A31281C6D03431F6BA31C <--- r
INTEGER :
22D627F4D7C459DD341CB28AB08A6F6FF09B4A6226FB2BD1BD7165EC <---
s
-concatenate r+s without leading zeroes:
91C2CBF2B8DEED12C3DA9DCC4AE839EFD66A31281C6D03431F6BA31C22D627F4D7C459DD341CB28AB08A6F6FF09B4A6226FB2BD1BD7165EC
--
View this message in context:
http://www.nabble.com/ECDSA-Signature-problem-t1388840.html#a3766431
Sent from the Crypto++ forum at Nabble.com.