[tor-bugs] #23577 [Core Tor/Tor]: Make setup_introduce1_data() take a node instead of an extend_info

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 4 05:37:46 UTC 2017


#23577: Make setup_introduce1_data() take a node instead of an extend_info
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  (none)
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  prop224, tor-hs, single-onion, ipv6  |  Actual Points:
Parent ID:  #23493                               |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by teor):

 Replying to [comment:6 neel]:
 > I am working on a new patch, but I have two questions:
 >
 > 1. For the IPv6 check, I am making use of the function
 {{{link_specifier_set_un_ipv6_addr()}}}, and it has a parameter {{{size_t
 idx}}}. What is the {{{idx}}} parameter and what is it used for?

 I'd suggest you copy the IPv6 code out of hs_desc_lspec_to_trunnel().
 We'll fix up the duplicate code in #23759.

 > 2. I am introducing two new functions:
 >   a. {{{ curve25519_pubkey_eq()}}} in
 {{{src/common/crypto_curve25519.c}}} and
 {{{src/common/crypto_curve25519.h}}}

 I don't think you need to implement this function.

 >   b. {{{ node_get_curve25519_id()}}} in {{{src/or/nodelist.c}}} and
 {{{src/or/nodelist.h}}}

 If I'm guessing correctly, you're writing node_get_curve25519_id() by
 copying and modifying node_get_ed25519_id().

 But the curve25519 key is an encryption key, not an authentication id.

 And it's much easier to find in a node:
 1. If there's an ri, use the curve25519 key from it
 2. If there's an md, use the curve25519 key from it
 3. Otherwise, the entire function should fail and return NULL

 See the last few lines of extend_info_from_node() for an example, or copy
 and modify node_has_curve25519_onion_key().

 >  Do I need to implement a regression test for these two functions?

 node_get_curve25519_key() would be useful, and we might want to refactor
 other code to use it. I'll open a child ticket for this task.

 > I hope you can respond in a timely manner.

 I'm on leave right now, and then there's a meeting next week, so it might
 take some time for me to reply.

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


More information about the tor-bugs mailing list