LearnBitcoin

Glossary

Signature Clipping

A loose name for signature malleability: turning a valid signature into a different valid one, which changes a transaction's ID. Strict DER, low-S relay policy and SegWit largely closed it off in Bitcoin.

"Signature clipping" isn't a widely-used term of art in Bitcoin. It's a catchall for ECDSA signature malleability: ways to take a valid signature and produce a different valid signature for the same transaction, which changes the txid without changing the meaning.

There were two practical vectors:

  • Loose encoding. ECDSA signatures are wrapped in DER, which allows exactly one encoding of each signature. Bitcoin's original code checked signatures with OpenSSL, though, and OpenSSL also accepted encodings that strayed from DER, so the same signature could be written several ways. BIP 66, enforced from July 2015, made strict DER a consensus rule, so a block containing any other encoding is invalid.
  • Inherent S-malleability. For any valid (r, s) ECDSA signature, (r, n-s) is also valid for the same message. The low-S rule requires s to be at most half the curve order, picking one form. BIP 62 proposed it as a consensus rule and was never deployed. Bitcoin Core has enforced it only as relay policy since version 0.11.1 (October 2015), and BIP 146, a later proposal to make it consensus, was closed. SegWit (BIP 141) has no low-S rule.

SegWit (BIP 141) closed the issue at the protocol level by moving signature data out of the txid calculation entirely. For SegWit and Taproot inputs, signature tweaks don't change the txid no matter what an attacker does.

For transactions that spend only SegWit or Taproot outputs, third-party malleability is solved. Transactions that spend older outputs, such as legacy P2PKH, can still be altered in principle. Strict DER is a consensus rule, while low-S is only relay policy. The network won't pass along a tweaked copy, but a miner could still put a high-S copy in a block.

Key takeaways

  • Refers to maliciously tweaking valid signatures to alter TX IDs
  • Strict DER rules (BIP 66) and SegWit corrected most malleability flaws
  • Illustrates early vulnerabilities in ECDSA usage

Corrected

  • Was: The entry said low-S was a consensus rule for SegWit under BIP 141, that the DER standard itself allowed several encodings of one signature, that BIP 66 only made the extras non-standard, and that malleability was solved for all new transactions.

    Now: DER allows one encoding; the extra forms came from OpenSSL accepting non-DER signatures, and BIP 66 made strict DER a consensus rule in July 2015. Low-S is only Bitcoin Core relay policy and SegWit has no low-S rule, so a miner could still confirm a high-S copy of a transaction that spends older, non-SegWit outputs. Details

Sources (9)

Related terms (7)

Published . Revised . One correction logged for this page.

Edit this page on GitHub