pqc-cometbft-sidecar certificate format v1
==========================================

All integers are big-endian. Decoders reject trailing bytes, so each certificate has exactly
one encoding.

  field            bytes          notes
  magic            4              "PQCC"
  version          1              0x01
  chain_id_len     1              1-255
  chain_id         chain_id_len   CometBFT chain id, UTF-8
  epoch            8              operator-configured epoch label
  height           8              block height
  block_hash       32             CometBFT block_id.hash
  validators_hash  32             CometBFT header validators_hash
  key_id           32             SHA3-256("pqc-cometbft-sidecar/key-id/v1" || pk)
  signature        3309           ML-DSA-65 signature

Signed message M:

  "pqc-cometbft-sidecar/checkpoint/v1" || u8 len(chain_id) || chain_id || u64 epoch
    || u64 height || block_hash || validators_hash || key_id

A certificate is valid under public key pk (1,952 bytes, FIPS 204 encoding) if and only if
key_id matches pk and ML-DSA-65.Verify(pk, M, signature, ctx = "") returns true.
