[tor-bugs] #16794 [Core Tor/Tor]: All cryptography unit test coverage should be over 95%; all should have test vectors

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 12 19:41:04 UTC 2016


#16794: All cryptography unit test coverage should be over 95%; all should have
test vectors
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:  nickm
     Type:  enhancement                          |         Status:
 Priority:  Medium                               |  needs_review
Component:  Core Tor/Tor                         |      Milestone:  Tor:
 Severity:  Normal                               |  0.2.9.x-final
 Keywords:  testing, 028-triage, tor-tests-      |        Version:
  coverage, tor-tests-unit, TorCoreTeam201605,   |     Resolution:
  review-group-1                                 |  Actual Points:
Parent ID:  #16791                               |         Points:  medium
 Reviewer:  isis                                 |        Sponsor:
                                                 |  SponsorS-can
-------------------------------------------------+-------------------------

Comment (by ahf):

 While working on Talla, I had a ton of troubles getting the code for the
 x25519-to-ed25519 algorithm to work because I was using libsodium, which
 is incompatible with Tor's ed25519 implementation. I ended up implementing
 a modified version of the Ed25519 code (from DJB's  Python reference
 implementation) in "pure" Erlang.

 During this process I generated a few test vectors for my (hopefully)
 correct, but slow code, to ensure that when I was done porting Tor's
 ed25519-ref10 implementation to an Erlang native function that I would be
 able to verify that it was giving the same result.

 The test vectors can be found here:
 https://lab.baconsvin.org/talla/onion/blob/develop/src/onion_ed25519.erl#L272-302

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


More information about the tor-bugs mailing list