[tor-bugs] #24659 [Core Tor/Tor]: Wrap our sha2 interface in Rust which implements the appropriate traits

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Apr 18 01:05:37 UTC 2018


#24659: Wrap our sha2 interface in Rust which implements the appropriate traits
-------------------------------------------------+-------------------------
 Reporter:  isis                                 |          Owner:  isis
     Type:  enhancement                          |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.4.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  rust, tor-crypto, review-group-34,   |  Actual Points:
  034-triage-20180328                            |
Parent ID:                                       |         Points:  1
 Reviewer:  nickm                                |        Sponsor:
                                                 |  Sponsor3-can
-------------------------------------------------+-------------------------

Comment (by isis):

 Replying to [comment:17 nickm]:
 > Added some initial thoughts on the code. I don't have much in the way of
 thinking about the linking issues though -- let me know if you want me to
 hack on those, or if we should merge without them and have them be a
 separate issue?

 Thanks!

 So our options are:

 1. hack on the linking stuff (and/or solve #25386)
 2. not test any code which needs to call/use hash functions
 3. add a dev-dependency to the Cargo.toml for the sha2 crate for use only
 in tests (e.g. do `#[cfg(test)] pub type Sha256 = sha2::Sha256;` or
 something)
 4. write a crappy, slow sha2 implementation, for use only in tests

 Not sure what's the least painful, but I really dislike !#2.

 I guess we could merge now, if you think that's okay, and say that the XOF
 stuff is a new ticket, and also the linking/testing thing is another
 issue? I'm somewhat inclined to go with !#3, mostly because I don't really
 want to have to do !#4 (and then also implement keccak when the time
 comes).

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


More information about the tor-bugs mailing list