[tor-bugs] #18856 [Core Tor/Stem]: Talk with tor's ORPort

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jul 11 10:39:23 UTC 2017


#18856: Talk with tor's ORPort
---------------------------+------------------------
 Reporter:  atagar         |          Owner:  atagar
     Type:  enhancement    |         Status:  new
 Priority:  Low            |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Minor          |     Resolution:
 Keywords:  descriptor     |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+------------------------

Comment (by teor):

 Replying to [comment:6 teor]:
 > Replying to [comment:5 atagar]:
 > > ...
 > > Is the argument that the ORPort protocol is so tricky only native code
 can talk with it? If so then this ticket indeed might be moot.
 >
 > No, I'm sure it can be done in python. It's just bit and byte
 manipulation.

 Turns out it's possible to speak tor on the command-line.

 If you run tor like this:

 {{{
 tor ORPort 12345 PublishServerDescriptor 0 AssumeReachable 1 Log "info
 stderr"
 }}}

 You can do a CREATE_FAST handshake like this:
 (The lines are the VERSIONS, NETINFO, and CREATE_FAST cells.)

 {{{
 echo 0000 07 0004 0003 0004 \
      00000000 08 59649845 04 04 7f000001 00 `cat /dev/zero | head -c 498 |
 xxd -p` \
      80000000 05 000102030405060708090a0b0c0d0e0f10111213 `cat /dev/zero |
 head -c 489 | xxd -p` \
      | xxd -r -p | openssl s_client -connect 127.0.0.1:12345 -quiet | xxd
 }}}

 Want to help me write a python version of this, atagar?

 The next step is to implement KDF-TOR [0], and that's a little beyond my
 shell scripting skills. Or use a proper CREATE/2 handshake, and implement
 KDF-RFC5869 [1]. Either way, getting beyond CREATE_FAST needs a cell
 encryption implementation.

 [0]: https://gitweb.torproject.org/torspec.git/tree/tor-spec.txt#n995
 [1]: https://gitweb.torproject.org/torspec.git/tree/tor-spec.txt#n1026

 P.S. If we want a cell-related pun for a project name, endosome, cytotype,
 chromatid, or centisome seem to have no conflicts on GitHub. Or we could
 put it in stem.

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


More information about the tor-bugs mailing list