Minimizing Redundant Hash and Witness Operations in Merkle Hash Trees
Abstract
1. Introduction
2. MHT-Based Data Authentication Overview
2.1. Background: Merkle Hash Tree
- (1)
- The integrity of the segment is preserved.
- (2)
- The publisher of the segment is authenticated.
- (3)
- The segment is a valid component of the dataset requested by the user.
- (1)
- If is a leaf node, , where is a segment having a sequence number , and .
- (2)
- Otherwise, , where and are the values of left and right child nodes of , respectively.
- (1)
- A segment .
- (2)
- The witness corresponding to .
- (3)
- The digital signature of the root node value .
- (1)
- Initial segment verification: When the user receives the first packet including , it computes a root node value using and its witness. The digital signature over is then verified using . If valid, the user accepts as a correct segment and stores as the trusted root value.
- (2)
- Subsequent segment verification: For any other segment where , the user computes using and its corresponding witness. The digital signature need not be verified again. Instead, the user simply checks whether , where has been stored during the initial verification process. If the values match, is accepted as valid.
2.2. Reusing Computed Valid Node Values of MHT
3. Minimizing Redundant Hash and Witness Operations
3.1. Analysis of Redundant Witness Transmission
3.2. Witness Reuse in MHT
- (1)
- Packet Reception: The user receives a packet containing a segment, its corresponding witness, and the digital signature. The segment has a sequence number , where .
- (2)
- Determining the Verification Path Level: The user computes the level of verification path of the leaf node corresponding to the received segment. If the packet contains the first segment, is . Otherwise, the user searches for the deepest-level node on the verification path that matches the node corresponding to one of the stored values in . The level is set to the level of this matched node. The user can predict the level prior to computing node values of the full verification path. To achieve this, the user refers to Algorithm 1, which defines how to determine based on the sequence number of the segment.
- (3)
- If , the user computes to verify the digital signature. If the signature is valid, the segment is considered valid. The user then stores the in the cache and the transmitted witness values into the cache , placing each value in the entry corresponding to its node level.
- (4)
- If , the user selects a verification path whose level is . The user then computes the value . If the computed value matches the one stored in , the segment is considered valid. The user then stores the witness values , which were used in the computation of , into the cache , indexed according to their corresponding levels.
Algorithm 1 ComputeLevel(n, sn): Pseudo-Code for Calculating the level of verification path for a given segment | |
Input | : The height of MHT, where the MHT has leaf nodes : The sequence number of a segment ) |
Output | : The level of a verification path ) |
01: if sn is 0 then //the first segment 02: set 0 03: else if sn mod 2 is 1 then //odd-numbered segments 04: set n 05: else //even-numbered segments 06: set bit_mask 2 07: for Level, from n-1 down to 1 do 08: if (sn bit-AND-operation bit_mask) is not 0 then 09: break 10: else 11: set bit_mask bit_mask << 1 //<< operation: a left bit shift 12: end if 13: end for 14: end if 15: return |
3.3. Witness Generation for Reusing Witness
- (1)
- For the First Segment: If , the publisher transmits the full original witness as is.
- (2)
- For Even-Numbered Segments: If is even, the witness for the segment is empty, that is, the publisher does not transmit the witness for it.
- (3)
- For Odd-Numbered Segments (After the First): If is odd, using Algorithm 1, the publisher computes the level of the verification path for the segment. Then, the publisher constructs a partial witness .
Algorithm 2 VerifySeg(n,sn,Ssn,ω,σ,Ω): Pseudo-Code for Verifying a Segment using ComputeLevel(n, sn) | |
Input | : The height of MHT, where the MHT has leaf nodes ) }: A transmitted packet : Caches for the root node value and witness |
Output | : Segment Verification Result |
01: if is 0 then //the first segment verification 02: compute 03: verify 04: if is valid then 05: set //caching the valid root node value 06: store in order //caching valid witness 07: set 08: else 09: set 10: end if 11: else //the other segments verification 12: set //finding the shortest path 13: select 14: set //finding witness level 15: compute 16: compare //the node value verification 17: if then 18: store in order //caching witness 19: set 20: else 21: set 22: end if 23: end if 24: return vResult |
4. Evaluation
4.1. Security Evaluation
- (1)
- The integrity of each segment: The verifier ensures that the segment has not been tampered with during transmission. In MHT, this is achieved by verifying the hash value of the segment using the full verification path associated with the segment.
- (2)
- The correctness of each segment: This ensures that the segment is an authentic part of the original content requested by the user. In MHT, the original content is represented by the root node value. If the user correctly recomputes the root node value using the segment, the segment is considered an authentic part of the content.
- (1)
- G1 (Cache-safety): It does not open new forgery avenues to reuse cached (previously verified) witness nodes.
- (2)
- G2 (Integrity): A probabilistic polynomial-time adversary () cannot cause node values to accept a modified segment as valid.
- (3)
- G3 (Correctness): The cannot cause acceptance of a segment not in the dataset.
4.2. Performance Evaluation
4.2.1. Hash Computation Overhead
4.2.2. Witness Transmission Overhead
5. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
MHT | Merkle Hash Tree |
NDN | Named Data Networking Architecture |
References
- Jacobson, V.; Smetters, D.; Thornton, J.; Plass, M.; Briggs, N.; Braynard, R. Networking Named Content. In Proceedings of the 5th International Conference on Emerging Networking Experiments and Technologies, Rome, Italy, 1–4 December 2009; pp. 1–12. [Google Scholar]
- Suwannasa, A.; Broadbent, M.; Mauthe, A. Impact of Content Popularity on Content Finding in NDN: Default NDN vs. Vicinity-based Enhanced NDN. In Proceedings of the 10th International Conference on Information Science and Technology (ICIST), Bath, London, Plymouth, UK, 9–15 September 2020. [Google Scholar]
- Mehrabi, M.; You, D.; Latzko, V.; Salah, H.; Reisslein, M.; Fitzek, F. Device-Enhanced MEC: Multi-Access Edge Computing (MEC) Aided by End Device Computation and Caching: A Survey. IEEE Access 2019, 7, 166079–166108. [Google Scholar] [CrossRef]
- Fei, Y.; Zhu, H. Modeling and verifying NDN access control using CSP. In Proceedings of the Formal Method and Software Engineering—20th International Conference on Formal Engineering Methods, Gold Coast, QLD, Australia, 12–16 November 2018; pp. 143–159. [Google Scholar]
- Fei, Y.; Yin, J.; Yan, L. Security verification framework for NDN access control. Nat. Sci. Rep. 2025, 15, 5479. [Google Scholar] [CrossRef] [PubMed]
- Anjum, A.; Agbaje, P.; Mitra, A.; Oseghale, E.; Nwafor, E.; Olufowobi, H. Towards named data networking technology: Emerging applications, use cases, and challenges for secure data communication. Future Gener. Comput. Syst. 2024, 151, 12–31. [Google Scholar] [CrossRef]
- Li, B.; Zheng, M.; Ma, M. A Novel Security Scheme Supported by Certificateless Digital Signature and Blockchain in Named Data Networking. IET Inf. Secur. 2024, 2024, 6616095. [Google Scholar] [CrossRef]
- Benmoussa, A.; Kerrache, C.; Calafate, C.; Lagraa, N. NDN-BDA: A Blockchain-Based Decentralized Data Authentication Mechanism for Vehicular Named Data Networking. Future Internet 2023, 15, 167. [Google Scholar] [CrossRef]
- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 1 July 2025).
- Wood, G. Ethereum: A Secure Decentralized Generalized Transaction Ledger. Ethereum Yellow Pap. 2014, 151, 1–32. Available online: https://ethereum.github.io/yellowpaper/paper.pdf (accessed on 1 July 2025).
- Dahlberg, E.; Pulls, T.; Peeters, R. Efficient sparse Merkle trees: Caching strategies and secure updates. NordSec 2016, 199–215. Available online: https://www.bibsonomy.org/bibtex/2ad092077f775ca9122841b1a40cde2d1/dblp (accessed on 1 July 2025).
- Rivest, R.; Shamir, A.; Adleman, L. A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 1978, 21, 120–126. [Google Scholar] [CrossRef]
- Bellare, M.; Kilian, J.; Rogaway, P. The security of the cipher block chaining message authentication code. J. Comput. Syst. Sci. 1994, 61, 362–399. [Google Scholar] [CrossRef]
- Veronika, S. Scaling Up: How Increasing Inputs Has Made Artificial Intelligence More Capable. Our World in Data 2025. Available online: https://ourworldindata.org/scaling-up-ai (accessed on 1 July 2025).
- Mobile Data Usage: How Much Internet Do We Use Monthly? 2025. Available online: https://www.economyinsights.com/p/mobile-data-usage?utm_source=chatgpt.com (accessed on 1 July 2025).
- Merkle, R. Protocols for Public Key Cryptosystems. IEEE Symp. Secur. Priv. 1980, 73–104. [Google Scholar] [CrossRef]
- Merkle, R. A Digital Signature Based on a Conventional Encryption Function. In Proceedings of the Advances in Cryptology—CRYPTO ’87, Santa Barbara, CA, USA, 16–20 August 1987; pp. 369–378. [Google Scholar]
- Martel, C.; Nuckolls, G. An Efficient, Provably Secure Merkle Tree Commitment Scheme. In Proceedings of the ASIACRYPT, Jeju Island, Republic of Korea, 5–9 December 2004. [Google Scholar]
- Fan, L.; Cao, P.; Almeida, J.; Broder, A. Summary cache: A scalable wide-area web cache sharing protocol. IEEE/ACM Trans. Netw. 2000, 8, 281–293. [Google Scholar] [CrossRef]
- Ding, C.; Fu, Z. Efficient Layered Circuit for Verification of SHA3 Merkle Tree. IACR Cryptol. Eprint Arch. Rep. 2024. Available online: https://eprint.iacr.org/2024/1212 (accessed on 1 July 2025).
- Goldwasser, S.; Kalai, Y.; Rothblum, G. Delegating Computation: Interactive Proofs for Muggles. J. ACM (JACM) 2015, 62, 1–64. [Google Scholar] [CrossRef]
- Kuznetsov, O.; Rusnak, A.; Yezhov, A.; Kanonik, D.; Kuznetsova, K.; Domin, O. Efficient and Universal Merkle Tree Inclusion Proofs via OR Aggregation. Cryptography 2024, 8, 28. [Google Scholar] [CrossRef]
- Chystiakov, A.; Komendant, O.; Riabov, K. Cartesian Merkle Tree, Cryptography and Security. arXiv 2025, arXiv:2504.10944. Available online: https://arxiv.org/abs/2504.10944?utm_source=chatgpt.com (accessed on 1 July 2025).
- Lee, J.; Kim, D. The Shortest Verification Path of the MHT Scheme for Verifying Distributed Data. Appl. Sci. 2022, 12, 11194. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kim, D. Minimizing Redundant Hash and Witness Operations in Merkle Hash Trees. Appl. Sci. 2025, 15, 9611. https://doi.org/10.3390/app15179611
Kim D. Minimizing Redundant Hash and Witness Operations in Merkle Hash Trees. Applied Sciences. 2025; 15(17):9611. https://doi.org/10.3390/app15179611
Chicago/Turabian StyleKim, DaeYoub. 2025. "Minimizing Redundant Hash and Witness Operations in Merkle Hash Trees" Applied Sciences 15, no. 17: 9611. https://doi.org/10.3390/app15179611
APA StyleKim, D. (2025). Minimizing Redundant Hash and Witness Operations in Merkle Hash Trees. Applied Sciences, 15(17), 9611. https://doi.org/10.3390/app15179611