# SIMECK-T: An Ultra-Lightweight Encryption Scheme for Resource-Constrained Devices
## 2 Methodology
### Implementation
\((i,j)\) represents the grid location of pixels \(P(i,j)\) and \(C(i,j)\). Equation (11) represents the peak signal-to-noise ratio (PSNR) and is used to measure image fidelity. It compares the cipher image (C) and the plain image (P) in terms of quality. #### 3.3.4 Peak Signal-to-Noise Ratio

\[\Delta P=P_{1}\oplus P_{2}.\]3

where \(I_{max}\) is the highest pixel value. #### 3.3.5 Structural Similarity Index Measure

Equation (12) gives the measure of the structural similarity index (SSIM) between two images, P and C. These values range from \(-1\) to \(+1\). High values imply a high similarity between the two images, while low values indicate a low similarity. \[\Delta P=P_{1}\oplus P_{2}.\]4

where \(\mu_{p}\) gives the luminance, which is the average of all the pixel values, and \(\sigma_{p}\) is the standard deviation of all the pixel values. \(D_{1}\) and \(D_{2}\) represent constant to steady division with the feeble denominator. If the SSIM between the plain image (P) and the cipher image (C) is low and close to \(-1\), the system is secure. #### 3.3.6 Normalized Cross-Correlation

Equation (13) is the normalized cross-correlation (NCC). This metric also ranges from \(-1\) to \(+1\), and it measures the similarity between two images P and C. Values close to \(-1\) indicate there is a strong correlation between P and C, while values close to \(+1\) indicate a weak, or no, correlation between the two images. A good cipher is represented by values close to \(+1\). \[\Delta P=P_{1}\oplus P_{2}.\]5

where M and N give the height and width of images P and C (they should have the same size) and \(P_{i,j}\) is the pixel of image P at row i and column j. \(\mu_{p}\) and \(\mu_{c}\) are the means of the pixels in images P and C, respectively, while var\({}_{P}\) and var\({}_{C}\) represent the variances of images P and C, respectively. #### 3.3.7 Mean Absolute Error

Equation (14) defines the mean absolute error (MAE). If the value of MAE is greater than 75, the image cryptosystem is considered secure. The higher the value of MAE, the more secure the cryptosystem. \[\Delta P=P_{1}\oplus P_{2}.\]6

where P(i, j) and C(i, j) are pixels at row i and column j of images P and C, respectively. #### 3.3.8 Normalized Absolute Error

Equation (15) represents the normalized absolute error (NAE). This is used to compare the quality of an image (C) to that of a reference image (P). A high value indicates a low image quality, while a low value means a high image quality. \[\Delta P=P_{1}\oplus P_{2}.\]7

#### 3.3.9 Maximum Difference

Equation (16) gives the maximum difference (MD), between two pixels at the grid location (i, j), of the plain image P and the cipher image C. A high value implies that the cryptosystem is more secure than a low value. \[\Delta P=P_{1}\oplus P_{2}.\]8

#### 3.3.10 Average Difference

Equation (17) defines the average difference (AD). Given the random output of the cipher, a high value means that the cryptosystem is not secure, while a lower value indicates a secure cryptosystem. \[\Delta P=P_{1}\oplus P_{2}.\]9

#### 3.3.11 Structural Content

Equation (18) defines the formula for calculating the structural content (SC) between the original image, P, and the processed image, Pm. A value of 1 indicates a high quality of the processed image, while a higher value implies a low quality of the processed image. This equation is a measure of the degradation of the processed image when compared to an ideal image, P. For a secure cryptosystem, the value of SC should be high. \[(P_{1},C_{1})\quad\text{and}\quad(P_{2},C_{2}),\]0

#### 3.3.12 Two-Dimensional Correlation Coefficient

Equation (19) represents the two-dimensional correlation coefficient (2 DCC). This coefficient can be used to calculate the difference or similarity between two images. A low value (or zero) means that the two images are different, while a high value implies that the two images are similar.