Skip to main content

Module det_cbor

Module det_cbor 

Source
Expand description

The ONE deterministic-CBOR (RFC 8949) byte encoder for v16 content thumbprints. A direct port of WS-A’s frozen gen_proof_vectors.py::enc (at af08825528627069b3cfbdd763948c4a24689cb5), restricted to the value subset the v16 content thumbprints use.

Both the mint side (WS-B signer_suite_thumbprint) and the verify side (WS-C signer-suite/cnf resolution AND the replay-namespace preimages, which reuse the identical enc primitive over different array shapes) build their preimages with THIS encoder — there is exactly one det-CBOR implementation in the crate, so mint and verify are provably byte-identical.

Enums§

DetCborValue
A value in the RFC 8949 deterministic-CBOR subset the v16 content thumbprints use: unsigned integers, byte strings, text strings, and (possibly nested) definite-length arrays. This is all A’s enc needs for the signer-suite and replay-namespace preimages.

Functions§

det_cbor
Deterministically CBOR-encode value to its canonical byte string.