[tor-bugs] #3122 [Tor Client]: Write and use constant-time comparison functions
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Tue May 10 11:32:00 UTC 2011
#3122: Write and use constant-time comparison functions
-------------------------+--------------------------------------------------
Reporter: rransom | Owner: ioerror
Type: enhancement | Status: new
Priority: major | Milestone: Tor: 0.2.1.x-final
Component: Tor Client | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by rransom):
Replying to [comment:18 nickm]:
> Suggestive datum: The reported T values are high even for the function
do_nothing_at_all, which doesn't actually do anything but add all the
bytes in its inputs and return the results. This suggests a bug in the
harness or in the analysis.
The harness is broken. The purpose of using a processor's cycle counter
to time a function is to get a useful time value from a ''single''
execution of the function. If you repeat a function hundreds of times,
you dramatically increase the likelihood that the OS will interrupt the
process, thereby ruining your timings.
(That ruination is much worse if you use a cycle counter for timing on a
multi-processor system -- since only one of the processors started when
the computer was turned on, and the rest were activated later as the OS
kernel initialized its hardware drivers, the cycle counters for different
processors (even if they live on the same chip) will be skewed by ''many''
cycles. You can see this effect on some of DJB's SUPERCOP graphs.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3122#comment:19>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list