Hi Mo-Che,

> What's matter.
Using the verifier filter, I had the same issues. It seems I was only
able to fail a signature when I truncated the signature file. I
suspect I was using the filter incorrectly.

Try the following. It is similar to Wei's code in validate2.cpp.
ValidateRSA() starts around line 256. The signature verification takes
place around line 275. I verified that bit fiddling of the signature
file caused a failure.

bool result = pub.VerifyMessage( (byte*)message.c_str(),
    message.length(), signature, signature.size() );

if( false == result ) {
    throw std::string( "Signature Verification Failed" );
} else {
    std::cout << std::endl << "Signature Verified" << std::endl;
}

Jeff

On 2/11/08, Mo-Che Chan <[EMAIL PROTECTED]> wrote:
>
> I first download http://www.cryptopp.com/w/images/3/30/RSAKeyGen.zip
> compile it, and run it.
>
> Then I download http://www.cryptopp.com/w/images/7/74/RSASign.zip
> compile it, and run it. (Of course I use the public/private key pair
> that generated by RSAKeyGen)
>
> Then I download http://www.cryptopp.com/w/images/4/43/RSASignVer.zip
> compile it, and run it. (Of course I use the public key and signature
> that generated by previous two projects.)
>
> Everything is ok. However, after I modified one byte of the
> message.sig file, and then run RSASignVer again. The program still
> shows "Signature Verified" message. What's matter.
>

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