// HACKER NEWS — CYBERSECURITY
Decayfmt – a file format that corrupts itself a little every time you open it
A file format that corrupts itself a little every time you open it. Every open
permanently damages the file on disk, by an amount baked into the filename, before it is
ever shown to you. There is no recovery from the file alone. The file is the only copy
that matters, and every read destroys a little more of it.
x is a positive integer in the filename, the instability parameter. Higher x means
more corruption per open.
The grid above is one image encoded at x=1, x=3, x=8, and x=15, each opened the
same number of times. Same picture, four rates of decay. To follow a single instability
value across individual opens instead, each open corrupting the file further on disk
before it is ever shown, with no way back:
At x=3 the image degrades gracefully over many opens. At x=10 it is nearly gone after
one open and pure noise after three. x is the dial between a slow fade and near-instant
destruction.
Text decays the same way. A sentence encoded at x=1 (a slow burn), printed after a few
opens:
Corruption only ever swaps in printable characters, so text garbles into readable-looking
nonsense rather than binary noise.
decayfmt is a social contract enforced by math, not cryptography. It is not encryption,
not DRM, and not a secure deletion tool. The corruption is honest and unrecoverable from
the file alone, but anyone with a backup or a hex editor can defeat it. If you want the
original, keep a backup. If you do not want anyone to recover it, do not make one.
If you have a Rust toolchain, the quickest install is the published crate:
Download the binary for your platform from the
releases page and put it on your PATH.
There is no runtime dependency to install.
On macOS the binary is unsigned, so the first run may be blocked by Gatekeeper. Right-click
it and choose Open, or clear the quarantine flag with xattr -d com.apple.quarantine decayfmt.