Category : crypto++

the code below implements a working example for string encryption using RSA and cryptopp. It is an adaption of the examples available from the crypto++ wiki. The problem is that an exception is thrown if the string is large than 342. terminate called after throwing an instance of ‘CryptoPP::InvalidArgument’ what(): RSA/OAEP-MGF1(SHA-1): message length of 1000 ..

Read more

My statically linked CryptoPP code (when called via Matlab mex on Linux) jumps into the libmwflcryptocryptopp.so binary (and then it freezes). How can my code jump into a foreign .so instead of the statically linked library? from function CryptoPP::SourceTemplate<CryptoPP::FileStore>::PumpAll2 in my vcpkg_installed/…/cryptopp/filters.h:1443 it jumps into CryptoPP::BufferedTransformation::TransferAllTo2 from Matlabs own libmwflcryptocryptopp.so file. the gdb stack trace ..

Read more

I generate pair RSA keys: InvertibleRSAFunction params; params.GenerateRandomWithKeySize(rng, 4096); publicKey.Initialize(params.GetModulus(), params.GetPublicExponent()); privateKey.Initialize(params.GetModulus(), params.GetPublicExponent(), params.GetPrivateExponent()); But if I want to do it next time and use the new pair in the decryption function, it works. The text will be decrypted. How to fix that in Cryptopp? (I am using raw RSA encryption / decryption) Source: Windows ..

Read more

I’m building an application that encrypts and decrypts data. Data can be used in application as QByteArray. I use QFile for reading and writing data, and below method for decryption. StreamTransformationFilter: ciphertext length is not a multiple of block size When trying to decrypt read data i came across an error. Apparently it has something ..

Read more