Hi dear friends!
I'm using "Visual C++ 2008" and "CryptoPP 5.5.2" version!
I want to generate an RSA-1024 bit keypair for sign and verify in a
function of my project,there is a sample code of "generate an RSA
keypair and save it" in the "Crypto++ user's guide" by denis bider as
below:
// InvertibleRSAFunction is used directly only because the private key
// won't actually be used to perform any cryptographic operation;
// otherwise, an appropriate typedef'ed type from rsa.h would have
been used.
AutoSeededRandomPool rng;
InvertibleRSAFunction privkey(rng, 1024);
// With the current version of Crypto++, MessageEnd() needs to be
called
// explicitly because Base64Encoder doesn't flush its buffer on
destruction.
Base64Encoder privkeysink(new FileSink("c:\\privkey.txt"));
privkey.DEREncode(privkeysink);
privkeysink.MessageEnd();
// Suppose we want to store the public key separately,
// possibly because we will be sending the public key to a third
party.
RSAFunction pubkey(privkey);
Base64Encoder pubkeysink(new FileSink("c:\\pubkey.txt"));
pubkey.DEREncode(pubkeysink);
pubkeysink.MessageEnd();
But this code is applied for previous versions of "Cryptopp" library
and doesn't match with "CryptoPP 5.5.2" version!
Also,this code locates Generated keys in a file,but I want to locate
generated keys in two byte arrays.
I've studied "Reference" and I have found that should use of
"BufferedTransformation" type,but I don't know how to use it,because I
have no sample code of using it.
So far,I have not had any experience to implementing a cryptographic
scheme using "Cryptopp" library and really don't know what should I
do?!
I have really spent so much time on it, but I couldn't write any code!
I greatly ask you help me with some sample codes about "generate
RSA-1024 keypair" and "sign/verify with RSA-1024 and SHA1 hash
algorithm"
I'm so new to "Cryptopp" library and need to help as soon as
possible,hence ask you help me!
Thanks in Advance.
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---