[Paper Review] A space- and time-efficient Implementation of the Merkle Tree Traversal Algorithm
This paper presents a novel Merkle tree traversal algorithm that combines the space efficiency of the log-space algorithm with the time efficiency of the fractal algorithm, achieving a worst-case storage of $[L imes 2^h + 2H - 2h]$ hash values and reduced time complexity per authentication path. The method leverages a continuous deterministic PRNG for leaf generation, minimizing memory usage while maintaining high performance in resource-constrained environments like smartcards.
We present an algorithm for the Merkle tree traversal problem which combines the efficient space-time trade-off from the fractal Merkle tree [3] and the space efficiency from the improved log space-time Merkle trees traversal [8]. We give an exhaustive analysis of the space and time efficiency of our algorithm in function of the parameters H (the height of the Merkle tree) and h (h = H L where L is the number of levels in the Merkle tree). We also analyze the space impact when a continuous deterministic pseudo-random number generator (PRNG) is used to generate the leaves. We further program a low storage-space and a low time-overhead version of the algorithm in Java and measure its performance with respect to the two different implementations cited above. Our implementation uses the least space when a continuous PRNG is used for the leaf calculation.
Motivation & Objective
- To address the challenge of efficiently traversing Merkle trees with limited storage, particularly in embedded systems like smartcards.
- To reduce the space complexity of Merkle tree traversal while maintaining or improving time efficiency compared to existing methods.
- To integrate a continuous deterministic pseudo-random number generator (PRNG) into leaf computation to minimize storage overhead.
- To provide a practical, low-overhead implementation in Java that outperforms prior approaches in both space and time efficiency.
- To analyze and optimize the trade-off between space and time in Merkle tree traversal for varying tree heights and parameter configurations.
Proposed method
- The algorithm extends the fractal Merkle tree approach by incorporating all space-saving optimizations from the log-space traversal method, resulting in a hybrid design that balances space and time efficiency.
- It organizes the tree into $L$ subtrees, each with an 'Exist' and 'Desired' subtree, where only specific nodes are stored to reduce memory usage.
- A stack-based traversal mechanism is used to compute authentication paths incrementally, with dynamic updates to subtree states based on leaf index progression.
- The algorithm employs three specialized processing functions: Process₀ for initial node insertion, Process₁ for bottom-level node tracking, and Process₂ for subtree transition and hash computation.
- A key innovation is the use of a continuous deterministic PRNG to generate leaf values on-the-fly, eliminating the need to store all leaves in memory.
- The method dynamically selects the next subtree to update based on the lowest tail height, ensuring efficient and balanced computation across subtrees.
Experimental results
Research questions
- RQ1How can the space and time complexity of Merkle tree traversal be minimized under strict storage constraints?
- RQ2What is the impact of using a continuous deterministic PRNG on the memory footprint of Merkle tree traversal?
- RQ3Can the space efficiency of the log-space algorithm be combined with the time efficiency of the fractal algorithm to achieve superior performance?
- RQ4What is the optimal configuration of parameters $H$ (tree height) and $h$ (subtree height) for minimizing storage and time overhead?
- RQ5How does the proposed algorithm compare in practice to the original fractal and log-space traversal methods in terms of memory usage and execution time?
Key findings
- The proposed algorithm achieves a worst-case storage requirement of $[L imes 2^h + 2H - 2h]$ hash values, representing a reduction of approximately a factor of two compared to the original fractal algorithm.
- The time complexity per authentication path is reduced to $\frac{2^h - 1}{2^h} \times (L - 1) + 1$, which significantly improves performance for large trees.
- When using a continuous deterministic PRNG for leaf generation, the algorithm uses the least amount of storage, as leaves are computed on-demand without persistent storage.
- The implementation in Java demonstrates low storage and time overhead, outperforming both the fractal and log-space algorithms in terms of space efficiency.
- The algorithm maintains optimal theoretical bounds on space and time, as confirmed by theoretical analysis and empirical measurements.
- The integration of PRNG-based leaf generation reduces memory usage without compromising security or correctness, making it ideal for embedded systems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.