Hello there!
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?