Hello ,
I have used following code to generate key.
CryptoPP::AutoSeededRandomPool rng;
CryptoPP::InvertibleRSAFunction parameters;
parameters.GenerateRandomWithKeySize( rng, 1024 );
CryptoPP::RSA::PrivateKey privateKey( parameters );
CryptoPP::RSA::PublicKey publicKey( parameters );
This code works fine for encryption/deception on single application.
But when i tried to send encrypted message,
from one computer to another computer. Then it failed to decrypt.
And error message is following :
terminate called after throwing an instance of 'CryptoPP::InvalidCiphertext'
what(): RSA/OAEP-MGF1(SHA-1): invalid ciphertext
fish: “./CryptoPP” terminated by signal SIGABRT (Abort)
How to fix such thing?