ULDAPack-Min v1 — Header

Offset Size Field Notes
0 1 0x00 opening sentinel
1 1 hdrLen total header bytes
2 1 N ladder height
3 1 modeCode 1 → S, 2 → X
4 1 algCode digest code (e.g., SHA-256)
5..k k idxBytes big-endian generation index
-1 1 0x00 closing sentinel
  • hdrLen = 5 + len(idxBytes) + 1.
  • Index 0 is encoded as a single 0x00.
  • The same header is used for both Origin and Signature of the same generation.