liveBook · Manning

Compact serialization

As explained in Secure APIs

Compact serialization represents a JOSE object as dot-separated base64url-encoded components.

Compact serialization represents a JOSE object as dot-separated, base64url-encoded components. For JWE, it packages the encrypted key, initialization vector, ciphertext, and authentication tag into one compact string. section 7.2.2

A compact JWE contains five ordered components:

Reading the structure

A JWE using RSA-OAEP for key encryption and A256GCM for content encryption can be represented as five encoded segments separated by four dots. JSON serialization instead places the same information in a JSON data structure.

How Secure APIs covers it

How deep it goes
Defines component encoding and ordering, then contrasts compact serialization with JSON serialization.
Examples
Uses JWT header-and-payload diagrams plus a five-part JWE layout with RSA-OAEP and A256GCM.
What you can do after
Evaluate compact JOSE strings by identifying their encoded components and separators.
How it connects
Connects JOSE objects with JWE, JWT, base64url encoding, JSON serialization, encryption, and digital signatures.

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.