# What is a hash-chained journal?

A hash-chained journal is an append-only record in which every entry stores a cryptographic hash that covers the previous entry, so any later change to an earlier entry breaks the chain and can be detected by re-checking it.

- Source: https://finray.tech/intelligence/glossary/hash-chained-journal/
- Published: 2026-11-21
- Updated: 2026-11-21
- Publisher: Finray Technologies Ltd, Cyprus Companies Registry HE 445903

---

## What is a hash-chained journal?

A hash-chained journal is an append-only record in which each entry carries a hash of the entry before it, so a later change to any earlier entry breaks the chain and shows up when the chain is re-checked. A hash is a short fingerprint computed from data; change one character of the data and the fingerprint changes. Because every entry's fingerprint includes the previous fingerprint, altering an old entry invalidates all the entries after it. Re-computing the chain from the start reveals where it breaks.

The result is called tamper-evident, not tamper-proof. It does not make editing impossible. It makes silent editing much harder, because the edit leaves a mathematical trace that a verification run can find.

## How does a hash chain work?

Each entry is stored with its content (for example a ledger posting: date, accounts, amounts, author, approver, source document reference) and two hash fields: the hash of the previous entry and its own hash. The own hash is computed over the content plus the previous hash, using a standard hash function such as those specified in NIST's Secure Hash Standard, FIPS 180-4. NIST describes such digests as a way to detect whether a message has changed since the digest was generated.

Verification walks the entries in order, recomputes each hash and compares it with the stored one. A mismatch at entry 4,012 tells you that entry 4,012, or something before it, differs from what was originally recorded.

## What is a worked example?

Illustrative example with synthetic numbers. A three-entry journal:

| # | Content | Previous hash | Own hash |
|---|---|---|---|
| 1 | Invoice 2026-0041, CHF 2,000.00 | (start) | h1 = hash(content 1) |
| 2 | Payment received, CHF 2,000.00 | h1 | h2 = hash(content 2 + h1) |
| 3 | Accrual, CHF 450.00 | h2 | h3 = hash(content 3 + h2) |

Suppose someone edits entry 1 to read CHF 200.00 directly in the database. Re-checking entry 1 gives a value that no longer equals h1. If they also recompute h1, entry 2's stored "previous hash" no longer matches. To hide the edit they would have to recompute every later entry, and then the final hash, the chain head, would differ from any copy of it held elsewhere, such as in a report, a backup or a reviewer's record.

That last sentence is the important limit. A chain protects well against edits that are not accompanied by a full recomputation. Against someone who controls the entire database, it protects only as far as copies of the head are held where that person cannot change them.

## Why do accounting and payments systems use it?

Ledgers are evidence. Swiss law requires business books and vouchers to be kept for ten years from the end of the business year (Art. 958f CO), and the ordinance on keeping business books (GeBüV) addresses integrity of the storage medium. According to the federal SME portal, unchangeable media are accepted where data cannot be altered or deleted without that being detectable; for changeable media, electronic signatures can preserve integrity, and the time at which data were stored must be provable in a way that cannot be falsified.

A hash chain is one way to make changes detectable on a changeable medium such as a database. We do not claim it is the way the ordinance requires; companies should confirm the approach with their accountant and auditor.

For regulated financial entities in the EU, DORA Article 9(4) expects documented ICT security policies covering integrity of data and access control. ISO/IEC 27001:2022 lists logging as control 8.15 in Annex A. A verifiable journal gives these controls something concrete to test.

## What is the difference between append-only, tamper-evident and immutable?

| Term | What it means | What it does not mean |
|---|---|---|
| Append-only | The application only adds entries; corrections are new entries that reference the old one | It does not stop a privileged administrator from altering the storage |
| Hash-chained | Each entry commits to its predecessor | It does not say who may add entries |
| Tamper-evident | Alteration can be detected by verification | It does not prevent alteration, and detection requires someone to verify |
| Immutable (absolute) | Cannot be changed by anyone | Not a claim that can be made accurately about data held in a database |

