## 3 The Methodology
### Secure Credentials (SCs)-Based Authentication
In addition, a GN is deployed for each cluster region, and its main purpose is to hold the value of transmitted packets. Due to the energy-consumption issue of the CH, the GNs are placed, and they do not transmit any information, but they communicate with the CH for avoiding security risks. With the use of current sensor measurements and environment data, incorrect data are identified and removed from the edge. To find this information, [PERSON]'s Entropy-based Ten-Fold Cross Entropy Verification (TCEV) has been proposed. This method computes the entropy value for each sensed datum. To determine the current sensed data, entropy is computed and compared with the ten sets of the last transmitted data entropy values. This process is held in the CH. Then, the correct sensed data packets \(\big{(}D_{p}\big{)}\) are encrypted using a lightweight cryptography algorithm called Twine-LiteNet (Lightweight Neural Network), which is represented as Algorithm 2. LiteNet is a type of lightweight algorithm that consists of six layers: convolutional layer, LiteModule convolutional layer, dense layer 1, dense layer 2, and softmax layer. To reduce the time consumption of encryption, the aggregated sensed data are encrypted in parallel mode. The convolutional layer of the proposed LiteNet model includes a linear filter that is used to reduce the computational cost of the convolutional layers during encryption. Table 2 describes the shuffle and hexadecimal values of the S-Box. The values are used to encrypt and decrypt the input blocks. The calculation of the proposed convolutional layers is defined as follows:  
\[X(n)=Y(n)\times H(n) \tag{10}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{2}{c}{**Shuffle Values of Block**} & \multicolumn{3}{c}{**Hexadecimal Values of S-Box**} \\ \hline \(j\) & \(\rho[j]\) & \(\rho^{-1}[j]\) & **y** & **S(y)** \\ \hline
0 & 5 & 1 & 0 & C \\ \hline
1 & 0 & 2 & 1 & 0 \\ \hline
2 & 1 & 11 & 2 & F \\ \hline
3 & 4 & 6 & 3 & A \\ \hline
4 & 7 & 3 & 4 & 2 \\ \hline
5 & 12 & 0 & 5 & B \\ \hline
6 & 3 & 9 & 6 & 9 \\ \hline
7 & 8 & 4 & 7 & 5 \\ \hline
8 & 13 & 7 & 8 & 8 \\ \hline
9 & 6 & 10 & 9 & 3 \\ \hline
10 & 9 & 13 & A & D \\ \hline
11 & 2 & 14 & B & 7 \\ \hline
12 & 15 & 5 & C & 1 \\ \hline
13 & 10 & 8 & D & E \\ \hline
14 & 11 & 15 & E & 6 \\ \hline
15 & 14 & 12 & F & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Shuffle and hexadecimal values of S-box. \[\sum\
olimits_{m=0}^{s-1}X(m)H(n-m) \tag{11}\]  
where X(n) represents the length of the input data packets, H(n) represents the kernel selection, and Y(n) represents the output value. In this layer, the sensed data packets are encrypted. Then, the proposed TWINE algorithm converts plaintext into ciphertext (encrypted data) of 64 bits by performing the round function. It takes 36 rounds to generate ciphertext. The S-box permutation values are defined in the table. The permutation block indexes are defined as \(\rho:\{0,1,\ldots 15\}\), and they are mapped with \(\rho[j]\) sub-block. This is also illustrated in the table. Then, the lite module includes a \(1\times 1\) convolutional layer, and the filter size of the current lite module is \(1\times 1,\ 1\times 2,\ 1\times 3\). The main objective of this module is to reduce the computational cost among the convolutional layers. The lite module is also used to reduce the volume efficiency of the parameters. The \(1\times 1\) convolutional layer is used to improve the local and cluster feature map representations. LiteNet considers the sense data packets to be input. It includes one lite module, two dense layers, and one softmax layer, which include five units that are defined as follows:  
\[\sum\
olimits_{i}^{5}S_{i}=1 \tag{12}\]  
where \(i=1,\ 2\ldots 5\) and \(S_{i}\) denotes the probability distribution. \[Y_{i}=\sum\limits_{n}X_{n}w_{ni} \tag{13}\]  
where w represents the weight values of the softmax layer and X represents the output of the upper layer.