[tor-bugs] #31369 [Core Tor/Stem]: HSv3 descriptor support in stem

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Aug 27 00:05:05 UTC 2019


#31369: HSv3 descriptor support in stem
-----------------------------------------+-------------------------------
 Reporter:  asn                          |          Owner:  atagar
     Type:  defect                       |         Status:  reopened
 Priority:  Medium                       |      Milestone:
Component:  Core Tor/Stem                |        Version:
 Severity:  Normal                       |     Resolution:
 Keywords:  tor-hs onionbalance scaling  |  Actual Points:
Parent ID:                               |         Points:
 Reviewer:                               |        Sponsor:  Sponsor27-can
-----------------------------------------+-------------------------------

Comment (by atagar):

 > I will be working on the crypto parts of all the other tasks

 Wonderful, thanks asn!

 Unsure if it helps but here's where we validate v2 hidden service
 digests...

 https://gitweb.torproject.org/stem.git/tree/stem/descriptor/hidden_service.py#n311
 https://gitweb.torproject.org/stem.git/tree/stem/descriptor/__init__.py#n1036

 If it would be easier for you I'm happy to integrate working demos. I can
 easily make code pretty and add tests - I just need a working example of
 doing the crypto. :P

 > Damian, would you be interested in moving forward with (a) if I give you
 a full unencrypted descriptor to play with, while I'm doing the crypto
 parts above?

 Certainly, delighted to!

 > Also would it be possible to split the hidden_service.py file into two
 files (v2 and v3) so that the two codebases are isolated from each other?

 Sure, we can but honestly I don't think it makes much difference either
 way and imports are nicer as this is...

 {{{
 from stem.descriptor.hidden_service_descriptor import (
   HiddenServiceDescriptorV2,
   HiddenServiceDescriptorV3,
 )

 # ^ these lines above would become the following if we split the modle
 #
 #   from stem.descriptor.hidden_service_v2 import
 HiddenServiceDescriptorV2
 #   from stem.descriptor.hidden_service_v3 import
 HiddenServiceDescriptorV3

 print('=' * 80)
 print('Hidden Service v2 example:')
 print('=' * 80)
 print('')

 print(HiddenServiceDescriptorV2.create())

 print('')
 print('=' * 80)
 print('Hidden Service v3 example:')
 print('=' * 80)
 print('')

 print(HiddenServiceDescriptorV3.create())
 }}}

 > I'd also appreciate any hints about how to handle ed25519 certs and
 ed25519 sig verification in stem.

 Sadly I'm pretty green in this area. You already spotted our
 certificate.py's validate() method, and that's about all I know. Sorry. :(

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


More information about the tor-bugs mailing list