rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
885 stars 209 forks source link

Switch to C++11 MRT RNG for random bytes #185

Closed lps-rocks closed 5 years ago

lps-rocks commented 5 years ago

Switching to a better RNG for generating strings will prevent the common peerID collisions the rTorrent client has been seeing for YEARS in https://github.com/rakshasa/rtorrent/issues/440 and https://github.com/rakshasa/rtorrent/issues/318.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.004%) to 17.893% when pulling 2291160d9576616b132e3c484a054ae8c9ecccd6 on lps-rocks:master into 3a6a61a4138048134f9048aef81a52f9bf821b29 on rakshasa:master.

lps-rocks commented 5 years ago

lol .004% ...🖕@coveralls 🖕

lps-rocks commented 5 years ago

@rakshasa - you gonna merge or comment on this? It's desperately needed as a first real step to fix the random data generation in libtorrent

rakshasa commented 5 years ago

@rakshasa - you gonna merge or comment on this? It's desperately needed as a first real step to fix the random data generation in libtorrent

I think I'll be merging a lot of stuff in the near future, I'll consider this one too.

I'd prefer the RNG stuff be done in libtorrent under 'utils/random.h'.