From 00851c44a811559355e02d166116e135b1ff9b2c Mon Sep 17 00:00:00 2001 From: "Andreas M. Antonopoulos" Date: Fri, 2 Feb 2018 15:46:46 -0800 Subject: [PATCH] Improve clarity of P2WSH to P2SH comparison --- appdx-segwit.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appdx-segwit.asciidoc b/appdx-segwit.asciidoc index 7b4ceeb4..f127a6a2 100644 --- a/appdx-segwit.asciidoc +++ b/appdx-segwit.asciidoc @@ -148,7 +148,7 @@ Again, as with the example of P2WPKH, you can see that the Segregated Witness eq [TIP] ==== -While P2SH uses the 20-byte +RIPEMD160(SHA256(script))+ hash, the P2WSH witness program uses a 32-byte +SHA256(script)+ hash. This difference in the selection of the hashing algorithm is deliberate and is used to differentiate between the two types of witness programs (P2WPKH and P2WSH) by the length of the hash and to provide stronger security to P2WSH (128 bits versus 80 bits of P2SH). +While P2SH uses the 20-byte +RIPEMD160(SHA256(script))+ hash, the P2WSH witness program uses a 32-byte +SHA256(script)+ hash. This difference in the selection of the hashing algorithm is deliberate and is used to differentiate between the two types of witness programs (P2WPKH and P2WSH) by the length of the hash and to provide stronger security to P2WSH (128 bits of security in P2WSH versus 80 bits of security in P2SH). ====