-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
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
unit_tests: use valid key images, pub keys, etc #4186
Conversation
Getting "Wrong result" on the cncrypto tests. https://build.getmonero.org/builders/monero-static-ubuntu-amd64/builds/4856/steps/test/logs/LastTest |
Those are the ones that are dependent on the exact determinism of the PRNG, and master has a patch which changes the generation of 32 byte values to remove a slight bias. The tests are fixed in my patch to change the RNG to use libsodium. If it doesn't go in, I'll split the tests part off and PR it. |
aka, fixed if you also apply #4159. |
c8226ad unit_tests: use valid key images, pub keys, etc (moneromooo-monero)
crypto::chacha_key chacha_key; | ||
memcpy(&chacha_key, key, CHACHA_KEY_SIZE); | ||
uint64_t password = crypto::rand<uint64_t>(); | ||
crypto::generate_chacha_key(std::string((const char*)&password, sizeof(password)), chacha_key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appears to be missing the number of KDF rounds which breaks test
Is there something wrong with the test in ringdb.cpp:50? monero/tests/unit_tests/ringdb.cpp: In function ‘crypto::chacha_key generate_chacha_key()’: monero/src/crypto/chacha.h:90:15: note: candidate: ‘void crypto::generate_chacha_key(std::__cxx11::string, crypto::chacha_key&, uint64_t)’ |
Seem the change to add the KDF param was added in PR #4103 |
Thanks for reporting, #4272 |
No description provided.