1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-14 03:48:58 +00:00

Update ch07.asciidoc

Restructured this Tip box sentence structure for flow. Comment related to P2WPKH and P2WSH are placed at the end with subtle pointer to continue reading for elaboration on this point.
This commit is contained in:
krupawan5618 2021-03-04 21:41:56 -05:00 committed by GitHub
parent 72abc050e1
commit 5d44f72caf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -784,7 +784,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 of security in P2WSH versus 80 bits of security in 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 provides stronger security to P2WSH (128 bits of security in P2WSH versus 80 bits of security in P2SH). It is also used to differentiate between the two types of witness programs (P2WPKH and P2WSH) by using the length of the hash (see below).
====