# Blockchain-Based Decentralised Authentication in Closed Environments
## 4 Results
### Descriptive Analysis  
In this section, we explain how our proposed authentication protocol meets security requirements and is secure against various attacks. **Mutual authentication:** Node \(A\) and validator nodes \(V_{i}\) achieve mutual authentication by proving that they possess the secret group key \(K\). \(V_{i}\) show that they possess \(K\) by correctly decrypting Message 1 sent by \(A\) and sending \(N_{A}+1\) back to \(A\), which verifies the validity of this component. \(A\) proves that it possesses \(K\) by encrypting \(H(PWD)\), which is decrypted and verified by nodes \(V_{i}\).  
**Confidentiality, integrity, and transaction authentication:** The two protocol messages are encrypted using the secret group key \(K\), which means that only authorised nodes will be able to decrypt them. \(K\) is used to compute the hash values (\(MAC_{K}()\)) of the messages. Therefore, their integrity can be verified by recipients who also possess the key \(K\). Using \(MAC_{K}()\), the protocol achieves authenticity or transaction authentication as well.  
**Replay attack:** In the proposed authentication protocol, both messages are sent using a fresh nonce, which can be checked by the recipient. If an attacker replayed an already transmitted message, the recipient would recognise that the nonce was the same as that in the previously transmitted message. Hence, a replay attack would be detected.  
**Man-in-the-middle attack:** Resistance to a man-in-the-middle attack implies that an attacker cannot intercept or forge a message prior to forwarding it to the recipient. Our protocol is resilient to this type of attack for two reasons. First, the sender's identity is included and encrypted in each message. The second is the use of the secret group key \(K\), which prevents an attacker from modifying messages.  
**Insider attack:** The decentralised authentication protocol is designed to operate in a closed network and is based on blockchain, which is vulnerable to an insider attack. An insider attack is when a validator node \(V_{i}\) incorrectly verifies the authentication attempt by node \(A\) on purpose. However, because a consensus must be reached among the validator nodes, it is difficult for a rogue validator node to act maliciously. Furthermore, to successfully carry out this act, the malicious validator must control over 51% of all validator nodes. Therefore, we can claim that the proposed protocol is resilient to an insider attack. Moreover, as we explain in the Implementation section, the registration of validator nodes involves the use of public key infrastructure and a multi-signature scheme, and an insider attack could be prevented via those mechanism, too.  
**Validator node collusion:** Node collusion [23] is when a group of validator nodes colludes and launches attacks such as double spending or introduction of Byzantine faults, which could lead to compromising the security and integrity of the protocol. Our protocol proposed that one possible consensus mechanism that could be applied was the proof of stake, which in a closed environment could have all validator nodes putting in the same number of stakes and which could randomly select new validator nodes for each round of consensus.