<div dir="ltr"><div>Frank, Yes the identity digest is the sha1 hash/digest of the OR public key. This router fingerprint is this hash base16 encrypted. In the case of finding responsible hidden service directories, the Tor client just sorts all routers with the HSDir by the raw binary encoding of the public key digest / identity digest.<br>
<br></div>Yes I think if you base64 decode the digest fields of the HSDIR's in the consensus they are the identitity digests you can sort by.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 28, 2013 at 11:11 AM, Frank Young <span dir="ltr"><<a href="mailto:pfcodes@gmail.com" target="_blank">pfcodes@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes you are right, after decoding that value from base64 and<br>
re-encoding it in base16, it can be used to get the router's<br>
descriptor.<br>
What i'm trying to get is the list of HSDIR responsible for a hidden service.<br>
After calculating the descriptor for the hidden service, i need to<br>
know the identity digest of all the HSDIR in the consensus, so that i<br>
can sort them and get the three which are responsible for the<br>
descriptor id.<br>
I base64 decoded the digest fields of HSDIR in the consensus and<br>
assume those are the identity digest which i can sort.<br>
I'm i correct?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 4/27/13, Damian Johnson <<a href="mailto:atagar@torproject.org">atagar@torproject.org</a>> wrote:<br>
>> In a consensus, the item after nickname is  base64 encoded "hash of a<br>
>> router's identity key"<br>
>> If this item is base64 decoded, is it the same as the "identity<br>
>> digest" of the router?<br>
><br>
> Hi Frank. That field is the relay's fingerprint. Here's the code stem<br>
> uses for parsing that line...<br>
><br>
> <a href="https://gitweb.torproject.org/stem.git/blob/HEAD:/stem/descriptor/router_status_entry.py#l469" target="_blank">https://gitweb.torproject.org/stem.git/blob/HEAD:/stem/descriptor/router_status_entry.py#l469</a><br>

> _______________________________________________<br>
> tor-dev mailing list<br>
> <a href="mailto:tor-dev@lists.torproject.org">tor-dev@lists.torproject.org</a><br>
> <a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
><br>
_______________________________________________<br>
tor-dev mailing list<br>
<a href="mailto:tor-dev@lists.torproject.org">tor-dev@lists.torproject.org</a><br>
<a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev" target="_blank">https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev</a><br>
</div></div></blockquote></div><br></div>