opyeb cborlab

cborlab · Guides

CBOR and COSE guides

Five articles on the CBOR header, EDN, indefinite length and deterministic encoding, COSE_Sign1, and JSON conversion losses.

Five articles: the CBOR header, EDN, indefinite length and deterministic encoding, COSE_Sign1, and what JSON conversion loses.

Basics and notation

BasicsThe shape of CBOR bytesRead the major type and the length from one header byte.NotationReading CBOR as EDNLearn the human-readable CBOR notation and its rules.

Encoding rules

EncodingIndefinite length and deterministic encodingWhy one value has many byte strings, and how to normalise it.COSECOSE_Sign1 and signature verificationUnderstand how protected, payload and signature bind together.

COSE and conversion

ConversionWhat disappears between CBOR and JSONAvoid the traps of a conversion that looks lossless.

Once you have read the explanation, check it against the tool.

Open the tool