[tor-bugs] #2732 [Tor Hidden Services]: Simplify hid_serv_responsible_for_desc_id (was: Audit hid_serv_responsible_for_desc_id)
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Mon Mar 14 10:26:27 UTC 2011
#2732: Simplify hid_serv_responsible_for_desc_id
---------------------------------+------------------------------------------
Reporter: rransom | Owner: rransom
Type: defect | Status: assigned
Priority: major | Milestone: Tor: 0.2.1.x-final
Component: Tor Hidden Services | Version:
Keywords: | Parent:
Points: | Actualpoints:
---------------------------------+------------------------------------------
Changes (by rransom):
* status: new => assigned
* priority: critical => major
Comment:
Currently, `hid_serv_responsible_for_desc_id`:
1. calls `hid_serv_acting_as_directory` to check that the relay is
configured as a hidden service directory, and that the relay is listed in
the consensus with the HSDir flag (and returns 0 otherwise);
2. calls `hid_serv_get_responsible_directories` to get a list of up to
`REND_NUMBER_OF_CONSECUTIVE_REPLICAS` (currently 3) HSDir nodes whose
‘identity digest’s follow the hidden service descriptor's ‘descriptor ID’;
3. uses `rend_id_is_in_interval` to verify that the relay's ‘identity
digest’ is in the circular interval after the HS ‘descriptor ID’ and
before or equal to the ‘identity digest’ of the last relay in the list
returned by `hid_serv_get_responsible_directories` (and returns 0
otherwise). (Note that this relies on the undocumented fact that
`hid_serv_get_responsible_directories` adds relays to the list in the
order in which it encounters them.)
This is equivalent to the following (much simpler) behaviour:
1. Call `hid_serv_get_responsible_directories` to get a list of all relays
responsible for the ‘descriptor ID’, then
2. return 1 if this relay is in the resulting list, or 0 if it is not.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2732#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list