It is easier to just pad your prehashed data manually according to PKCS#1 and then do a raw encrypt with the private key:
<code> CryptoPP::RSA::PrivateKey mPrivateKey; length = mPrivateKey.GetModulus().ByteCount(); byte tmp[length]; Pad(tmp, length, inData, inLength); //Pad the data CryptoPP::Integer m(tmp, length); //Encode the message CryptoPP::Integer c = mPrivateKey.ApplyFunction(m); // Calculate c CryptoPP::Integer cInv = mPrivateKey.CalculateInverse(rng, c); //Inverse c for (int i = 0; i < cInv.ByteCount() ; i++) tmp[i] = cInv.GetByte(i); outData = tmp; </code> -- -- 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. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
