[tor-bugs] #22987 [Core Tor/Tor]: TAP Hybrid Encryption case 1 is used when the payload is equal to the maximum length

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jul 20 02:06:01 UTC 2017


#22987: TAP Hybrid Encryption case 1 is used when the payload is equal to the
maximum length
------------------------------+--------------------------------
     Reporter:  teor          |      Owner:  teor
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.2.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  tor-spec
Actual Points:                |  Parent ID:  #18856
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 The spec says:
 {{{
 -      1. If M is less than PK_ENC_LEN-PK_PAD_LEN, pad and encrypt M with
 PK.
 +      1. If M is less than or equal to PK_ENC_LEN-PK_PAD_LEN, pad and
 encrypt M with PK.
 }}}
 https://gitweb.torproject.org/torspec.git/tree/tor-spec.txt#n117

 (We'll need to fix the line wrapping here as well.)

 But the code does:
 {{{
   if (!force && fromlen+overhead <= pkeylen) {
 }}}
 https://gitweb.torproject.org/tor.git/tree/src/common/crypto.c#n1262

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


More information about the tor-bugs mailing list