DER Format
DER format, short for Distinguished Encoding Rules, is a strict binary encoding standard from the X.690 family used to serialize data structures such as cryptographic signatures. Bitcoin uses DER to encode ECDSA signatures inside transactions, where a typical signature occupies about 71 or 72 bytes. DER guarantees that any given data structure has exactly one valid byte representation.
Why it matters
That uniqueness rule sounds like a technicality, but in Bitcoin it closed a real attack surface. Early versions of the software accepted loosely encoded signatures, meaning the same signature could be expressed in slightly different bytes. Because a transaction's identifier is a hash of its bytes, anyone could change a transaction's ID without changing its meaning, a problem called transaction malleability that complicated payment tracking and was cited during the Mt. Gox collapse.
Bitcoin's BIP 66 soft fork, activated in 2015, made strict DER encoding mandatory for all signatures, removing one major source of malleability and tightening consensus across implementations.
How it works
DER encodes each element with a tag byte identifying its type, a length field, and the value itself. An ECDSA signature is a sequence containing two integers, r and s, each tagged and length-prefixed. Strictness means no padding, minimal integer encoding, and one canonical form, so every validating node hashes exactly the same bytes. Bitcoin's newer Schnorr signatures under Taproot drop DER for a simpler fixed 64-byte encoding.
Related Terms
Ready to convert your gold to Bitcoin?
Get Your Free Kit →