Skip to content

Commit ebeb28e

Browse files
committed
Merge bitcoin#1002: BIP155: Mention SHA3-256 explicitly
6ef71b3 BIP155: Small text improvements (Hennadii Stepanov) 562f1d7 BIP155: Mention SHA3-256 explicitly (Hennadii Stepanov) Pull request description: It seems better to clarify that `CHECKSUM` in Tor onion v3 address uses SHA3-256 hash function. ACKs for top commit: vasild: ACK 6ef71b3 laanwj: ACK 6ef71b3 Tree-SHA512: b88c7dfeeda2a99cfe1042c9f4e7cbeb6047882bf97ce9c1dd5e1f4a30203a9a03702638cc4b6c3b573f6c0a05b73a5ca43a77352a5ca24a32d19be129f8b317
2 parents cca9b98 + 6ef71b3 commit ebeb28e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bip-0155.mediawiki

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ The reference implementation is available at (to be done)
150150

151151
==Appendix A: Tor v2 address encoding==
152152

153-
The new message introduces a separate network ID for <code>TORV2</code>.
153+
The new message introduces a separate network ID for <code>TORV2</code>.
154154

155155
Clients MUST send Tor hidden service addresses with this network ID, with the 80-bit hidden service ID in the address field. This is the same as the representation in the legacy <code>addr</code> message, minus the 6 byte prefix of the OnionCat wrapping.
156156

@@ -164,10 +164,11 @@ onion_address = base32(PUBKEY | CHECKSUM | VERSION) + ".onion"
164164
CHECKSUM = H(".onion checksum" | PUBKEY | VERSION)[:2]
165165

166166
where:
167-
- PUBKEY is the 32 bytes ed25519 master pubkey of the hidden service.
168-
- VERSION is an one byte version field (default value '\x03')
167+
- PUBKEY is the 32 bytes ed25519 master pubkey of the hidden service
168+
- VERSION is a one byte version field (default value '\x03')
169169
- ".onion checksum" is a constant string
170170
- CHECKSUM is truncated to two bytes before inserting it in onion_address
171+
- H() is the SHA3-256 cryptographic hash function
171172
</pre>
172173

173174
Tor v3 addresses MUST be sent with the <code>TORV3</code> network ID, with the 32-byte PUBKEY part in the address field. As VERSION will always be '\x03' in the case of v3 addresses, this is enough to reconstruct the onion address.

0 commit comments

Comments
 (0)