[tor-talk] onion id calculation

Robert Ransom rransom.8774 at gmail.com
Sat Sep 15 10:26:20 UTC 2012


On 9/15/12, grarpamp <grarpamp at gmail.com> wrote:

> openssl rsa -in private_key -pubout -outform DER | sha1 | cut -c 1-10
> python -c "import base64, sys; print
> base64.b32encode(sys.stdin.readline().rstrip('\n')).lower()"
> gu4dsm3cmi3dkyzw
>
> What am I doing wrong besides being sleepy?

You're using the first quarter of the base16 encoding of the SHA-1
hash, instead of the first half of the SHA-1 hash itself.


Robert Ransom


More information about the tor-talk mailing list