diff options
author | David Goulet <dgoulet@torproject.org> | 2021-06-29 11:07:57 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-06-29 11:08:00 -0400 |
commit | 38bf60c0760af146f3bdd13a4cb3e111a2e38c51 (patch) | |
tree | bff5cb2b4cfe33201f88264fa4fe7eb8db142606 /address-spec.txt | |
parent | 554d63ad3a60b705c3a5cbe2e3e9b33094a049dd (diff) | |
download | torspec-38bf60c0760af146f3bdd13a4cb3e111a2e38c51.tar.gz torspec-38bf60c0760af146f3bdd13a4cb3e111a2e38c51.zip |
address-spec: Add v3 onion address spec
Closes #51
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'address-spec.txt')
-rw-r--r-- | address-spec.txt | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/address-spec.txt b/address-spec.txt index 30965ec..2a6f7db 100644 --- a/address-spec.txt +++ b/address-spec.txt @@ -51,11 +51,23 @@ SYNTAX: [digest].onion [ignored].[digest].onion - The digest is the first eighty bits of a SHA1 hash of the identity key for - a hidden service, encoded in base32. + Version 2 addresses (deprecated since 0.4.6.1-alpha), the digest is the first + eighty bits of a SHA1 hash of the identity key for a hidden service, encoded + in base32. + + Version 3 addresses, the digest is defined as: + + onion_address = base32(PUBKEY | CHECKSUM | VERSION) + CHECKSUM = H(".onion checksum" | PUBKEY | VERSION)[:2] + + where: + - PUBKEY is the 32 bytes ed25519 master pubkey of the onion service. + - VERSION is a one byte version field (default value '\x03') + - ".onion checksum" is a constant string + - CHECKSUM is truncated to two bytes before inserting it in onion_address When Tor sees an address in this format, it tries to look up and connect to - the specified hidden service. See rend-spec.txt for full details. + the specified onion service. See rend-spec-v3.txt for full details. The "ignored" portion of the address is intended for use in vhosting, and is supported in Tor 0.2.4.10-alpha and later. |