2022 Developer Survey is open! Take survey.
8 votes
Accepted

What is the O(n^2) signature hashing problem and how does SegWit solves it?

Moving signatures to a separate field does not actually solve it. However one of the things that segwit did was to redefine the message that is hashed and signed. This is specified in BIP 143. ...
user avatar
  • 60.6k
8 votes
Accepted

Why is the signature hash different for each input in a multi-input transaction?

Varying the signature per input helps prevents some attacks during multi-party transaction construction. Consider a coinjoin involving Alice and Bob. Alice selects one of her UTXOs for the coinjoin. ...
user avatar
3 votes

Which kinds of transactions show quadratic signature-hashing scaling?

Quadratic means that something grows as a square function of something else. If you're just talking about a one-input transaction, there is nothing that changes. The quadratic hashing issue is that ...
user avatar
3 votes

Quadratic hashing problem: Why not just create new OP code "CHECKSIG2" to fix?

Note: As of 2020 this answer is obsolete, as BIP143 / SegWit has been in use for years which fixes this concern. You can fix it this way, and someone is in the process of doing so. The problem with ...
user avatar
  • 28.6k
3 votes
Accepted

ScriptSig content during signature (quadratic hashing)

It's like that because that is how Satoshi wrote the code for it and it has never changed. It can't change without some sort of fork, and thus far, no fork has happened to change it (although segwit ...
user avatar
  • 60.6k
2 votes

Which kinds of transactions show quadratic signature-hashing scaling?

The quadratic hashing issue appears in the verification of all pre-segwit transaction formats. It stems from the method of verifying the input scripts. For each input the transaction has, all the ...
user avatar
  • 62.5k
2 votes

Why is the signature hash different for each input in a multi-input transaction?

I'd been wondering about this for quite a long time, since it was the reason behind the quadratic hashing problem. The best answer I found so far is the one given by Pieter Wuille in the Bitcoin talk ...
user avatar
  • 2,692
1 vote

What causes quadratic hash problem?

Double-SHA-hash duration is dependent linearly on the size of the template? Yes, of course. So, increasing the count of inputs twice we also increase the size of each template ~twice and the work ...
user avatar
  • 6,542

Only top scored, non community-wiki answers of a minimum length are eligible