Hi,

Dont know if you got around to figure this out.
I believe first half of total signature is 'r', second half is 's'.

R

On Sun, Sep 12, 2010 at 4:23 PM, Bobby Salazar <[email protected]> wrote:

> Hello,
>
> I'm using the following code sample to create an ECDSA signature:
>
>    ECP curve( _p, _a, _b );
>    ECP::Point G( _gx, _gy );
>
>    ECDSA<ECP, SHA1>::PrivateKey privateKey;
>    privateKey.Initialize( curve, G, _n, _d );
>
>    AutoSeededRandomPool prng;
>
>    result = privateKey.Validate( prng, 3 );
>    //assert( true == result );
>    if( !result ) { return false; }
>
>    ECDSA<ECP,SHA1>::Signer signer(privateKey);
>
>    StringSource( message, messageSize, true /* pump all */,
>        new SignerFilter( prng, signer,
>            new StringSink( sig ),
>            true /* complete message */
>        ) // SignerFilter
>    ); // StringSource
>
>    // The message is *prepended* to the signature
>    sig.erase( 0, messageSize );
>
>    // HexEncode the binary signature
>    StringSource( sig, true,
>      new HexEncoder( new StringSink( signature ) )
>    );
>
>
>
> This gives me a hex string containing the signature. Can anyone tell
> me how I would breakdown the resulting hex string into the signature
> pairs (r,s) instead of having the long hex string?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the "Crypto++
> Users" Google Group.
> To unsubscribe, send an email to
> [email protected].
> More information about Crypto++ and this group is available at
> http://www.cryptopp.com.

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to