[tor-relays] nickname to fingerprint
Karsten Loesing
karsten at torproject.org
Sat Jul 28 07:53:45 UTC 2012
On 7/28/12 5:47 AM, Aichetou Med wrote:
> my question is : is there an "easy" way to translate relay nickname
> to fingerprint ? if not is it possible to download descriptors for
> some specific relays given "Digest" string from consensus file? i
> mean before launching tor. besides is there a reason for not showing
> the fingerprint in the consensus.
The fingerprint is contained in the consensus, but it's base64 encoded.
For example, in the following line from cached-consensus,
r gabelmoo 8gREE9rC4C49a89HNaGbyh3pcoE AGGki/L4EedzUlT9yLqwYeWYomg
2012-07-28 04:03:18 212.112.245.170 443 80
the 8gREE9r.. part is the fingerprint. Here's how you convert that into
hex using Python:
>>> from binascii import *
>>> b2a_hex(a2b_base64("8gREE9rC4C49a89HNaGbyh3pcoE="))
'f2044413dac2e02e3d6bcf4735a19bca1de97281'
The consensus format is specified in dir-spec.txt:
https://gitweb.torproject.org/torspec.git/blob/HEAD:/dir-spec.txt
Note that there can be more than one relay with the same nickname. Look
out for Named flags in the consensus when resolving a nickname to a
fingerprint. If a relay doesn't have that flag, you can't be sure that
the fingerprint really belongs to the nickname.
Best,
Karsten
More information about the tor-relays
mailing list