Title: Multisig based on public key hashes instead of public keys Post by: coinlatte on April 28, 2022, 07:39:57 PM Is it possible? And if so, why don't we use public key hashes instead of public keys? For example, let's assume we have first two private keys:
Code: alicePrivKey=0000000000000000000000000000000000000000000000000000000000000001 Code: alicePubKey=0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 Code: aliceAddress=bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 Code: aliceHash=751e76e8199196d454941c45d1b3a323f1433bd6 Code: OP_DUP OP_HASH160 OP_DUP 751e76e8199196d454941c45d1b3a323f1433bd6 OP_EQUAL OP_SWAP 06afd46bcdfd22ef94ac122aa11f241244a37ecc OP_EQUAL OP_ADD OP_VERIFY OP_CHECKSIG Code: <sigAlice> <pubkeyAlice> Title: Re: Multisig based on public key hashes instead of public keys Post by: achow101 on April 28, 2022, 08:49:39 PM It is possible, but there's no reason to, especially if the multisig script is inside of a P2SH, a P2WSH, or a P2TR. All the hashing would do is make the spending tx larger.
The primary reason to use pubkey hashes is to make output scripts (and addresses) shorter. Except for bare multisigs, this would not be necessary as the script is hidden inside of a hash already and only revealed at spending time. And with no address for bare multisigs, creating such outputs is much more difficult. So there would be no size benefit from hashing the pubkeys. People often tout quantum resistance as a reason to hash pubkeys, but even that is completely useless for multisigs done in the normal way. The pubkeys are revealed in the spend, which is also when the pubkey hashes are revealed. So there is no gain from doing that. |