## 4 Our Cryptosystem  
Our Cryptosystem is a dual security algorithm based on a combination of ECC with ElGamal using a SHA384 as the hashing algorithm and an embedded challenge response to avoid significant attacks. It is referred to as the dual security algorithm as for each session a new key is used for communication along with a stringent authentication mechanism. We built the algorithm on top of the base algorithm proposed in [34], but with improvements on the encryption and hashing process. Initially, in Algorithm 1, the NTR wants to communicate with the MRBS, so the NTR needs to compute the points on Elliptic Curve \(EC\) that are broadcasted with basepoint \(B\) after a periodic interval. Step 1 in the algorithm says to compute \(K_{NTR}\) from Field \(F_{N}\)_where_\(1<K_{NTR}<N-1\). It then computes public key \(P_{NTR}\) with a private key using Equation (1)  
\[P_{NTR}=K_{NTR}\times B \tag{1}\]  
where \(P_{NTR}\)\(K_{NTR}\) are keys for non-transparent relay. Once \(P_{NTR}\) is computed, it will be shared with the MRBS, so it is sent to MRBS over the channel, as shown in Equation (2)  
\[E[K_{NTR}(P_{NTR}+E[P_{MRBS}(CH)])] \tag{2}\]  
```

```
0: A \(  
The Cipher \(C_{MB}\) is then used to calculate the Hash \(H\) using SHA384 or SHA512, the second family of SHA using Equation (6):  
\[H=Hash\left(C_{MB}\right) \tag{6}\]  
Once the Hash is calculated, the communication incorporates Challenge \(CH\) into the solution by solving it using a simple challenge solver that has already been announced by the MRBS using Equation (7):  
\[CH_{1}=Solve(CH)Solve(CH)=Answer\;CH+New\;Challenge \tag{7}\]  
For data authentication, the following procedures can be adapted. The new challenge \(CH_{1}\) contains a solution to the old challenge, and the new challenge to be solved by the NTR is made. The challenges are added in to ensure that communication has occurred successfully, and the new challenge is sent with the same purpose of achieving surety; this message is received at the end. To achieve authentication that the MRBS is the one sending the message, the signature \(S\) is calculated by encrypting the challenge \(CH_{1}\) and Hash \(H\) with its main private key \(K_{MRBS}\), as shown in Equation (8). \[S=E[K_{MRBS}(H+CH_{1})] \tag{8}\]  
Once the signature \(S\) is obtained, the message can be sent to the NTR that will contain the cipher, hash and challenge along with Time stamp TS to maintain the freshness of the message, as shown in Equation (9). \[E[P_{NR}(C_{MB},S,\;P_{MB},TS)] \tag{9}\]  
Equation (9) includes the signature \(S\), the session public key of MRBS \(P_{MB}\), the time stamp \(TS\) to maintain the freshness of the message, and they are encrypted using the temporal public key of NTR \(P_{NTR}\), which can be opened only by the private key of NTR \(K_{NTR}\), as shown in Equation (10). \[DK_{NTR}[E[P_{NTR}(C_{MB},S,\;P_{MB},\;TS)]]C_{MB},S,\;P_{MB},\;TS \tag{10}\]  
Here, \(D\) is used for decryption, and \(E\) is used for encryption, as they both cancel each other, so the message can be obtained. Once the message is out, time stamp \(TS\) is used to check the freshness of the message; if the time is more than the (Time to Live) TTL of the message, the message is discarded, and there is no further processing. If the \(TS\) matches the requirement, the NTR gets the public key from the CA using a whitelist maintained by the CA. This public key of MRBS \(P_{MRBS}\) will be used to decrypt the signature, as shown in Equation (11). \[D[P_{MRBS}E[K_{MRBS}(H+CH_{1})]]=H+CH_{1} \tag{11}\]  
The Hash \(H\) and Challenge \(CH_{1}\) is obtained, and the challenge answer is verified by matching it with the \(CH\) that was sent by the NTR. If it matches, it verifies that the old message was received; else, it might have been lost or held by an attacker. It also solves \(CH_{1}\) to obtain \(CH_{1}\) if a new communication has to occur; else, this calculation is not required.