# SIMECK-T: An Ultra-Lightweight Encryption Scheme for Resource-Constrained Devices
## 2 Methodology
### Implementation
\[(P_{1},C_{1})\quad\text{and}\quad(P_{2},C_{2}),\]1

where P(i, j) and C(i, j) are pixels at row i and column j of images P and C, respectively, while \(\mu_{p}\) and \(\mu_{c}\) are the averages of the pixels in P and C, respectively. #### 3.3.13 Next Pixel Change Rate

Equations (20) and (21) define the net pixel change rate (NPCR) [31; 83] and the unified average change intensity (UACI) [31; 84], respectively. These formulas are used to measure the resistance of a cipher to cryptanalysis attacks between two images P and C. The ideal values for the two metrics are 99.6093% for NPCR and 33.4635% for UACI, respectively [31; 85]. \[(P_{1},C_{1})\quad\text{and}\quad(P_{2},C_{2}),\]2

\[(P_{1},C_{1})\quad\text{and}\quad(P_{2},C_{2}),\]3where \(D(i,j)=0\) if \(P(i,j)=C(i,j)\); otherwise, \(D(i,j)=1\) and \(E(i,j)=abs(P(i,j)-C(i,j))\). #### 3.3.14. Correlation Coefficient

Equation (22) defines the correlation coefficient of adjacent pixels in an image [31,86]:

\[ \begin{cases}\text{E}(x)=\frac{1}{n}\sum_{i=1}^{n}x_{i},\quad D(x)=\frac{1}{n }\sum_{i=1}^{n}(xi-E(x))^{2}\\ \gamma x,y=\frac{\text{cov}(xy)}{\sqrt{D(x)}(y)},D(x)\
eq 0\text{ and }D(y)\
eq 0\\ \text{cov}(x,y)=\frac{1}{n}\sum_{i=1}^{n}(x_{i}-E(x))(y_{i}-E(y))\end{cases}  \tag{22}\]

where \(x_{i}\) represents the grayscale value of a pixel, n is the number of pairs \((x_{i},y_{i})\), and E(x) and E(y) give the mean values of \(x_{i}\) and \(y_{i}\), respectively. The result in the case of a secure encryption scheme should be close to 0 [31,87]. #### 3.3.15. Entropy

Equation (23) measures the entropy of an image cryptosystem. \[H(m)=\sum_{i=0}^{2^{N}-1}P(m_{i})\log_{2}\biggl{(}\frac{1}{P(m_{i})}\biggr{)} \tag{23}\]

where m is the image, \(2^{N}\) is the pixel sample space, \(m_{i}\) represents pixel i of image m and \(P(m_{i})\) is the probability of \(m_{i}\). The entropy H(m) of an image encrypted with a \(2^{N}\) pixel sample space is N. Therefore, the cryptosystem is resistant to entropy attacks if the result of the entropy analysis H(m) is close to N.

### Performance Evaluation on Raspberry PICO

The performance evaluation of the proposed SIMECK-T encryption scheme was implemented on a Raspberry PICO with a 2040 processor shown in Figure 1.

The code was compiled for the ARM architecture and installed bare metal on the device. The groups of measurements are performed with microsecond precision and the average is presented in the corresponding results section. ## 4 Results

### Randomness of the Output

#### 4.1.1. Analysis with NIST Statistical Test Suite

Table 1 shows the total number of failed NIST randomness tests for full-round ciphers. Lower values are better and are shown with a green color. The statistical test suite [71] comprises 188 tests and higher values are bad and are shown in red. The SPECK and TEA families are winners, with TEA failing 0 tests in 6 rounds. Figure 1: Raspberry PICO 2040 used for benchmarking SIMECK-T operations. Table 2 contains the results for reduced-round versions of the same ciphers modified using the substitution boxes from RC4D [22] and the same approach as demonstrated by the SPECK-R cipher [19]. SIMECK-R is an absolute winner, with XTEA-R coming in second place. #### 4.1.2 Analysis with AIS.31 Statistical Test Suite

Table 3 contains the total number of failed AIS.31 [26] tests for the full-round ciphers. The test suite from [72] contains 11 tests, and in order to count the failures, it is considered that any partially failed test showing nongreen output from the test suite is a failure. XTEA and XTEA are winners after only four rounds, and TEA follows in round 5. Table 4 shows the results for the reduced round ciphers using the AIS.31 statistical tests. SIMECK-R is an outstanding winner, failing 0 tests with only 1 round of encryption enabled and keeping it low throughout the rest of the rounds. It is very important to point out that for each test the complete number of rounds has been analyzed using both statistical test suites.