mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
cd57a10c90
The problem actually exists in two parts: 1. When sending chunks over a connection, if the queue size is greater than N, the seed is predictable across every monero node. >"If rand() is used before any calls to srand(), rand() behaves as if it was seeded with srand(1). Each time rand() is seeded with the same seed, it must produce the same sequence of values." 2. The CID speaks for itself: "'rand' should not be used for security-related applications, because linear congruential algorithms are too easy to break." *But* this is an area of contention. One could argue that a CSPRNG is warranted in order to fully mitigate any potential timing attacks based on crafting chunk responses. Others could argue that the existing LCG, or even an MTG, would suffice (if properly seeded). As a compromise, I've used an MTG with a full bit space. This should give a healthy balance of security and speed without relying on the existing crypto library (which I'm told might break on some systems since epee is not (shouldn't be) dependent upon the existing crypto library). |
||
---|---|---|
.. | ||
demo | ||
include | ||
src | ||
tests | ||
CMakeLists.txt | ||
LICENSE.txt | ||
README.md |
epee - is a small library of helpers, wrappers, tools and and so on, used to make my life easier.