I have a .onion site. Is it possible to change the private key on my existing domain?

  • 1
    Could you elaborate a bit? Right now it is unclear to me what you want to do.
    – Jens Kubieziel
    Oct 21 '15 at 22:49
  • 1
    Just a thought: Why would you want to use a new private key but keep the .onion address? If someone else has your private key, then this would not help. Even if you could brute-force a different private key that hashes to the same .onion address, it would not stop the other person from doing anything they can do if you just keep the same key: either way, they have as much control over the .onion as you do. So if you need a new private key, you don't need just any old key, but one that yields a different .onion address.
    – Jobiwan
    Nov 8 '15 at 22:13

Your host name is calculated from your private key.
If you change your private key, you will get a new host name.

  • After reading your comment I wondered how to do this and found a oneliner on swehack.org/viewtopic.php?f=37&p=6978: U=$(openssl rsa -in a.pem -pubout -outform DER | tail -c +23 | shasum | head -c 20 | python -c "import base64,sys; print base64.b32encode(sys.stdin.readline().strip('\n').decode('hex')).lower()"); echo "http://${U}.onion"
    – sourcx
    Sep 20 '16 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.