Hello Everyone,
I am currently having trouble setting up crypto++ on ubuntu.. Make
works fine, but when i try make install, I get the following error:
# make install
==================================================
ERROR :
cp *.h /usr/include/cryptopp
cp *.a /usr/lib
cp *.so /usr/lib
cp: cannot stat `*.so': No such file or directory
make: *** [install] Error 1
===================================================
But somehow i'm able to verify the installation using the following
commands:
> whereis cryptest.exe
> whereis libcryptopp.a
After this I assumed that it is installed and went about trying the
samples for RSA given on the wiki.. Even though I had no problem
compiling it, I am getting segmentation fault when i try to run it.
To be more specific, I am trying to run this piece of code from the
wiki:
////////////////////////////////////////////////
// Generate keys
AutoSeededRandomPool rng;
InvertibleRSAFunction params;
params.GenerateRandomWithKeySize(rng, 3072);
RSA::PrivateKey privateKey(params);
RSA::PublicKey publicKey(params);
string plain="RSA Encryption", cipher, recovered;
////////////////////////////////////////////////
// Encryption
RSAES_OAEP_SHA_Encryptor e(publicKey);
StringSource(plain, true,
new PK_EncryptorFilter(rng, e,
new StringSink(cipher)
) // PK_EncryptorFilter
); // StringSource
////////////////////////////////////////////////
// Decryption
RSAES_OAEP_SHA_Decryptor d(privateKey);
StringSource(cipher, true,
new PK_DecryptorFilter(rng, d,
new StringSink(recovered)
) // PK_DecryptorFilter
); // StringSource
cout << "Recovered plain text" << endl;
I think I am getting a segmentation error due to StringSource, but I'm
not able to figure out why. I'm new to crypto++ and relatively new to c
++ too.
Please help me out by getting me through this hurdle.
Thanks,
Nitin
--
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.