[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #28837 [Core Tor/Tor]: Use openssl's SHA3 implementations when they are faster.



#28837: Use openssl's SHA3 implementations when they are faster.
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:  nickm
     Type:  enhancement                          |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.0.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.4.9
 Severity:  Normal                               |     Resolution:
 Keywords:  android startup performance          |  Actual Points:
  controller                                     |
Parent ID:  #28481                               |         Points:  .3
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor8-can
-------------------------------------------------+-------------------------
Changes (by nickm):

 * status:  accepted => needs_review


Comment:

 The branch is now `ticket28837`, with PR at
 https://github.com/torproject/tor/pull/586.

 Here are some benchmarks.

 Before (OpenSSL 1.1.1):
 {{{
 sha3-256(1): 687.92 ns per call
 sha3-256(16): 683.90 ns per call
 sha3-256(32): 677.67 ns per call
 sha3-256(64): 658.13 ns per call
 sha3-256(128): 641.06 ns per call
 sha3-256(512): 2359.19 ns per call
 sha3-256(1024): 4568.29 ns per call
 sha3-256(2048): 9001.67 ns per call
 sha3-512(1): 646.63 ns per call
 sha3-512(16): 643.29 ns per call
 sha3-512(32): 638.93 ns per call
 sha3-512(64): 629.00 ns per call
 sha3-512(128): 1175.99 ns per call
 sha3-512(512): 4537.59 ns per call
 sha3-512(1024): 8357.33 ns per call
 sha3-512(2048): 15993.35 ns per call
 }}}

 After (OpenSSL 1.1.1):
 {{{
 sha3-256(1): 514.90 ns per call
 sha3-256(16): 516.48 ns per call
 sha3-256(32): 514.68 ns per call
 sha3-256(64): 515.61 ns per call
 sha3-256(128): 521.45 ns per call
 sha3-256(512): 1573.38 ns per call
 sha3-256(1024): 3015.68 ns per call
 sha3-256(2048): 5751.61 ns per call
 sha3-512(1): 513.23 ns per call
 sha3-512(16): 517.77 ns per call
 sha3-512(32): 519.98 ns per call
 sha3-512(64): 512.96 ns per call
 sha3-512(128): 865.99 ns per call
 sha3-512(512): 2979.52 ns per call
 sha3-512(1024): 5375.05 ns per call
 sha3-512(2048): 10133.94 ns per call
 }}}

 After (OpenSSL git master):
 {{{
 sha3-256(1): 473.84 ns per call
 sha3-256(16): 480.56 ns per call
 sha3-256(32): 474.24 ns per call
 sha3-256(64): 475.56 ns per call
 sha3-256(128): 477.37 ns per call
 sha3-256(512): 1490.75 ns per call
 sha3-256(1024): 2906.49 ns per call
 sha3-256(2048): 5578.25 ns per call
 sha3-512(1): 475.24 ns per call
 sha3-512(16): 473.44 ns per call
 sha3-512(32): 473.78 ns per call
 sha3-512(64): 473.85 ns per call
 sha3-512(128): 813.76 ns per call
 sha3-512(512): 2869.84 ns per call
 sha3-512(1024): 5197.20 ns per call
 sha3-512(2048): 9873.17 ns per call
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28837#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