## What controls must sit around the chain?

A chain is only one layer. Useful companions:

- **Approval before append:** entries that matter are appended after a second person approves them; see [four-eyes principle](/intelligence/glossary/four-eyes-principle/).
- **Role separation:** the people who post entries are not the people who administer the database; see [segregation of duties](/intelligence/glossary/segregation-of-duties/).
- **Scheduled verification:** a chain nobody verifies is only decoration. Run it on a schedule and before period close, and review failures.
- **Head records:** keep the latest chain head in more than one place, such as month-end reports and backups, so a full rewrite would be noticed.
- **Corrections as new entries:** reversals and adjustments are appended and reference the original, so the history stays readable.
- **Retry safety:** replays of the same command must not append duplicates; see [idempotency in payments](/intelligence/glossary/idempotency-in-payments/).

## What are the limits of a hash chain?

It detects change; it does not say whether an entry was correct when written. It does not hide confidential data. It adds nothing against an attacker who can rewrite the whole chain and every record of its head. Hashes also need a sound algorithm; the choice should follow current guidance rather than habit. Stating these limits plainly is part of describing the control honestly.

## What does Finray do today, and what is not yet there?

In Corebanq Accounting the journal, the audit log and the access log are append-only and hash-chained, and there is a "verify ledger" check that re-computes the chain. Statement figures can be traced through accounts and lines to the entry and its source document. Each company's data is isolated using row-level security.

We describe this as append-only, hash-chained and verifiable. We do not claim the journal is tamper-proof or immutable, and there is no external anchoring, such as third-party timestamps or Merkle proofs, today. Whether that is enough for a given company's retention and audit approach is for the company and its auditor to judge. See [Corebanq Accounting](/platforms/corebanq-accounting/) and, for how we build, [how we build](/company/how-we-build/).

## Frequently asked questions

### What is a hash-chained journal in one sentence?

It is an append-only list of records where each record includes a hash of the one before it, so altering or removing an earlier record changes every later hash and the break shows up when the chain is verified.

### Is a hash-chained journal tamper-proof?

No, and it should not be described that way. It is tamper-evident: it does not physically stop someone with sufficient database access from rewriting rows, but it makes an undisclosed rewrite detectable, provided the verification is run and the latest chain head is held where the editor cannot also change it.

### Does the chain need an external timestamp or blockchain?

Not to work as a detection mechanism. External anchoring, for example a trusted timestamp, adds protection against a complete rewrite of the whole chain by someone who controls the system. It is an optional extra with its own cost, and many designs, including Corebanq Accounting today, do not use it.

### How is this different from a normal audit log?

An ordinary audit log is usually a table that anyone with write access can edit without trace. A hash-chained log adds a mathematical link between entries and a verification routine, so edits are not silent. It still needs access control and review around it.

### Does a hash-chained ledger satisfy Swiss record-keeping rules?

Swiss rules (Art. 958f CO and the GeBüV) ask that books are kept so that changes can be detected and records stay readable for ten years. A hash chain is one mechanism that supports detection. Whether a particular system meets the rules in a given company is a matter for the company, its accountant and its auditor, not for a glossary entry.

## Sources

- [NIST FIPS 180-4, Secure Hash Standard (SHS)](https://csrc.nist.gov/pubs/fips/180-4/upd1/final)
- [Swiss SME portal (kmu.admin.ch), Electronic retention of business books (Art. 958f CO, GeBüV Art. 9)](https://www.kmu.admin.ch/de/elektronische-aufbewahrung-der-geschaeftsbuecher)
- [Regulation (EU) 2022/2554 (DORA), Article 9(4) ICT security policies](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32022R2554)
- [ISO/IEC 27001:2022, Annex A control 8.15 Logging](https://www.iso.org/standard/27001)
