script – Why wrapping P2PK inside P2SH did not catch on?

on

|

views

and

comments


Name it a pay-to-public-key-script-hash (P2PKSH), like so:

  • Locking script:
    OP_HASH160 OP_DATA_20 redeem_script OP_EQUAL
  • Redeem script:
    OP_DATA_20 pubkey OP_CHECKSIG
  • Unlocking script:
    <push signature> <push redeem_script>.

Both method, wallets must course of an inventory of keys and compute a 20-byte hash and tackle corresponding to every key, however tackle era could be barely completely different.
Complete dimension of prevout + enter could be the identical in both case:

  • P2PKH tackle (25 bytes):
    0x76a914 || hash160(pubkey) || 0x88ac
  • P2PKSH tackle (23 bytes):
    0xa914 || hash160(0x21 || pubkey || 0xac) || 0x87

Spending enter script would even be barely completely different:

  • P2PKH spend (66 + 34 bytes):
    <push signature> <push pubkey>
  • P2PKSH spend (66 + 36 bytes):
    <push signature> <push (0x21 || pubkey || 0xac)>

Word: || signifies byte concatenation.

Each would require assist by functions comparable to wallets, and each would have the identical transaction (enter+output) dimension.
The P2PKSH choice has some benefit in that it might make the tackle comparatively smaller and in that it might make all 20-byte outputs indistinguishable from one another.

It would not make sense to start out utilizing this type of tackle now, however there was a window of alternative within the interval 2012-2016 so I questioned. If Bitcoin had shipped with P2SH proper from the beginning, would we now have only one tackle sort?

Share this
Tags

Must-read

Constructing the Torc Driverless Security Case

At Torc, we’ve structured our security case on three foundational pillars: Engineer It to Be Secure, Function It to Be Secure, and the...

What’s DL+S? Unlocking the Huge Information Required to Develop Autonomous Vans

Breakthroughs in AI for autonomous driving don't occur in isolation. They occur when information, simulation, machine studying, infrastructure, and car testing work as...

Why I can’t wait to get right into a driverless automotive | Self-driving automobiles

Adrian Chiles (Driverless automobiles are taking us on a street to nowhere, 10 September) needs to know who requested for driverless automobiles. I...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here