How tamper-evident logs work: hash chains, signatures and trusted time
A plain-language tour of the building blocks behind logs that show when they have been changed, and an honest list of what they still cannot tell you.
Your application logs are useful for debugging. Here is why they fall short the day someone has to rely on them.
Every system has logs. Most teams trust them, and for debugging that is fine. The trouble starts when a log has to do a different job: settle an argument.
Imagine the argument. A customer says your agent approved a refund and then went back on it. Your agent says it never approved anything. Someone opens the log and finds no approval. Now the question is not "what happened?" It is "why should anyone believe this log?"
An ordinary log is lines in a file or rows in a table. Whoever can write to it can also change it. That includes the engineer on call, the person with admin rights on the database, anyone who got hold of those credentials, and a script that "cleans up" old entries.
Most of the time nobody does anything wrong. That is not the point. The point is that from the outside, an untouched log and a carefully edited one look exactly the same. If the log is the only evidence, you are asking the other side to take your word for it.
It can be changed. A line can be rewritten, or deleted, and nothing remains to show it. Backups help only if someone compares them, and they have the same problem one level up.
It can be incomplete without anyone noticing. If the process that writes the log crashes, or the logging code is removed, the log does not say "I stopped". It just ends. A quiet log looks like a quiet system. We go into this one in when an AI agent goes quiet.
The time can be wrong. The timestamp in a log line comes from a clock that someone controls. If the whole question is "before or after the customer complained", a time you wrote yourself is a weak answer.
A third party should be able to check the record without relying on the person who kept it. For that you need a few things together:
None of this is new cryptography. Signatures, hash chains and trusted timestamps have been around for years. What is new is applying them to what AI agents do, where the volume is high and the actions can have real consequences.
Be careful with the word "proof". A signed record shows that these entries were written in this order and have not been changed since. It does not show that the agent told the truth about what it did, and it does not show that every action was recorded. A signed log of a badly instrumented agent is still a log of a badly instrumented agent.
The building blocks and their limits are in how tamper-evident logs work. A scheme that states what it cannot do is easier to trust than one that does not.
If nobody will ever argue with your logs, keep your logs. If an auditor, a customer, a regulator or a court might one day ask "can you show me?", it is worth deciding now, while it is cheap, how you will answer. The AI Act's rules on records are one reason to ask. A customer who disagrees with you is another.