# A Blockchain-Assisted Security Protocol for Group Handover of MTC Devices in 5G Wireless Networks
## 6 Security Evaluation
### Security Analysis  
* **Mutual Authentication:** By the BSPGH scheme, a gNB verifies the authenticity of the MTCD's signature \(Sig\) by retrieving the public key stored on the blockchain, thereby confirming the identity of the MTCD. Since digital signatures are generated by encrypting messages with a private key and it is computationally infeasible to deduce the private key from the public key, this way allows the MTCD to effectively prove the legitimacy of its authentication request to the gNB. Furthermore, the gNB employs hash-based message authentication code (HMAC) scheme and uses the group key  
Figure 6: Results of formal verification. \(GID\) as the key for the HMAC to generate a signature \(Sig_{t}\). The MTCD, possessing a legitimate \(GID\), verifies \(Sig_{t}\) to prove the legitimacy of the response. In this way, the MTCD and the gNB are able to achieve mutual authentication, ensuring the security of the communication between them. * **Privacy protection:** The temporary identity identifier \(TID_{i}\) is transmitted to each participant over the wireless channel, ensuring that the real identity is only disclosed to legitimate gNBs and the core network. It satisfies anonymity requirements. * **Perfect forward secrecy and backward secrecy:** By the proposed protocol, the generation of the session key \(K_{it}\) relies on randomly generated ECDH parameters. Without the session key, attackers cannot recover the contents of a specific session. Moreover, since a session key is generated for each session and the ECDH parameters for each session key are independent of those from previous or future sessions, the leakage of a session key would only affect the current session. The confidentiality of previous or future sessions would remain unaffected. * **Replay and impersonation attacks resistance:** By the proposed protocol, authentication requests and responses are both marked with a timestamp \(TS\). The \(TS\) constraint ensures that messages are received within a specified time window, allowing easy identification. The replayed messages will be discarded, thus, countering replay attacks. The use of a key system based on discrete logarithms makes deriving private keys from the public keys challenging, preventing attackers from forging signatures and thus impersonating legitimate identities. It can effectively strengthen the ability of the protocol to resist impersonation attacks. * **DoS/DDoS attacks resistance:** The receiving gNB first verifies the timestamp's validity and then compares the signature with records in the blockchain for authentication. If they do not match, the session is immediately terminated, preventing attackers from consuming gNB's computational resources through replay attacks. The failure of one gNB or one AMF will not affect the entire 5G wireless network. Therefore, it can prevent DDoS attacks in 5G authentication. * **Session key leakage:** Attackers may attempt to compute the session key to steal messages transmitted over the wireless channel. However, the session key is formed based on ECDH by the proposed scheme, which relies on the difficulty of the elliptic curve discrete logarithm problem. Attackers cannot obtain \(n_{i}\) and \(n_{t}\) from \(n_{i}\):\(p\) and \(n_{t}\):\(p\), and thus cannot compute the session key \(n_{i}\):\(n_{t}\):\(p\). It effectively prevents session key leakage. * **Sybil attack:** By the proposed protocol, a private blockchain is utilized. Within a private blockchain, access and participation in the network are restricted, allowing only MTCDs that have been registered by core network entities to join and interact. Furthermore, the identities of MTCDs must be verified subsequently, which limits the ability of attackers to forge numerous identities to conduct attacks. Therefore, this approach is capable of resisting Sybil attacks, where an attacker creates a large number of pseudonymous identities to compromise the network.