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

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 26 17:13:28 UTC 2018

#24658: Split/refactor crypto.h into smaller separate modules
 Reporter:  isis                                 |          Owner:  (none)
     Type:  enhancement                          |         Status:
                                                 |  needs_review
 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-29                                       |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor8-can
Changes (by ffmancera):

 * status:  new => needs_review


 I have been working on splitting the RSA module from crypto.[ch]. It is
 working now and all tests pass succesfully, also Travis CI seems happy. I
 have some notes in order to do the patch easier to review.

  1. `crypto.h` is included in `crypto_rsa.c` because we need common
 functions as memwipe and the digest module. This include should be removed
 when we split common and digest modules (xof+digest as we decided).

  2. I didn't consider `crypto_pk_obsolete_public_hybrid_encrypt()` and
 `crypto_pk_obsolete_private_hybrid_decrypt()` as part of the RSA module.

  3. `crypto_get_rsa_padding_overhead()` and `crypto_get_rsa_padding()` are
 not `static inline` anymore, I think we should discuss that.

 I hope it isn't really hard to review, check my github
 [https://github.com/ffmancera/tor-1/tree/bug24658-rsa branch bug24658-rsa]

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

More information about the tor-bugs mailing list