2
What if I had a scriptPubKey of
<pubKey>OP_CHECKSIG
And an scriptSig of
<sig>
Question
Would that work in the standard client?
Why do we need to check the hash?
The only possible reason I could come up with is that it makes a DDOS much more difficult since people aren't flooding the network with invalid signatures that eats up the CPU, and a hash is relatively inexpensive.
If the explanation I have is correct, is it documented anywhere?
The wiki says that that the pay to pub key hash is to prevent a break in the ECDSA algorithm, but I wonder what the real answer might be.
Interestingly, the use of the hash also uses extra space in the blockchain, since the public key has to appear in the spending transaction anyway. On the other hand, without the hash, you'd use the public key as your address; it's about 60% longer, which might be a little inconvenient. – Nate Eldredge – 2014-03-11T03:22:28.740
Protection against an attack on ECDSA seems a perfectly reasonable explanation; why do you doubt it? – Nate Eldredge – 2014-03-11T03:25:31.310