## 4 Proposed Architecture
### Hashing, Merkle Tree Signature Scheme, and One-Time Signatures  
A digital signature technique is also known as the one-time signature (OTS) scheme can only be used to do a signature on one message with one key pair. Faster signing and algorithms for verification can be achieved with different techniques using hash-based OTS when compared to schemes such as RSA [43], which is a public-key digital signature technique. However, there are significant restrictions to OTS approaches, such as the length of signatures, the size of keys, and the maximum number of signatures possible. Figure 8: System architecture. Cryptographic secure hash functions ensure the security of OTS. The properties of a cryptographic secure hash function will be defined in this section. There are three categories, namely, \"preimage-resistant\", \"second preimage-resistant\" and \"collision-resistant\", and a hash function H: {0,1}* tends to {0,1}\({}^{\text{s}}\) that is cryptographically secure if it falls in the above three categories. * Preimage-resistant. For a hash function H, if it is hard to find any \(m\) for a given \(h\) with \(h=H(m)\), then it is preimage-resistant. * Second preimage-resistant. For a hash function H, if it is hard to find any \(m_{2}\) for a given \(m_{1}\) with \(H(m_{1})=H(m_{2})\), then it is second preimage-resistant. * Collision-resistant. For a hash function H, if it is hard to find a pair of \(m_{1}\) and \(m_{2}\) with \(H(m_{1})=H(m_{2})\), then it is collision-resistant. This multiple OTS can be verified by using a single public verification key, which is possible due to the MHT-based Merkle signature scheme (MSS). Each OTS scheme is represented by one leaf of the MHT. This implies that the same number of messages can be produced by each tree as the leaves of the MHT. The OTS technique's public verification keys [44] will be used to verify all of these communications. The OTS scheme's public verification keys are validated by computing the MHT's root from a specified verification object, as illustrated in Figure 7.  
Only a limited number of messages can be signed with one public key, \"pub_key\", by using MSS. Let NUM = 2\({}^{\text{n}}\) be the total possible number of messages since they must be a power of two. To generate the public key, \"pub_key\", the first step is to generate the private keys \(X_{i}\) and public keys \(Y_{i}\) of 2\({}^{\text{n}}\) one-time signatures. For each public key \(Y_{i}\), a hash value \(H(Y_{i})\) is calculated, where \(1\leq i\leq 2^{\text{n}}\). An MHT is constructed with these hash values,  
Figure 9: A binary Merkle hash tree built for the authentic values \(x_{0,0}\), \(x_{0,1}\), \(x_{0,2}\), \(x_{0,3}\). The values of nodes required to verify \(x_{0,0}\) are bounded with broken lines. \(h_{i}\), \(2^{n+1}-1\) nodes, and \(2^{n}\) leaves. In the MSS, the public key \"pub_key\" is the root of the Merkle tree. Consider a message, M, which is to be signed with MSS [45]; first, a signature \(S\) results due to the signing, using a one-time signature technique on the message M. To execute the signature, \(S\), one of the public and private key pairs \((X_{i},\ Y_{i})\) is used [46]. Let the path from a given leaf to the root be denoted by P. The total number of nodes that path P contains is \(n+1\), with paths \(P_{1},\ \ldots,\ P_{n+1}\), where \(P_{1}=y_{1,\ i}\) is the leaf and \(P_{n}=y_{n+1,\ 0}=pub\_key\) is the root of the MHT. We require every child of the nodes \(P_{2},\ \ldots,\ P_{n+1}\) to compute \(P\). As it is known that \(P_{i}\) is a child of \(P_{i+1}\), therefore, to calculate the next node \(P_{i+1}\) of the path P, both the children of \(P_{i+1}\) must be known. To solve this computation, we require the sibling node of \(P_{i}\). Let \(s_{i}\) be the sibling, such that \(P_{i+1}=H(P_{i}||s_{i})\) in the case where \(s_{i}\) is odd; if it is even, then \(P_{i+1}=H(s_{i}||P_{i})\). Therefore, \(n\) nodes, \(s_{0},\ \ldots,\ s_{n-1}\) are required to compute each node present in \(P\).