## 3 System Model
### Threat Model and Assumptions
#### 4.1.1 Address Generation  
In P2P overlay networks, to accommodate the needs of scenarios such as node identification and authentication, uniquely identifying each node so that the node can identify other nodes, as well as identifying any other information needed to complete authentication, the information contained directly or indirectly in the address is as follows:  
* Logical address: Logical address of the P2P overlay network, used for P2P network basic operations such as virtual networking and routing connections in DHT. * Identity: The unique identity used by the node for authentication, and the node performs identity authentication in both directions before transmitting information. * Encryption Key: The key for encrypting transmission, used to encrypt control information or routing information when transmitting. At the same time, certain restrictions are made on the generation of addresses, requiring that the generation of this address requires a certain amount of computation. Nodes cannot be made to randomly generate addresses that are logically close to each other in order to prevent the attacks in P2P networks mentioned above. The Node ID is calculated as defined below:  
\[NodeID:=\mathit{Sha1}\left(\mathit{\mathit{Blake2b\_512}\left(i_{\mathit{pub}} \left|\mathit{i_{\mathit{uk}}}\right.\right)}\right)\]  
In above definition, \(i_{\mathit{pub}}\) represents the public key of the node, the node needs to generate a pair of \(\left(i_{\mathit{pub}},\mathit{i_{\mathit{priv}}}\right)\), the public key is used for the generation of \(NodeID\), the private key needs to be stored locally with the node. Suppose that the elliptic curve \(y^{2}=x^{3}+ax^{2}+bx+c\) and its generator point \(G\) have been shared. We use the random number generator RNG(0) to generate a random number \(rn\) of length 160 bits as the private key \(i_{\mathit{priv}}\), and then calculate \(K=rn*G\) as the public key \(i_{\mathit{pub}}\). The public key and private key will be used for the process of authentication and encryption and decryption. \(i_{\mathit{uk}}\) represents the uniform unique key in this network, which is used to break up the hash result of \(i_{\mathit{pub}}\), so that the logical distance of \(NodeID\) is as large as possible and becomes irregular. \(\mathit{blake2b\_512}(. )\) is a hash function that generates 512-bit message digest after execution. This digest is then used in the \(\mathit{Sha1}(. )\) hash algorithm to generate a final 160-bit message digest for the computed NodeID. The difficulty \(Diff_{n}\) is also defined as the number of bits whose first part of the \(NodeID\) is continuously zero. \[Diff_{n}:=\mathit{BinLen}\left(\mathit{\mathit{PreZero}}\left(\mathit{\mathit{ NodeID}}\right)\right)\]  
Nodes with \(Diff_{n}\) less than the pre-defined the minimum \(Diff_{n}\)\(D_{\mathit{min}}\) are not allowed to be routed in P2P networks, which makes the address generation of nodes difficult and requires some arithmetic power to generate a \(NodeID\) that can be used in the network. It can also further increase the uncertainty of address generation, and it is difficult to find the association between seed information and eligible \(NodeID\) information to prevent the generation of P2P network attacks in address generation. \(D_{\mathit{min}}\) will be determined by the average computational power of the nodes, and the \(NodeID\) logical distance \(LDist\) between the two nodes mentioned above is defined as below:  
\[LDist:=NodeID_{A}\oplus NodeID_{B}\]  
According to the above definition, the \(NodeID\) generation process is shown in Algorithm 1.