[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #23061 [Core Tor/Tor]: crypto_rand_double() should produce all possible outputs on platforms with 32-bit int
#23061: crypto_rand_double() should produce all possible outputs on platforms with
32-bit int
-------------------------------------------------+-------------------------
Reporter: teor | Owner: nickm
Type: defect | Status:
| needs_review
Priority: Medium | Milestone: Tor:
| 0.3.2.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.2.2.14-alpha
Severity: Normal | Resolution:
Keywords: tor-relay, security-low, privcount, | Actual Points: 0.5
031-backport, 030-backport, 029-backport, 028 |
-backport-maybe, 027-backport-maybe, 026 |
-backport-maybe, review-group-22 |
Parent ID: | Points: 0.1
Reviewer: | Sponsor:
| SponsorQ
-------------------------------------------------+-------------------------
Comment (by nickm):
Okay, I've tried it out, and gotten some results. Apparently when
Yawning's code above is used, Teor's tests no longer report that 53 bits
of mantissa are set -- only 52 bits are set. I think this is okay, but
can we do better? See branch here for more: `feature23061_v2_yawning`.
I tried the ldexp() trick too, but that fails the test that
`uint64_to_dbl_0_1(UINT64_MAX) < 1.0` if have all four ldexp() calls. If
I remove the lowest-magnitude one, it's fine, but of course we only get 48
bits.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23061#comment:21>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs