Get the latest tech news

Canonical S-Expressions


A Canonical S-expression (or csexp) is a binary encoding form of a subset of general S-expression (or sexp). 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.

Two different structures – each a SEQUENCE of two INTEGERS – have identical representations on the wire (barring special tag choices to distinguish them). Once a wire-format expression has been parsed into an internal tree form (similar to XML's DOM), the consumer of that structure can examine it for conformance to what was expected. Some implementations[ citation needed](incorrectly) return multiple lines as single text nodes, which may have led to this common misunderstanding.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Expressions

Expressions

Related news:

News photo

D-Expressions: Lisp power, Dylan style [pdf]