We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS: Windows 10 19045.4529 x64 Crypto++ version: on commit (Guard use of ModularSquareRoot (GH https://github.com/weidai11/cryptopp/issues/1249[)](https://github.com/weidai11/cryptopp/commit/9aa07aebbdc62461c3ac32f958d7c3ab89ff6f73) Compiler: MSVC 17.9.34607.119 (x86)
Code:
struct KeyPair { std::string publicKey, privateKey; }; // size if 1024, 2048 or 4096 inline KeyPair GenerateRsaKeyPair(const unsigned int size) { KeyPair rsaKeyPair; CryptoPP::AutoSeededRandomPool asrp; CryptoPP::RSA::PrivateKey rsaPrivateKey; // next line causes debug break rsaPrivateKey.GenerateRandomWithKeySize(asrp, size); CryptoPP::RSA::PublicKey rsaPublicKey(rsaPrivateKey); CryptoPP::StringSink rawPrivateKeySink(rsaKeyPair.privateKey); rsaPrivateKey.DEREncode(rawPrivateKeySink); CryptoPP::StringSink rawPublicKeySink(rsaKeyPair.publicKey); rsaPublicKey.DEREncode(rawPublicKeySink); return rsaKeyPair; }
When i debug my application, this function calls debug break here:
// nbtheory.cpp:526 Integer CRT(const Integer &xp, const Integer &p, const Integer &xq, const Integer &q, const Integer &u) { // Callers must ensure p and q are prime, GH #1249 CRYPTOPP_ASSERT(IsPrime(p) && IsPrime(q)); // isn't operator overloading great? return p * (u * (xq-xp) % q) + xp; /* Integer t1 = xq-xp; cout << hex << t1 << endl; Integer t2 = u * t1; cout << hex << t2 << endl; Integer t3 = t2 % q; cout << hex << t3 << endl; Integer t4 = p * t3; cout << hex << t4 << endl; Integer t5 = t4 + xp; cout << hex << t5 << endl; return t5; */ }
AutoSeededX917RNG<CryptoPP::AES> asrp; doesn't work too.
AutoSeededX917RNG<CryptoPP::AES> asrp;
Expected behavior: rsaPrivateKey.GenerateRandomWithKeySize doesn't cause debug break.
rsaPrivateKey.GenerateRandomWithKeySize
Thanks!
The text was updated successfully, but these errors were encountered:
Fix spurious assert (GH #1279)
60f81a7
It was fast. Thanks!
Sorry, something went wrong.
Merge pull request #1 from weidai11/master
f8af69a
Fix spurious assert (GH weidai11#1279)
No branches or pull requests
OS: Windows 10 19045.4529 x64
Crypto++ version: on commit (Guard use of ModularSquareRoot (GH https://github.com/weidai11/cryptopp/issues/1249[)](https://github.com/weidai11/cryptopp/commit/9aa07aebbdc62461c3ac32f958d7c3ab89ff6f73)
Compiler: MSVC 17.9.34607.119 (x86)
Code:
When i debug my application, this function calls debug break here:
AutoSeededX917RNG<CryptoPP::AES> asrp;
doesn't work too.Expected behavior:
rsaPrivateKey.GenerateRandomWithKeySize
doesn't cause debug break.Thanks!
The text was updated successfully, but these errors were encountered: