Canonical S-expressions

Canonical S-expressions

A Canonical S-expression (or csexp) is a binary encoding form of a subset of general S-expression. It was designed for use in SPKI to retain the power of S-expressions and ensure canonical form for applications such as digital signatures while achieving the compactness of a binary form and maximizing the speed of parsing.

The particular subset of general S-expressions applicable here is composed of atoms, which are byte strings, and parentheses used to delimit lists or sub-lists. These S-expressions are fully recursive.

While S-expressions are typically encoded as text, with spaces delimiting atoms and quotation marks used to surround atoms that contain spaces, when using the canonical encoding each atom is encoded as a length-prefixed byte string. No whitespace separating adjacent elements in a list is permitted. The length of an atom is expressed as an ASCII decimal number followed by a ":".

Read more about Canonical S-expressions:  Example, Properties, Interpretation and Restrictions, Comparisons To Other Encodings, Links

Famous quotes containing the word canonical:

    If God bestowed immortality on every man then when he made him, and he made many to whom he never purposed to give his saving grace, what did his Lordship think that God gave any man immortality with purpose only to make him capable of immortal torments? It is a hard saying, and I think cannot piously be believed. I am sure it can never be proved by the canonical Scripture.
    Thomas Hobbes (1579–1688)