[tor-bugs] #23061 [Core Tor/Tor]: crypto_rand_double() should produce all possible outputs on platforms with 32-bit int

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Nov 8 21:32:24 UTC 2017


#23061: crypto_rand_double() should produce all possible outputs on platforms with
32-bit int
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  nickm
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.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, 026-backport-maybe, review-   |
  group-22                                       |
Parent ID:  #23126                               |         Points:  0.1
 Reviewer:                                       |        Sponsor:
                                                 |  SponsorQ
-------------------------------------------------+-------------------------

Comment (by teor):

 Replying to [comment:45 catalyst]:
 > Section 5.2 of
 https://pdfs.semanticscholar.org/2f2b/7a0d5000a31f7f0713a3d20919f9703c9876.pdf
 describes one way to sample uniformly from all the representable floating
 point numbers in [0, 1).  It's not clear to me whether including the
 numbers with ULPs less than 2^-53^ is required for the success of the
 snapping mitigation described in that paper.

 It isn't required, and might even be counterproductive.
 The floating point numbers in the proof in section 5.2 are of the form
 N*2^-53^, N integer.
 (The proof uses a significand of 52 bits, and refers to 2^-53^
 repeatedly.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23061#comment:46>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list