Abstract
We present a protocol for verification of "no such entry" replies from databases. We introduce a new cryptographic primitive as the underlying structure, the keyed hash tree, which is an extension of Merkle's hash tree. We compare our scheme to Buldas et al.'s Undeniable Attesters and Micali et al.'s Zero Knowledge Sets.
Introduction
In distributed systems, a fundamental security challenge is establishing trust in a database that is not under the user's direct control. While digital signatures provide a robust mechanism for proving the authenticity of existing data, proving that a specific piece of data does not exist—a negative reply—is significantly more complex.
Traditionally, a user receiving a "record not found" response from a remote server had little choice but to trust the server's honesty. An attacker who has compromised the database could selectively hide records (such as revoked digital certificates) to facilitate unauthorized access. To mitigate this, databases require a mechanism to provide cryptographic proofs of non-existence. This paper introduces the Keyed Hash Tree, a sparse, deterministic extension of the Merkle tree designed to provide efficient, verifiable negative replies without requiring the user to download the entire dataset or perform computationally expensive operations.
The Problem of Negative Proofs
Existing solutions at the time of this research were often impractical for high-performance systems:
- Full Database Hashing: To verify a negative result, a user would theoretically need to re-hash the entire database to ensure no entry was omitted, which is impossible for large-scale systems.
- Standard Merkle Trees: While excellent for membership proofs, standard Merkle trees typically require showing the entire sorted list of keys to prove non-membership. This is inefficient and leaks sensitive information about the database's contents.
- Zero-Knowledge Sets (ZKS): Proposed by Micali et al., ZKS provided a theoretical framework for these proofs. However, they relied on modular exponentiations, making them computationally prohibitive for databases requiring high throughput.
Methods: The Keyed Hash Tree
The core innovation presented is the Keyed Hash Tree, which utilizes a sparse structure to manage an unimaginably large address space.
Deterministic Positioning and Sparse Structure
In a standard Merkle tree, data is typically appended to leaves. In a Keyed Hash Tree, the position of a leaf is determined by the hash of its key ($h(key)$). Using a hash function like SHA-1, the tree has a theoretical height of 160 levels, resulting in $2^{160}$ possible leaf positions. While this structure is theoretically larger than the number of atoms in the observable universe, the database only stores the specific branches that contain actual data. This results in a Sparse Hash Tree where the vast majority of the nodes are "empty."
The "Empty Subtree" Shortcut
The most significant optimization in this protocol is the handling of empty nodes. Because the tree's structure is fixed and deterministic, every empty subtree of a specific height $k$ will always have the same root hash. The author demonstrates that one can pre-compute exactly 160 "empty" hashes (one for each level of the tree). Any empty portion of the tree can thus be represented by a single pre-computed value, allowing the system to bypass the computation of massive, vacant branches.
Verification Protocol
To prove an entry does not exist, the database provides the hashes of the "sibling" nodes along the path where the key would have been located. The user hashes these values together; if the resulting root hash matches the signed "state credential" (the root hash signed by a trusted Writer), the non-existence of the entry is mathematically proven.
Comparative Analysis and Insights
The Keyed Hash Tree introduces a distinct separation of roles between Writers (who update data and sign the root), the Database (which stores data and generates proofs), and Readers (who verify proofs).
While the scheme is similar to Zero-Knowledge Sets, the author acknowledges a trade-off: the Keyed Hash Tree is not "perfectly" zero-knowledge. A proof might leak minor information regarding the proximity of other keys in the tree. However, the gain in efficiency is substantial. By replacing the modular exponentiations required by Micali’s ZKS with optimized hash functions like SHA-1, the Keyed Hash Tree achieves significantly higher performance.
Key Results
- Space Complexity: The sparse tree requires $O(n)$ space, where $n$ is the number of actual entries. The total number of nodes is bounded by less than $2n$.
- Communication Efficiency: For a database containing one million entries, a proof of non-existence typically requires traversing only about 20 nodes before encountering a pre-computed empty subtree.
- Performance: The scheme is orders of magnitude faster than previous constructions, as it replaces five modular exponentiations per node with a single application of a hash function.
- Message Size: For SHA-1, the maximum validation message size is approximately 6,400 bytes, making it highly suitable for modern network protocols.
Limitations and Future Work
Despite its efficiency, the system relies on an "announcement service" to distribute the latest signed root hashes. If this service is unavailable, the security model is compromised. Furthermore, while the paper outlines methods for insertions and deletions, maintaining the dynamic nature of these structures while preserving the strict security properties found in more complex zero-knowledge proofs remains an area for further research.
Summary updated