Hi Bob,

> FYI, i use a keylength of 4096 bit

Key size should not matter.


> It seems that the RsaSignFile method  (taken from test.cpp) returns
> different values depending on the compilation mode (release or debug).

This is usually attributed to the person using the library :)

Below is the boiler plate code I use when I need a signature
implementation. It is using Digital Signature with Appendix. By the
way, I do not use SignerFilters.

Jeff

///////////////////////////////////////
// Quote of the Day
//   Stephen Hawking
std::string message( "I think computer viruses should count as life. I
think it\n" \
   " says something about human nature that the only form of\n" \
   " life we have created so far is purely destructive. We've\n" \
   " created life in our own image." );

///////////////////////////////////////
// Pseudo Random Number Generator
AutoSeededRandomPool rng;

///////////////////////////////////////
// Key Generation
CryptoPP::InvertibleRSAFunction keys;
keys.GenerateRandomWithKeySize( rng, 384 );

///////////////////////////////////////
// Signature
RSASS< PKCS1v15, SHA >::Signer signer( keys );

// Set up for SignMessage()
byte* signature = new byte[ signer.MaxSignatureLength() ];
if( NULL == signature ) { return -1; }

// Sign...
size_t length = signer.SignMessage( rng, (const byte*) message.c_str(),
   message.length(), signature );

///////////////////////////////////////
// Verification
RSASS< PKCS1v15, SHA >::Verifier verifier( signer );

bool result = verifier.VerifyMessage( (const byte*)message.c_str(),
   message.length(), signature, length );

///////////////////////////////////////
// Result
if( true == result )
{
   cout << "Message Verified" << endl;
}
else
{
   cout << "Message Verification Failed" << endl;
}

if( NULL != signature ) { delete[] signature; }</PRE>


On 9/13/07, Bob Doppens <[EMAIL PROTECTED]> wrote:
>
> FYI, i use a keylength of 4096 bit
>
> On 12 sep, 12:33, Bob Doppens <[EMAIL PROTECTED]> wrote:
> > Hi Jeff,
> >
> > I had a look at the page you provided, altough i can't recognize any
> > implementation flaws on my side, could you please shed some further
> > light into this?
> >
> > Thanks,
> > Bob
> >
[ SNIP ]

--~--~---------~--~----~------------~-------~--~----~
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