← BLOG
November 19, 2026blockchainauditabilitaenterprise3 min readITENHR

A hash proves bytes, not meaning

A decision ledger's proof only works if someone can rebuild exactly the same bytes years later. Canonical serialization, a schema version in every entry and a verifier that does not share your code make the hash reproducible.

Terminal showing the same decision serialized in three ways, producing three different SHA-256 hashes.

In a decision ledger you hash an entry, anchor the hash, and years later someone recomputes it to check that nothing has changed. The anchor is the easy part. The check only works if that person can rebuild exactly the same bytes that were hashed in the first place, and that is where many ledgers break without anyone noticing.

Same decision, two hashes

A hash function does not know what a decision means. It sees bytes. Serialize the same object twice and you can get two different byte sequences: keys in a different order, a space after a colon, a number written as 1.0 instead of 1, a timestamp with or without milliseconds, an accented character in a different Unicode form. Each difference produces a completely different hash.

Most of the time this happens without a bug in your code. A serializer library is upgraded and changes its defaults. A field is added to the class and the output shifts. Someone recomputes the hash from the database row instead of the original payload. The record is intact, nobody tampered with it, and the proof fails anyway. Worse, it fails in front of the person you built the ledger for.

Three rules that keep the bytes reproducible

Canonical serialization. Pick one encoding and document it: field order, how numbers are written, how dates and time zones are written, which Unicode normalization applies, which character encoding. Existing schemes such as RFC 8785 for JSON are a good starting point. Then store the exact bytes you hashed, and when you verify, hash those stored bytes. Never hash a fresh serialization of an object you loaded from somewhere else.

A schema version in every entry. Fields will change over the years. The entry has to say which rules produced it, so that a reader in five years knows how to interpret it and which canonicalization to apply. Old entries are never rewritten to the new schema; they keep their version.

A verifier that does not share your code. If only your application can reproduce the hash, the proof depends on your application still existing and behaving the same. Write the encoding down well enough that someone else can implement it in a different language, and ideally have someone do it.

Test it like any other contract

Keep a small set of fixed sample entries with their expected hashes in the repository. Run them in CI on every build. If a library upgrade or a refactor changes a single hash, the build fails before anything reaches production. It costs minutes to set up and it is the only early warning you will get.

What this means for a delivery

The anchor proves the bytes did not change. Making them reproducible is your job, and it is part of the specification of the ledger, not an implementation detail. Put the encoding, the schema versions and the test vectors in the delivery package.

How would someone outside your team recompute one of your hashes?