From 38bf60c0760af146f3bdd13a4cb3e111a2e38c51 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 29 Jun 2021 11:07:57 -0400 Subject: address-spec: Add v3 onion address spec Closes #51 Signed-off-by: David Goulet --- address-spec.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'address-spec.txt') 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. -- cgit v1.2.3-54-g00ecf