XRAPH/Research/Whitepaper

Crypto-Erasure in Hash-Linked Audit Logs: Guarantees and Their Limits

Append-only hash-linked logs and a legal right to erasure are incompatible in their naive forms. Per-subject encryption resolves the conflict, and the resulting guarantee is bounded by key destruction, surviving metadata and hash algorithm lifetime, each of which is stated explicitly.

Type
Whitepaper
Year
2025
Status
Draft
Length
3 min read

#Abstract

An append-only hash-linked audit log and a statutory right to erasure are incompatible in their naive forms. This report describes resolving the conflict by encrypting personal data under per-subject keys held outside the log, so that destroying a key renders the plaintext unrecoverable while the chain continues to verify. The resulting guarantee is bounded by three conditions, each of which is stated, and one of which cannot be enforced by the library at all. No formal adversary model is given.

#Why the log is chained

An audit log an administrator can modify is not evidence. Where the credentials that perform an action can also remove its record, the log answers no question of interest.

Linking each entry to its predecessor by a cryptographic hash makes modification detectable. The technique originates in digital timestamping and in hash tree constructions , and secure audit log designs have addressed a compromising adversary directly .

The property obtained is detection rather than prevention. Nothing prevents a party with storage access from writing to storage. What changes is that concealment requires rewriting every subsequent entry and any externally published chain head.

#The conflict

The right to erasure entitles a data subject to have personal data concerning them removed . The log's design property is that nothing is removed. These cannot both hold over the same bytes.

#Construction

Personal data within an entry is encrypted under a key associated with that data subject. The entry stored in the log is ciphertext, and the key is held in separate storage with its own access control.

hi  =  H ⁣(hi1Encks(di)mi)h_i \;=\; H\!\left(h_{i-1} \,\|\, \mathrm{Enc}_{k_s}(d_i) \,\|\, m_i\right)
(1)
What the chain covers, and what erasure removes

Because the hash covers the ciphertext rather than the plaintext, destroying the key leaves every hash unchanged and the chain verifiable end to end, while the plaintext becomes unrecoverable by any party including the operator.

The key is deleted, not the record. The trail retains its integrity and the data subject obtains an outcome that is, in practice, indistinguishable from deletion.

#Three bounding conditions

Key destruction must be complete. The entire guarantee rests on the key being irrecoverable everywhere it existed, including backups of the key store, which is precisely where keys survive unnoticed. Sanitisation guidance exists because deleted and unrecoverable are distinct states . A library can guarantee its own behaviour and cannot guarantee that an operator's key management system lacks a soft-delete window, which makes this the weakest link and one outside the system's control.

Metadata remains in the clear. Timestamps, actor identifiers, resource types and action names must remain readable, because a log that cannot be queried serves no purpose. The fact that a subject performed an action at a time therefore survives erasure. Whether that residue is itself personal data depends on the data and is a legal determination rather than a technical one.

Hash algorithms have finite lifetimes. A chain constructed today may require verification decades hence. The format carries an algorithm identifier permitting a successor chain, and the earlier segment remains verifiable only under its original algorithm.

#Design constraint that makes reporting possible

Entries have a fixed shape: actor, action, resource, outcome, scope and timestamp. Every subsequent request to add a free-form field has been declined. Economy of mechanism is the relevant principle , and the practical consequence is that a compliance report is a query rather than a text-mining exercise.

#An unanticipated effect

Once engineers trusted that the log could not have been silently modified, they began consulting it during incidents rather than reconstructing sequences from application logs. The log's value in ordinary operation exceeded its value at audit, which was not the reason it was built.

#Limitations

No formal adversary model is given. The construction assumes the key store and the log store are not under unified adversarial control, and does not analyse the case where they are.

Per-subject keys imply a key per subject, and the operational cost of that at scale, including rotation and the enumeration required to erase, is not evaluated here. Systems with very large subject populations may find the key management cost dominant, and no measurement is offered either way.

References

  1. [1]Stuart Haber, W. Scott Stornetta, How to Time-Stamp a Digital Document, Journal of Cryptology, vol. 3, pp. 99-111, 1991doi:10.1007/BF00196791
  2. [2]Ralph C. Merkle, A Digital Signature Based on a Conventional Encryption Function, Advances in Cryptology (CRYPTO 87), Springer, 1988doi:10.1007/3-540-48184-2_32
  3. [3]Bruce Schneier, John Kelsey, Secure Audit Logs to Support Computer Forensics, ACM Transactions on Information and System Security, vol. 2, no. 2, pp. 159-176, 1999doi:10.1145/317087.317089
  4. [4]European Parliament and Council, Regulation (EU) 2016/679 on the Protection of Natural Persons with Regard to the Processing of Personal Data (General Data Protection Regulation), Official Journal of the European Union, 2016
  5. [5]Richard Kissel, Andrew Regenscheid, Matthew Scholl, Kevin Stine, Guidelines for Media Sanitization, NIST Special Publication 800-88 Revision 1, 2014doi:10.6028/NIST.SP.800-88r1
  6. [6]Jerome H. Saltzer, Michael D. Schroeder, The Protection of Information in Computer Systems, Proceedings of the IEEE, vol. 63, no. 9, pp. 1278-1308, 1975doi:10.1109/PROC.1975.9939