April 21st, 2012, 05:00 AM
Onion address from RSA private key
I'm trying to determin a .onion hidden service name from the corresponding RSA private key, and I'm running into a problem...
ref : (can't post url so google "tor rendeznous specification", part 1.5. "Alice receives a z.onion address" )
I execute 2 commands :
>openssl rsa -inform PEM -outform DER -pubout -in private_key -out pub
this creates à "pub" file, normally containing the public key in DER format ( the file is 162 bytes )
>openssl dgst -binary -sha1 pub > sha
This creates à "sha" file normally containing the sha1 hash of "pub" ( 20 bytes )
Normally the .onion service name should be the first 10 bytes of "sha" in base32 format... But I get something different.
Where did I scr*w?