Canonical Encodings and Schema Validation

Make all components interpret the authenticated message in the same way by defining field boundaries, duplicates, and unsupported values.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Split syntactic validity from semantic authority
  2. A serialization contract specifies what is signed

Split syntactic validity from semantic authority

A typed review request can specify a document identifier and a decision from a fixed set. Parsing establishes that the request encodes exactly those fields under the schema. It cannot establish that the caller may change the document. Use one interpretation for validation and execution so optional fields or duplicate representations do not acquire inconsistent meaning between components.

A serialization contract specifies what is signed

When hashing or signing structured records, either protect the exact byte representation and parse it under one rule, or agree on an unambiguous canonical conversion. Participants must agree on number representation and ordering when these can vary. Unknown mandatory fields should follow a documented compatibility rule. Message context binding explains why boundaries matter to authentication. Schema evolution treats compatible changes across producers and readers.[1][2]

References

  1. Jerome H. Saltzer and Michael D. Schroeder, The Protection of Information in Computer Systems ↩
  2. NIST, Secure Software Development Framework ↩