[tor-bugs] #24658 [Core Tor/Tor]: Split/refactor crypto.h into smaller separate modules

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 16 00:42:55 UTC 2018


#24658: Split/refactor crypto.h into smaller separate modules
-------------------------------------------------+-------------------------
 Reporter:  isis                                 |          Owner:
                                                 |  ffmancera
     Type:  enhancement                          |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-crypto, refactor, review-        |  Actual Points:
  group-32                                       |
Parent ID:                                       |         Points:
 Reviewer:  isis                                 |        Sponsor:
                                                 |  Sponsor8-can
-------------------------------------------------+-------------------------
Changes (by isis):

 * status:  needs_review => needs_revision


Comment:

 Can confirm that the errors in Travis were due to #25127, [https://travis-
 ci.org/isislovecruft/tor/builds/341674383 rebasing onto the latest master
 fixes the CI builds].

 A couple things about the RSA code:

 1. Maybe remove the `crypto_curve25519.h` included in `crypto_rsa.c`?
 2. `crypto_curve25519.h` is included in both `crypto_rsa.c` and
 `crypto_rsa.h`.
 3. Maybe remove the `crypto_ed25519.h` included in `crypto_rsa.c`?
 4. Why didn't `crypto_pk_obsolete_public_hybrid_encrypt()` or
 `crypto_pk_obsolete_private_hybrid_decrypt()` move from `crypto.[ch]` to
 `crypto_rsa.[ch]`?

 And just one small note on the digest code:

 1. Maybe move the `crypto_pk_*` functions into `crypto_rsa.[ch]`? It
 probably would not occur to me to look for key fingerprint, signing, and
 verification functions in a file called `crypto_digest.c`, even though all
 those tasks do use digests.

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


More information about the tor-bugs mailing list