mirror of
https://github.com/bitcoin/bips.git
synced 2025-02-22 23:08:01 +01:00
Merge #1002: BIP155: Mention SHA3-256 explicitly
6ef71b344c
BIP155: Small text improvements (Hennadii Stepanov)562f1d7188
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: ACK6ef71b344
laanwj: ACK6ef71b344c
Tree-SHA512: b88c7dfeeda2a99cfe1042c9f4e7cbeb6047882bf97ce9c1dd5e1f4a30203a9a03702638cc4b6c3b573f6c0a05b73a5ca43a77352a5ca24a32d19be129f8b317
This commit is contained in:
commit
ebeb28ee0e
1 changed files with 4 additions and 3 deletions
|
@ -164,10 +164,11 @@ onion_address = base32(PUBKEY | CHECKSUM | VERSION) + ".onion"
|
|||
CHECKSUM = H(".onion checksum" | PUBKEY | VERSION)[:2]
|
||||
|
||||
where:
|
||||
- PUBKEY is the 32 bytes ed25519 master pubkey of the hidden service.
|
||||
- VERSION is an one byte version field (default value '\x03')
|
||||
- PUBKEY is the 32 bytes ed25519 master pubkey of the hidden 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
|
||||
- H() is the SHA3-256 cryptographic hash function
|
||||
</pre>
|
||||
|
||||
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.
|
||||
|
|
Loading…
Add table
Reference in a new issue