[tor-bugs] #9663 [Tor]: Table-based basepoint multiply optimizations for ntor handshake

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Sep 12 01:25:04 UTC 2013


#9663: Table-based basepoint multiply optimizations for ntor handshake
-----------------------------+----------------------------------------
     Reporter:  nickm        |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  normal       |  Milestone:  Tor: 0.2.5.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  tor-relay performance ntor
Actual Points:               |  Parent ID:  #9662
       Points:               |
-----------------------------+----------------------------------------

Comment (by nickm):

 I've played with this somewhat, and have noticed an interesting
 phenomenon.  In benchmarks, the curved25519_basepoint_scalarmult function
 from ed25519-donna shaves something like 20 usec off public key generation
 on my laptop.  You might think that would shave 20 usec off the server-
 side ntor handshake, but you'd be wrong: the server-side ntor handshake
 becomes about 10 usec _slower_.  My best theory so far is that this is
 because of the large set of tables that need to get loaded into L1 cache.

 If that's the case, this in turn suggests that we should implement #9664,
 and calculate ephemeral public keys in bulk ahead of time.

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


More information about the tor-bugs mailing list