# Blockchain-Based Decentralised Authentication in Closed Environments
## 5 Implementation and Use Case
### Implementation  
To translate the proposed theoretical decentralised authentication protocol framework into practice, we outline a step-by-step implementation process for our decentralised authentication protocol for closed environments. The first step is validator node registration. In a closed environment, trusted nodes such as servers from different departments within an organisation are identified and registered prior to deployment of the authentication protocol. This can be achieved in a variety of ways, including through a secure manual registration process or verifying identities via secure credentials. However, a more established approach involves a combination of public-key infrastructure (PKI)-based registration and multiparty approval. That is, when a validator node is created, it will have to contact a certificate authority (CA) to be issued with a digital certificate. This certificate then serves as a verifiable credential that can be used to authenticate this validator node to other already existing validator nodes in the closed network or organisation. While being registered, existing validator nodes must approve the registration of the new validator node before it is granted permission to be a part of the network. This approval process could be implemented using a multi-signature scheme [25], where each approving node signs the authentication request with their private key. This multi-signature scheme could also help secure the process against insider attacks. Apart from the insider attack during the approval stage of registration that could be prevented by using a multi-signature scheme due to the necessity of private key possession, another concern is the risk of Sybil attacks. This is where an attacker creates fake nodes which behave maliciously to gain control over the network [26]. To reduce the risk of this attack, in addition to the registration involving PKI, CA, and digital certificate verification, some form of physical proof may be necessary. This method would be possible due to the \begin{table}
\begin{tabular}{c c c} \hline \hline
**Protocol** & **Messages** & **Total Overhead** \\ \hline
[5] & 4 & \(8T_{hf}+8T_{enc/dc}+4T_{const}\) \\
[14] & 3 & \(17T_{mut}+8T_{hf}\) \\
[24] & 2 & \(14T_{mut}+8T_{hf}+4T_{enc/dc}+2T_{bm}\) \\ Ours & 2 & \(4T_{hf}+4T_{enc/dc}+3T_{const}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Computational overhead comparison. nature of private or closed environments. Further, we believe that a multi-signature scheme would provide an extra layer of protection against Sybil attacks, too. Once these validator nodes are registered, a group key agreement protocol such as those based on Diffie-Hellman [18; 19] or elliptic curve cryptography [20] is conducted to establish a shared secret among them for secure communication. The next step is the integration of the proposed authentication protocol with existing systems. In this step, the proposed protocol can be integrated with existing systems using application programming interfaces (APIs) or middleware that can facilitate communication between the authentication protocol and other systems. For the authentication process to achieve decentralisation, a consensus mechanism such as proof of work or proof of stake is implemented to validate transactions and verify entities wanting to enter the system. In fact, if the protocol is implemented on an Ethereum-based platform, the proof-of-stake consensus mechanism is already a part of the platform and will be used by the validator nodes when the protocol is executed. Although we have not specified the exact parameters for the consensus mechanism, it is important to acknowledge that the choice of those parameters could have significant impacts on authentication processing time and latency, as well as security. For example, for proof of stake, higher stake requirements would increase the cost of the attacks but may also lead to centralisation. This also implies that lower stakes may lead to security problems.