## 3 The Methodology
### Secure Credentials (SCs)-Based Authentication  
Initially, each IoMT device is authenticated with its ID, Password, and PUF (physically unclonable function). PUF is a unique identity (digital fingerprint) for each IC. During authentication, these three factors are verified. If they are valid, then the gateway generates a secret key for the device. The secret key is generated using Twine-LiteNet (Lightweight Neural Network). This authentication process is shown in Figure 3. For each authentication operation, these three factors are used as known facts and verified with a secret key for  
Figure 2: System model. authentication. The proposed TWINE algorithm is executed in the convolutional layer of the Lightweight Neural Network is represented as Algorithm 1. The TWINE algorithm is a lightweight 64-bit block cipher algorithm. It generates an 80-to-128-bit key that improves hardware efficiency. This algorithm has 16 4-bit sub-blocks. The secure credentials are encrypted using this algorithm, and a secret key \(S_{K}\) of 64 bit in length is provided, after collecting plaintext (T\({}_{\text{P}}\)). This algorithm of 64 bit in length provides ciphertext (C\({}_{\text{T}}\)) of 64 bit in length. It also has a round key (R\({}_{\text{k}}\)) value of 80 to 128 bit in length that is derived from S\({}_{\text{k}}\). The TWINE algorithm includes a non-linear layer using a 4-bit diffusion layer and S-Boxes, and it permutes the 16 blocks. The round function is executed 36 times for providing S\({}_{\text{k}}\). The permutation of the block indexes is \(\rho:\{0,1,\ldots 15\}\rightarrow\{0,1\ldots 15\}\), where the sub-block is mapped with the \(\rho[j]\)th subblock. We form the clusters by the information sensed from the Environment. In CH election, we consider the six factors: link quality (RSS value) \(F1\), residual energy \(F2\), no. of rounds reached (expected count) \(F3\), fairness score according to geographical area (0-1) \(F4\), coverage ratio \(F5\) and node degree \(F6\). Figure 3: zSlices Fuzzy Sets algorithm. The pseudocode outlines the TWINE encryption algorithm, which takes inputs such as ID, password, and physically unclonable function (PUF) to generate a secret key (S_K). The algorithm performs a series of operations, including XOR operations, substitution (S), and permutation (\(\rho\)), to derive the key from the inputs and the intermediate variables. In Figure 3, the Fuzzy Set algorithm includes the \(x\)-axis and \(y\)-axis for generating fuzzy rules. In the present study, the third-dimension \(z\)-axis is taken for fuzzy-set generation; it is known as \(z\)Slices and provides the interval set in the third dimension. The representation of zSlices is defined as follows:  
\[Z_{i}=\int_{y\in Y}^{i}\int_{v_{i}c_{i\mid q}}^{i}\frac{Z_{i}}{y,v_{i}} \tag{1}\]  
The membership function of the zSlices Triune Fuzzy Sets algorithm is defined as follows:  
\[M_{f}(y^{\prime})=\int_{v\in I_{y}}^{i}\frac{Max(Z_{i})}{v},\;J_{y^{\prime}} \subseteq[0,1] \tag{2}\]  
where \(0\leq i\leq I\), which represents fuzzy set 1. The other two fuzzy-set values are also represented like this. The join operation is performed slice by slice along the \(x\)-axis. Convex zSlices-based general fuzzy sets \(\rm P_{i}\) and \(\rm Q_{i}\) are considered with membership grades \(M_{fP}(y)\)_and_\(M_{fQ}(y)\), and the zSlices-induced fuzzy sets are represented as follows:  
\[M_{fP}(y)=\frac{\sum_{i=0}^{I}\sum_{Pi\in[I_{Pi},v_{Pi}]}Z_{i}}{v_{Pi}} \tag{3}\]  
\[M_{fQ}(y)=\frac{\sum_{i=0}^{I}\sum_{\mathbb{C}_{\mathbb{Q}^{\prime\prime}\in[ \mathbb{Q}^{\prime\prime},\mathbb{Q}^{\prime\prime}]}}Z_{i}}{v_{Pi}} \tag{4}\]  
The join operation between two zSlices-based fuzzy sets is used to reduce the join operation computation between both sets. The other two fuzzy sets are also calculated like this. It is an advanced version of type-2 fuzzy sets. In this approach, triple fuzzy sets are used in parallel mode. Figure 4 shows the diagram for zSlices Triune Fuzzy Sets. Table 1 illustrates the number of fuzzy rules for CH selection.