Skip to content
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

No weak rng #718

merged 5 commits into from Mar 1, 2019


None yet
4 participants
Copy link

commented Feb 20, 2019

No description provided.

nmathewson added some commits Feb 19, 2019

Implement code to manage a per-thread instance of crypto_fast_rng()
The subsystems API makes this really simple, fortunately.

Closes ticket 29536
Remove all uses of weak_rng.
I'm not removing the weak_rng code itself yet, since it is possible
that we will want to revert one of these.
@@ -122,7 +124,8 @@ crypto_fast_rng_new(void)
* long.
* Note that this object is NOT thread-safe. If you need a thread-safe
* prng, use crypto_rand(), or wrap this in a mutex.
* prng, you should probably look at get_thread_fast_rng(). Alternatively,
* use crypto_rand(), wrap this in a mutex.

This comment has been minimized.

Copy link

teor2345 Feb 21, 2019



Suggested change
* use crypto_rand(), wrap this in a mutex.
* use crypto_rand(), and wrap this in a mutex.

This comment has been minimized.

Copy link

commented Feb 21, 2019

Pull Request Test Coverage Report for Build 4052

  • 20 of 25 (80.0%) changed or added relevant lines in 5 files are covered.
  • 1374 unchanged lines in 14 files lost coverage.
  • Overall coverage increased (+0.01%) to 61.72%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/mainloop/cpuworker.c 0 1 0.0%
src/core/or/relay.c 0 1 0.0%
src/lib/crypt_ops/crypto_init.c 2 3 66.67%
src/lib/crypt_ops/crypto_rand_fast.c 17 19 89.47%
Files with Coverage Reduction New Missed Lines %
src/core/or/relay.c 1 49.41%
src/core/crypto/hs_ntor.c 3 97.83%
src/lib/crypt_ops/crypto_digest.c 4 97.94%
src/feature/rend/rendcache.c 6 93.02%
src/feature/dirauth/voteflags.c 10 35.68%
src/feature/hs/hs_control.c 19 66.67%
src/feature/hs/hs_common.c 31 83.28%
src/feature/relay/router.c 31 40.06%
src/feature/rend/rendparse.c 83 46.28%
src/feature/rend/rendcommon.c 96 56.06%
Totals Coverage Status
Change from base Build 3880: 0.01%
Covered Lines: 45333
Relevant Lines: 73450

💛 - Coveralls

@torproject-pusher torproject-pusher merged commit 64f5944 into torproject:master Mar 1, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.