# SIMECK-T: An Ultra-Lightweight Encryption Scheme for Resource-Constrained Devices
## 2 Methodology
### Implementation
The law of the iterated logarithm (LIL) is also used because it was proven to detect nonrandom characteristics when standard tests fail to do so [27]. LIL successfully detects the randomness vulnerability in Debian GNU/Linux distributions that plagued many software tools and services with cryptographic primitives [28]. A cipher is considered strong as long as the output is indistinguishable from true random data [73]. Therefore, stating how well cryptographic augmentations on reduced-round ciphers manage to produce random output is critical when selecting primitives for creating new ciphers. ### Cipher Strength

An ideal cipher is unbreakable by other means than brute force. For a decent key size, this is an unfeasible attack that can take longer than the age of the universe. Password-based key derivation functions, as specified by NIST SP 800-132 [70], can be used to defend against weak passwords. Memory hard functions such as Argon2 also protect against this kind of attack [69]. When a reduced-round version of a cipher can be approximated with a linear function, or when a trail can be detected throughout the randomness of the output in relation to the input with a certain bias, attacks that can break the cipher can be created. When these vulnerabilities escalate to a large number of rounds, up to the full round cipher, the algorithm is considered fully broken. Anything that can help an attacker distinguish the specific cryptographic algorithm from true random data is a characteristic of that cipher. Consequently, it is important that a cipher does not have any. #### 3.2.1 The Avalanche Effect

The avalanche effect is a property of secure block ciphers, which requires that for any bit that is flipped in the input, half of the output bits should be changed. The strict avalanche effect requires that exactly 50% of the output bits be flipped, but this is hardly met by any of the available ciphers, as a probabilistic feature. Equation (7) defines the avalanche effect. For 64-bit ciphers, this criterion requires that on average 32 bits are flipped in the output whenever a single random bit is changed in the input. \[AE(\%)=\frac{\#\text{\emph{of changed bits in ciphertext}}}{\text{\emph{ total \# of bits in ciphertext}}}\times 100 \tag{7}\]

#### 3.2.2 Linear Cryptanalysis

Listing 1 shows the bias calculation function for finding linear approximations of SIMECK-T.

Algorithm 5 was proposed by [PERSON] [74] in 1994 to find statistical biases over a large number of plaintext and encrypted block pairs such that possible linear approximations of the encryption function can be detected. ```
Input: An oracle \(\Omega\), a data complexity \(\
u\) (number of pairs), \(a\), \(b\), \(c\), \(\epsilon\) (bias) Output: A guess about \(c\cdot k\)
1 Initialize a counter \(\hat{m}\) to 0;
2 for\(i\gets 1\)to\(\
u\)do
3 Generate a random plaintext \(x_{i}\);
4 Ask \(x_{i}\) from \(\Omega\) and get \(y_{i}=f_{k}(x_{i})\);
5 if\(a\cdot x_{i}\oplus b\cdot y_{i}=0\)then
6\(\hat{m}=\hat{m}+1\);
7
8 end if
9
10 end for
11 if\(\epsilon>0\)then
12 if\(\hat{m}>\frac{\
u}{2}\)then
13 Output \"\(c\cdot k=0\)\";
14
15 end if
16
17 end for
18
19 else
20 if\(\hat{m}>\frac{\
u}{2}\)then
21 Output \"\(c\cdot k=1\)\";
22
23 end if
24
25 end for
```
**Algorithm 5**[PERSON]'s [74] first algorithm for guessing \(c\cdot k\) according to [PERSON] [75]

Initially used on the Data Encryption Standard (DES) algorithm, [PERSON] broke the 8-round DES with a number of \(2^{21}\) pairs and the full-round DES with \(2^{47}\) pairs. The higher the number of pairs, the better the accuracy of the algorithm. Using a linear approximation attack on SIMECK requires a minimum of \(2^{24}\) pairs for the \(32/64\) version [76], while SIMECK with a 128-bit key requires at least \(2^{60}\)[76,77]. A linear attack on TEA requires a minimum of \(2^{62}\) pairs [78,79].