Authenticated Pages, Unanchored Counters: Positional Integrity Without Freshness in an Encrypted Single-File Database
Abstract
An encrypted single-file database protects its contents with a key derived from a password and seals every page with an authenticated cipher whose associated data binds the page to its number and to its role. That construction is good. We measured it: across 13 byte-level mutations of a real database, 7 were refused when the file was opened, 5 more were caught only when the database was read, and 1 mutation was never noticed at all. What the construction does not provide is freshness. The counter that records how far the database has advanced lives inside the encrypted catalog, so an attacker who keeps an old copy of the file can restore it and every page will still authenticate. We measured that too: after restoring a snapshot over a live database, 40 of 80 records were silently lost, the checkpoint counter rewound from 8 to 4, the file was byte-identical to the snapshot, and the engine reported no error of any kind. We then show that no purely local mechanism can detect this: whatever the database says about its own history is exactly what the attacker can rewrite. Freshness requires a witness the attacker cannot reach. We build one — a chained anchor kept outside the database — and measure its cost at 2.11 µs per verification against the 178.4 ms that opening the database already costs, a factor of 84,710. We also characterise the cost of the guarantees themselves: the per-page framing is 0.7324% of a 4 KiB page, but because each record occupies a page of its own the file grows 13.2x when the page size goes from 4 KiB to 64 KiB, and an open is dominated by Argon2id rather than by data (178.4 ms for an empty database, 297.5 ms at 8,000 records). Finally we measure the query path: index-evaluable predicates stay flat at 0.0301 ms while scan-only predicates grow linearly to 60.807 ms, a ratio of 9,968, and a scan that matches a single record costs within 17% of one that matches 1,600. The result is a three-way separation that the format literature usually leaves implicit: confidentiality and positional integrity are local and cheap, freshness is not local at all, and its price is not the crypto but the bookkeeping.
Download
Body
Imported entry paper (unverified hypothesis)
This paper was imported into jetessays as an entry paper from the author's local archive (nebula). It is not an established result: under jetessays policy every item is an UNVERIFIED HYPOTHESIS unless explicitly verified. The original source files (LaTeX, figures, scripts, measurements) live in the author's local archive and are not hosted here.
Abstract (as submitted)
An encrypted single-file database protects its contents with a key derived from a password and seals every page with an authenticated cipher whose associated data binds the page to its number and to its role. That construction is good. We measured it: across 13 byte-level mutations of a real database, 7 were refused when the file was opened, 5 more were caught only when the database was read, and 1 mutation was never noticed at all. What the construction does not provide is freshness. The counter that records how far the database has advanced lives inside the encrypted catalog, so an attacker who keeps an old copy of the file can restore it and every page will still authenticate. We measured that too: after restoring a snapshot over a live database, 40 of 80 records were silently lost, the checkpoint counter rewound from 8 to 4, the file was byte-identical to the snapshot, and the engine reported no error of any kind. We then show that no purely local mechanism can detect this: whatever the database says about its own history is exactly what the attacker can rewrite. Freshness requires a witness the attacker cannot reach. We build one — a chained anchor kept outside the database — and measure its cost at 2.11 µs per verification against the 178.4 ms that opening the database already costs, a factor of 84,710. We also characterise the cost of the guarantees themselves: the per-page framing is 0.7324% of a 4 KiB page, but because each record occupies a page of its own the file grows 13.2x when the page size goes from 4 KiB to 64 KiB, and an open is dominated by Argon2id rather than by data (178.4 ms for an empty database, 297.5 ms at 8,000 records). Finally we measure the query path: index-evaluable predicates stay flat at 0.0301 ms while scan-only predicates grow linearly to 60.807 ms, a ratio of 9,968, and a scan that matches a single record costs within 17% of one that matches 1,600. The result is a three-way separation that the format literature usually leaves implicit: confidentiality and positional integrity are local and cheap, freshness is not local at all, and its price is not the crypto but the bookkeeping.
Note
Imported via the jetessays seed importer. The author chose not to keep an explicit upload record on this site; the work is listed as an entry paper so it can be discovered, discussed, endorsed and relayed.
No comments yet. Be the first to discuss this hypothesis.