From 15d51628a249775ce2b41fdf87975d49a494b35c Mon Sep 17 00:00:00 2001 From: Paul Chandler Date: Wed, 25 Mar 2020 03:36:58 -0400 Subject: [PATCH] Corrected the hash endianness clarification Corrected the hash endianness clarification. --- protocol/blockchain/hash.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/protocol/blockchain/hash.md b/protocol/blockchain/hash.md index 6d0d238..4c417a3 100644 --- a/protocol/blockchain/hash.md +++ b/protocol/blockchain/hash.md @@ -24,8 +24,7 @@ Since [BIP-34](/protocol/forks/bip-0034), the block height is now required to be - `D5D27987D2A3DFC724E359870C6644B40E497BDC0589A033220FE15429D88599` - `E3BF3D07D4B0375638D5F1DB5255FE07BA2C4CB067CD81B84EE974B6585FB468` -In contrast to many hashing algorithm implementations, Bitcoin Cash block and transaction hashes are *displayed* and *sent over the network* using a little-endian representation. -This can be confusing when, for example, a block hash is treated as a big-endian integer during comparisons with the block difficulty for block validation or mining. +In contrast to many hashing algorithm implementations, Bitcoin Cash block and transaction hashes use a little-endian representation. This means they are displayed and sent over the network with the least-significant byte first. This permits a block hash stored in memory to be interpreted without swapping endianness for integer operations such as the comparison with the block difficulty during block validation or mining. ## RIPEMD-160 [RIPEMD-160](https://en.wikipedia.org/wiki/RIPEMD) is used in Bitcoin Cash scripts to create short, quasi-anonymous representations of payees for transactions. Since its brevity is also a potential liability for the anonymity it provides (since shorter hashes generally provide less collision-resistance), it is used in conjunction with SHA-256 when generating an address from a public key.