<p>All fields in a Bitcoin transaction are little-endian encoded except for the signature fields and the public key fields which are both DER and big-endian encoded since they were originally produced by an external library that uses these encodings.</p>

<blockquote>
  <p>Would it be prudent/responsible for the BIP 68 Standard to make it
  clear whether the bit-encoding is natively little-endian or
  big-endian?</p>
</blockquote>

<p>I think this information belongs in the <a href="https://en.bitcoin.it/wiki/Protocol_documentation#tx" rel="nofollow noreferrer">protocol documentation</a>, not necessarily in the BIP.</p>

CC BY-SA 4.0
2019-01-08T20:42:02.323Z
2019-01-10T22:38:17.870Z
2019-01-10T22:38:17.870Z
Thorkil Værge
<p><strong>CLTV</strong> (OP_CHECKLOCKTIMEVERIFY - absolute locktime) and <strong>CSV</strong> (OP_CHECKSEQUENCEVERIFY - relative locktime) utilize <strong>BIP 68</strong>. Is the locktime for those two operations implicitly encoded in little-endian format?</p>

<p>Byte swapping associated with endianess has a very serious impact on the semantics for lock types (i.e., absolute, relative) and locktime value units (i.e., block number, seconds). Would it be prudent/responsible for the BIP 68 Standard to make it clear whether the bit-encoding is natively little-endian or big-endian?</p>

<transactions><script><utxo><locktime><checklocktimeverify>
Is the bit encoding format for the graphic in BIP 68 implicitly little-endian?
skaht
# Is the bit encoding format for the graphic in BIP 68 implicitly little-endian?

(Asked by: username_0 on 2019-01-08)

**CLTV** (OP\_CHECKLOCKTIMEVERIFY - absolute locktime) and **CSV** (OP\_CHECKSEQUENCEVERIFY - relative locktime) utilize **BIP 68**. Is the locktime for those two operations implicitly encoded in little-endian format?

Byte swapping associated with endianess has a very serious impact on the semantics for lock types (i.e., absolute, relative) and locktime value units (i.e., block number, seconds). Would it be prudent/responsible for the BIP 68 Standard to make it clear whether the bit-encoding is natively little-endian or big-endian?

**Tags:** transactions, script, utxo, locktime, checklocktimeverify


---

## 1 answers

### Answer by username_1 on 2019-01-08. Score: 2

All fields in a Bitcoin transaction are little-endian encoded except for the signature fields and the public key fields which are both DER and big-endian encoded since they were originally produced by an external library that uses these encodings.

> Would it be prudent/responsible for the BIP 68 Standard to make it
> clear whether the bit-encoding is natively little-endian or
> big-endian?

I think this information belongs in the [protocol documentation](https://en.bitcoin.it/wiki/Protocol_documentation#tx), not necessarily in the BIP.


---

