Hacker News new | ask | show | jobs
by lxgr 496 days ago
That's canonicalization, and the article does mention it (but unfortunately does not offer much insight other than that it's hard).
2 comments

The difficulty stems from you have to rewrite the encoding/decoding canonicalization library in every language you want to consume the data with as opposed to simply piggy backing off of default implementations and the language's standard crypto libs.

For example most JSON parsers default to interpreting numbers from JSON as floats or ints. but in the canonical format you would have to force all parsers to interpret them as exact decimal values. then determine how to encode them (is one hundred "100" or "1e2") etc.

Canonicalization is a pain in the ass. Write yourself a boatload of unit tests.