[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #23415 [Core Tor/Tor]: sample_laplace_distribution() should take multiple random inputs
#23415: sample_laplace_distribution() should take multiple random inputs
-------------------------------------------------+-------------------------
Reporter: teor | Owner: (none)
Type: defect | Status:
| needs_revision
Priority: Medium | Milestone: Tor:
| 0.3.2.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.2.8.1-alpha
Severity: Normal | Resolution:
Keywords: tor-relay, security-low, privcount, | Actual Points:
031-backport, 030-backport, 029-backport, 028 |
-backport-maybe, 026-backport-maybe |
Parent ID: #23061 | Points: 0.5
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Changes (by teor):
* status: needs_review => needs_revision
Comment:
Replying to [comment:3 catalyst]:
> Wouldn't it be better to have a function that outputs a random double in
(-1.0, +1.0)? If you're only using 53 bits of entropy from a RNG call
that generates 64, there are spare bits to use for generating the sign.
sample_laplace_distribution() takes the log of a strictly positive
floating point number, and then applies a random sign.
We could use sgn() and abs() to decompose `[-1.0, 1.0]` into `{+, -}` and
`[0.0, 1.0]`, but we'd still have to reject `0.0` before doing the log,
and then apply the sign. So it seems more complex than the alternative.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23415#comment:4>
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