# SIMECK-T: An Ultra-Lightweight Encryption Scheme for Resource-Constrained Devices
## 2 Methodology
### Implementation
OR-based differences are harder to \"undo\", meaning that patterns persist more strongly across rounds but may lack some of the subtlety XOR offers in canceling bits. AND-Based Cryptanalysis

Unlike XOR, which captures bitwise differences, the AND operator focuses on the overlap of bit positions set to 1 in both inputs. Thus, the AND-based difference between \(X_{1}\) and \(X_{2}\) is given by the following:

\[\Delta X_{\text{AND}}=X_{1}\wedge X_{2}\]

where \(\wedge\) denotes the bitwise AND operator. AND-based differences only retain bits set to 1 in both values. This property results in an accumulation effect similar to OR-based differences, but only for bits that are jointly 1 in both inputs. Only bits that are consistently 1 across both inputs remain set in \(\Delta X_{\text{AND}}\). Differences in zeroed bits (0s) are \"ignored\", meaning the propagation will depend strongly on consistently shared bits. Since AND-based differences do not have cancellation properties, differences in shared bits tend to persist across rounds, accumulating in predictable patterns. ### Statistical Evaluation Metrics

[PERSON] et al. proposed a series of metrics to evaluate the security of the Hash XOR Permutation (HXP) lightweight cryptosystem for images [31]. The metrics have been used by [PERSON] et al. in Improved-RC6 (IRC6) [12], to evaluate the security of IRC6, where diffusion/confusion is obtained through a \"Permuted XORed Bytes\" (PXB) layer. A random file of any kind can be seen as a grayscale image with pixel values of 0.255 and a size of \(M\times N\). When \(M=N=32768\), a 1 GB file is obtained. In order to investigate the security of the proposed SIMECK-T algorithm, the metrics from the work of [PERSON] are applied to an encrypted file of 1 GB [31]. The following paragraphs describe the metrics involved and their significance. #### 3.3.1 Chi-Squared

In a random (securely encrypted) file, each byte should have equal probability, with a uniform distribution close to 1/256 for each value. The test was introduced by [PERSON] [73] as a complementary method for linear and differential cryptanalysis. The critical chi-squared value for a given degree of freedom (df) and significance level (\(\alpha\)) is obtained from statistical software or tables. In our case, n = 256 is the number of values that a byte can take. The critical chi-squared value for \(df=n-1=255\) and \(\alpha=0.05\) is approximately 293.248. This means that if the calculated chi-squared statistic is greater than 293.248, we reject the null hypothesis at the 0.05 significance level. Equation (8) is used to validate the uniformity of histograms. Histograms are graphical representations of the distribution of byte levels in pixels of images [31; 81]. If the cipher image has a uniform histogram, it indicates a secure encryption scheme [31; 82]. \[\Delta P=P_{1}\oplus P_{2}.\]0

where i is a pixel value and \(O_{i}\) is the observed frequency of each pixel value. For a grayscale \(M\times N\) image, the expected frequency is \(E=\frac{MxN}{256}\). If the result of this equation is greater than 0.05, the histogram is uniform; otherwise, the histogram is not uniform. For an ideal random file (256 bins), the chi-squared score would be close to 255 but, due to the small file deviations, this may vary. #### 3.3.2 Encryption Quality

Equation (9) represents the encryption quality (EQ) of the cryptosystem. \[\Delta P=P_{1}\oplus P_{2}.\]1

where \(P\) is the plain image and \(C\) is the cipher image, both of equal size. \(L\) gives the range of values for each byte in \(P\) and \(C\). Functions \(f_{L}(C)\) and \(f_{L}(P)\) represent the occurrence of each byte value, \(L\), in \(P\) and \(C\). #### 3.3.3 Mean Square Error

Equation (10) gives the mean square error (MSE). This is the distance between the input, \(P\) and the output, \(C\). A high value of MSE means better encryption quality. \[\Delta P=P_{1}\oplus P_{2}.\]2

where \(P\) is the plain image and \(C\) is the cipher image, both of size \(M\times N\).