A Novel 5-Bit S-Box Design For Lightweight Cryptography Algorithms
A Novel 5-Bit S-Box Design For Lightweight Cryptography Algorithms
Keywords: Cryptography is one of the techniques to secure communication and data transfer over the network. It
Internet of Things (ioT) performs well on resource-rich devices (PC, servers, smartphones, etc.). However, it may not fit or, if forcefully
Radio Frequency Identification (RFID) fitted, perform poorly on the resource-constrained Internet of Things (IoT) devices (e.g., Radio Frequency
Lightweight cryptography (LWC)
Identification (RFID) tags, sensors). For these reasons, there is a need for a lightweight version of cryptography,
Substitution-box (S-box)
called lightweight cryptography (LWC). While designing any cryptography algorithm, a substitution box (S-box)
Chaotic mapping
Cryptanalysis
is a core and the only component that offers a nonlinear functionality between inputs and outputs. Various
ASIC platform researchers propose various S-box designs for different applications. Still, very few of them maintain the
trade-offs among cost, performance and security, especially when considered resource-constrained IoT devices.
First, the article discusses various S-boxes used in the popular LWC algorithms by their input–output bit-size
(3/4/5/6/8 bit) and highlights their strengths and limitations. Then, it focuses on the proposed 5-bit S-box
design. The novel design uses a chaotic mapping theory to offer a random behaviour of the element in the
proposed S-box. The experimental results from ASIC implementation reveal two essential characteristics of
the proposed S-box, cost and performance, and further, compare it with 4/5-bit S-box competitors. Finally,
the article demonstrates the security strength of the proposed 5-bit S-box through various cryptanalysis such
as bijective, nonlinearity, linearity, differential cryptanalysis, differential style boomerang attack, avalanche
effect, bit independence criterion, etc. Also, a comparison is carried out to exhibit the superiority of the
proposed 5-bit S-box over its 5-bit competitors.
1. Introduction Symmetric key cryptography can be classified into three types: block
cipher, stream cipher, and hash function. Based on the structure used,
Cryptography is originally from the Greek words, ‘‘kryptÓs (hid- block cipher can be further categorized into six subcategories:
den/secret) and graphein (to write)’’, means ‘‘secret writing’’ [1]. It Substitution-Permutation Network (SPN), Feistel Network (FN), Gen-
is a technique that converts readable text (known as plain text) into eral Feistel Network (GFN), Add-Rotate-XOR (ARX), NonLinear-
unreadable form (known as a cipher), called encryption and the reverse Feedback Shift Register (NLFSR) and Hybrid [6]. Fig. 1(B) depicts the
procedure restores it to its original form, called decryption [2]. It types of cryptography algorithms, concentrating on the symmetric one.
secures the communication by guaranteeing confidentiality, integrity In this work, we have focused on the Substitution technique used in
and authentication and authorization of the data [3]. Traditional cryp- SPN and FN, the two most popular structures in lightweight cryptog-
tography could be easily applied to servers, personal computers and raphy [7], by briefing the existing work and by proposing a novel
smart devices such as smartphones, wearables and other smart gadgets 5-bit substitution box (S-box) that uses enhanced logistic theory [8]
(Fig. 1(A)). But it could not be deployed easily on resource-constrained
for dynamic chaotic behaviour of the elements in the S-box.
Internet of Things (IoT) devices such as sensors, RFID tags, actuators,
Substitution and Permutation are two primitive cryptographic op-
etc., [4] due to their limited memory, small physical area to implement,
erations introduced by Claude Shannon in 1949 [2]. Substitution is
low computing power and low energy [5]. Such resource limitation
the heart of any SPN based cryptography algorithm. It is achieved
challenges could be effectively addressed by its lighter version, called
through S-box in which each element in the plaintext (bit/letter or
lightweight cryptography [6].
group of bits/letters) is mapped into another element to offer confusion
Any cryptography algorithm can be classified into two main cate-
gories, symmetric key and asymmetric key cryptography (Fig. 1(B)). property. It makes the relationship as complex as possible between key
∗ Corresponding author.
E-mail addresses: [email protected] (V.A. Thakor), [email protected] (M.A. Razzaque), [email protected] (A.D. Darji), [email protected]
(A.R. Patel).
https://doi.org/10.1016/j.jisa.2023.103444
Fig. 1. Classification of cryptography based on (A) Implementation on IoT devices (B) Structure based.
and cipher. On the other hand, permutation rearranges each element of the 5-bit S-box over other 𝑛-bit S-boxes by comparing their execution
of the plain text to offer diffusion property using a permutation table cost. Compared to the resource requirement data available for the 4/5-
or a technique called transposition. The strength of any cryptography bit S-box of the popular algorithms, the proposed 5-bit S-box can be
algorithm could be derived from its S-box architecture. Many param- implemented using a few resources (area and power). Not only that, but
eters could define the structure of an S-box, but one of the critical it easily fits with various block lengths (32-bit, 48-bit, 64-bit, 128-bit
parameters is the input bits it takes. There are various S-boxes with and 256-bit). And therefore, it could be used easily with different LWC
different length input bits such as 3-bit, 4-bits, 5-bit, 6-bit and 8- algorithms, particularly with LWC algorithms installed on resource-
bits. Generally, the security level goes up as the number of input bits constrained IoT devices (such as RFID tags, sensors, smart cards, etc.) to
increases, leading to higher resource demand such as memory, physical play with small/tiny messages. Also, the proposed 5-bit S-box provides
area, processing power and energy. For instance, 8-bit S-boxes are more significantly better security. The second half of the article demonstrates
secure compared to 4-bit S-boxes, but expensive in terms of resource the security resistance of the proposed 5-bit S-box by comparing it with
utilization [6]. the same bit-size S-boxes via essential security properties.
The S-boxes are the fundamental elements of symmetric cryptog- Considering the significance of substitution technique in lightweight
raphy, providing nonlinearity to the algorithms. In the last decade, cryptography algorithms, this article takes an inclusive view on design
a variety of S-boxes have been studied and proposed by various re- criteria of S-box to trade-off among performance, cost and security.
searchers to support different cryptographic applications [9–22]. Some Section 2 discusses existing 𝑛-bit S-boxes along with their advantages
of these are not suitable for lightweight applications due to their heavy and limitations. The proposed 5-bit S-box is discussed in detail in
structure and high demand for resources (such as 8 and 6 bit S-boxes). Section 3 by elaborating its design criteria, various schemes to derive
In contrast, some suffer during critical cryptanalysis (such as 3 and over different block sizes and also by demonstrating its performance
4 bit S-boxes). While focusing on the lightweight cryptography algo- and implementation cost. One of the crucial trade-offs, security char-
rithms, 4-bit S-boxes are the most popular choice amongst the others acteristics (cryptanalysis) of the proposed model, is evaluated and
due to their compact structure and ease of implementation in [16, documented in Section 4 by comparing it with the same-size existing
20,21,23]. They exhibit excellent performance in resource-constrained S-boxes. Finally, Section 5, concludes the proposed work.
environments; however, the security protection is weaker compared to
high-end bit S-boxes. The second most popular S-box is 8-bit S-box 2. Existing S-boxes & facts
(variant of AES [24]) due to its robust strength [11,12,17] but requires
high amount of resources to get an acceptable performance. Thus, a This section starts with a discussion of existing S-box designs and
trade-off amongst performance, cost and security is missing and creates their advantages and limitations. Further, it reveals the design facts of
the demand for a balanced S-box. these existing S-boxes and inspires to development of a new S-box with
Recently, many researchers have proposed various S-boxes [9,15,25, a balance between cost, performance and security.
26] based on some chaotic theory that shows good resistance against
cryptanalysis. However, most of them are 8-bit in size. The comparison 2.1. Popular S-boxes
of cryptanalysis for these 8-bit S-boxes is showcased, but the perfor-
mance and cost are not compared with other bit-size S-boxes. Due to Many researchers and scientists proposed a variety of S-box con-
their large size (8 × 8 bit), these S-boxes are not suitable for resource- cepts in the past. Some show high resistance against various attacks and
constrained IoT devices or, in other words, the design is not ideal for high resource demand, whereas some demonstrate better performance
lightweight cryptography. In addition, very few algorithm designs suit but a weak stand against the security attacks. Most of these S-boxes
the short messages. take 3-bit, 4-bit, 5-bit, 6-bit or 8-bit input and produce either the same
This paper proposes a new 5-bit S-box design that uses the latest or compressed bit output [14]. Among these, 4-bit S-boxes are popular
chaotic mapping technique suitable for lightweight cryptography algo- among lightweight cryptography algorithms due to their compact [20,
rithms, particularly for small/tiny messages in IoT devices like RFID 21] but simple implementation [13]. This section presents an overview
tags, sensors and smart cards. The article demonstrates the importance of S-boxes used by popular lightweight cryptography algorithms such
2
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
6-bit S-box: DESL is the lightweight version of DES (Data Encryption The facts about S-box observed from the study are as follows:
Standard), where it is further updated as DESXL with a key whitening • 3-bit S-box is the cheapest in terms of memory, energy and
feature to improve the security [48]. DESL/DESXL, uses 6-bit S-box that computing power along with high performance but can be easily
takes 6-bit input and produces compressed 4-bit output [14,48]. Both victimized of an attack due to only 23 different S-box possibilities.
replaces 8 different 6 × 4 bits S-box of DES with a single 6 × 4 bits S- • 4-bit S-box is more efficient than 8-bit S-box in terms of energy
box, 𝑆 ∶ {0, 1}6 → {0, 1}4 . The first and last bits of the input form a 2-bit consumption but provides low security (this could be resolved by
binary to select one of four rows, and the middle 4-bit selects one of increasing the number of rounds).
the sixteen columns (Table 4). For instance, 6-bit input 011001, the row • 5-bit S-box is not widely used due to its odd nature but could be
is 01 (row 1), and the column is 1100 (column 12) will be selected to an alternative to 4-bit S-box in terms of improved security.
produce the output 13 (1101). The possible number of different S-boxes • 6-bit and 8-bit S-boxes are comparatively more secure than 4-bit
with this design criteria is 256 [48]. S-box but expensive in terms of resources.
Table 8 exhibits the existing 𝑛-bit S-boxes and their related concerns.
8-bit S-box: ICEBERG [49] uses an 8 × 8 S-box, 𝑆 ∶ {0, 1}8 → {0, 1}8
(Table 5) (inspired from AES [24]), spread over 3 stages (𝑆0 , 𝑆1 , 𝑆0 ) 3. Proposed work
in the form of 4 × 4 S-boxes (Tables 6, 7) in parallel to achieve
the substitution. Many algorithms use 8-bit S-box, but it is quite ex- This section gives an inclusive view of the design criteria of the pro-
pensive in terms of cost and performance while implementing on posed 5-bit S-box for lightweight cryptography algorithms by consider-
resource-constrained IoT devices. ing the significance of the substitution technique. Further, it describes
3
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
4
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
Fig. 2. Mapping of each 5-bit block into an S-box for its replacement bits.
Table 9
Implementation Flexibility of 5-bit S-box with various block size.
Block size Implementation on 5-bit Remaining bits
S-box
32-bit The middle 30 bits (out of The remaining first and
32) can be split into six last bits can be swapped.
5-bit inputs to the 5-bit
S-box
48-bit The middle 45 bits (out of The remaining three bits,
48) can be split into nine either ‘first and last two’
5-bit input to the 5-bit or ‘first two and last’ bits,
S-box can be interchanged.
64-bit The middle 60 bits (out of The remaining first two
64) can be split into and last two bits can be
twelve 5-bit input to the interchanged.
5-bit S-box
128-bit The middle 125 bits (out The remaining three bits,
of 128) can be split into either ’first and last two’
twenty-five 5-bit input to or ’first two and last’ bits,
the 5-bit S-box can be interchanged.
256-bit The middle 255 bits (out The remaining one bit Fig. 4. The datapath of 5-bit S-box.
of 256) can be split into (either first or last) can be
fifty-one 5-bit input to the inverted (Ones’
5-bit S-box complement). Table 10
Various S-box area comparison.
Algorithm Ref S-box bits Area (GE)
PRESENT [28] 4-bit 28.03
[51] 4-bit 22.67
SKINNY [36] 4-bit 12–14.68
LED [35] 4-bit 22.33
Piccolo [37] 4-bit 24
[51] 4-bit 12
PRIMATE [52] 5-bit 30–40
Keccak [51] 5-bit 17
Proposed – 5-bit 12.54
4. Security analysis
Our S-box consists of eight NAND gates (seven 2-input NAND gates
This section demonstrates the security strength of the proposed
and one 3-input NAND gate) and seven NOR gates (six 2-input NOR
5-bit S-box, measured over bijective property, nonlinearity, linearity
gates and one 3-input NOR gate).
(LP), differential probability (DAP), differential style boomerang attack
Fig. 4 shows the datapath of an area-optimized by 5-bit S-box, which (BCT/FBCT), degree of avalanche effect, bit Independence criteria (BIC)
performs one round in one clock cycle, i.e. a 32-bit width datapath at and algebraic attacks. It also gives comparison of cryptanalysis of
100 KHz frequency. The experiment witnesses a throughput of 3200 the proposed 5-bit S-box with other existing 5-bit S-boxes from AS-
Kbps by consuming around 0.042 μW power to implement this logic. CON [42,43], PRIMATE [45], ICEPOLE [46,47], and SHAMASH [44].
5
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
4.2. Nonlinearity
6
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
Table 11
Nonlinearity measure through Hamming distance (𝐻𝑑 ).
Input Output Hamming Input Output Hamming
distance (𝐻𝑑 ) distance (𝐻𝑑 )
0 (00000) 10 (01010) 2 16 (10000) 15 (01111) 5
1 (00001) 3 (00011) 1 17 (10001) 24 (11000) 2
2 (00010) 11 (01011) 2 18 (10010) 29 (11101) 4
3 (00011) 22 (10110) 3 19 (10011) 13 (01101) 4
4 (00100) 17 (10001) 3 20 (10100) 14 (01110) 3
5 (00101) 4 (00100) 1 21 (10101) 19 (10011) 2
6 (00110) 1 (00001) 3 22 (10110) 30 (11110) 1
7 (00111) 8 (01000) 4 23 (10111) 5 (00101) 2
8 (01000) 12 (01100) 1 24 (11000) 25 (11001) 1
9 (01001) 28 (11100) 3 25 (11001) 27 (11011) 1
10 (01010) 23 (10111) 4 26 (11010) 7 (00111) 4
11 (01011) 18 (10010) 3 27 (11011) 0 (00000) 4
12 (01100) 26 (11010) 3 28 (11100) 16 (10000) 2
13 (01101) 6 (00110) 3 29 (11101) 21 (10101) 1
14 (01110) 31 (11111) 2 30 (11110) 2 (00010) 3
15 (01111) 20 (10100) 4 31 (11111) 9 (01001) 3
#{𝑥 ∈ {0, 1}𝑛 |𝑆(𝑥) ⊕ 𝑆(𝑥 ⊕ 𝛥𝑥) ⊕ 𝑆(𝑥 ⊕ 𝛥𝑦) ⊕ 𝑆(𝑥 ⊕ 𝛥𝑥 ⊕ 𝛥𝑦) = 0} (7)
Table 13 exhibits the FBCT of the proposed 5-bit S-box. Here, the
values 32, 8, 4 and 0 appear 94, 42, 186 and 702 times, respectively, in
the FBCT of the proposed S-box. The highest value in FBCT, known as
Feistel boomerang uniformity (𝛽 𝐹 ), is 8. Here, the FBCT values at the
first row, first column, and diagonal is 2𝑛 (i.e., 32) which are neglected.
The first row and first column with the values 2𝑛 are known as ladder
switch, whereas the diagonal with the values 2𝑛 is known as Feistel
switch. Some common properties of any FBCT are as follows [59]:
The Boomerang attack [56], proposed by David Wagner, is a dif- 4.7. High degree of avalanche effect
ferential style attack on block ciphers used to analyse the security of
a block cipher. The Boomerang Connectivity Table (BCT) [57] is a
A slight change in input bits that significantly change output bits is
systematic approach for calculating the connection probability for a
known as an avalanche effect. When a change in one input bit results in
Boomerang attack. Let 𝑆 ∶ {0, 1}𝑛 → {0, 1}𝑛 be an invert function, than
a change in at least half of the output bits, it is called strict avalanche
for a given input difference 𝛥𝑥 and output difference 𝛥𝑦 for all values
of input 𝑥, the probability of boomerang of 𝛥𝑥, i.e., BCT of 𝑆 is given criterion (SAC)), i.e., for any n bits input, at least n/2 bits in output
by a 2𝑛 x 2𝑛 table 𝑇 for all pairs of (𝛥𝑥, 𝛥𝑦) as follows: must differ [60]. For any block cipher, an avalanche of change is an
essential property and could be boosted by an efficient S-box design
#{𝑥 ∈ {0, 1}𝑛 |𝑆 −1 (𝑆(𝑥) ⊕ 𝛥𝑦) ⊕ 𝑆 −1 (𝑆(𝑥 ⊕ 𝛥𝑥) ⊕ 𝛥𝑦) = 𝛥𝑥} (6) that offers high resistance to differential attacks.
Here, 𝑆 −1is the inverse function of S-box. The values in the As introduced by Webster and Tavares [61], we can confirm
boomerang connectivity table are usually greater than or equal to that whether an S-box fulfil the SAC property or not by considering a 5-bit
in the differential distribution table values in terms of strength. This input 𝑋 and a set of input vectors, 𝑋1 , 𝑋2 , … , 𝑋5 , derived by changing
relationship is described in [58]. Table 14 summarizes the occurrence 𝑗th bit only. Its corresponding 5-bit output vectors, 𝑌1 , 𝑌2 , … , 𝑌5 , can be
of each element in BCT and DDT of the proposed S-box. assigned using a substitution function, 𝑌𝑗 = 𝑆(𝑋𝑗 ). An avalanche vector,
7
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
Table 13
Feistel counterpart of BCT (FBCT) of the proposed 5-bit S-box.
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 0 0 0 0 4 4 0 0 0 0 0 0 0 0 4 4 0 0 0 0 8 8 0 0 4 4 0 0 0 0
32 0 32 0 0 0 0 0 0 0 0 0 4 0 4 0 8 8 8 8 0 0 0 0 0 0 0 0 0 4 0 4
32 0 0 32 4 0 0 4 0 4 4 0 0 0 0 0 0 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4
32 0 0 4 32 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 4 0 0
32 0 0 0 0 32 0 0 4 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 4
32 4 0 0 0 0 32 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 8 0 0 0
32 4 0 4 4 0 4 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 4 0 0
32 0 0 0 0 4 0 0 32 0 0 0 0 4 0 0 0 4 4 0 4 4 0 0 0 4 4 0 4 4 0 0
32 0 0 4 0 0 0 0 0 32 4 0 0 0 0 0 0 4 8 0 0 0 0 0 4 0 0 8 0 0 0 0
32 0 0 4 0 0 0 0 0 4 32 0 0 0 0 0 0 4 8 0 0 0 0 0 8 0 0 4 0 0 0 0
32 0 0 0 0 0 0 0 0 0 0 32 0 0 0 0 0 0 8 0 0 0 0 0 0 8 0 0 0 0 0 0
32 0 4 0 0 0 0 0 0 0 0 0 32 0 4 0 0 0 0 0 0 0 4 0 0 0 4 0 0 0 0 0
32 0 0 0 0 4 0 0 4 0 0 0 0 32 0 0 0 0 0 0 4 0 0 0 0 4 0 0 0 0 0 0
32 0 4 0 0 0 0 0 0 0 0 0 4 0 32 0 0 0 0 4 4 0 4 0 4 0 4 0 0 4 0 0
32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32 0 0 0 0 0 4 4 0 0 4 4 0 0 0 0 0
32 4 8 0 0 0 0 0 0 0 0 0 0 0 0 0 32 4 8 0 0 0 0 0 0 0 0 0 0 0 0 0
32 4 8 4 0 0 0 0 4 4 4 0 0 0 0 0 4 32 4 8 0 0 0 0 4 4 0 4 0 0 0 0
32 0 8 4 0 0 0 0 4 8 8 8 0 0 0 0 8 4 32 0 0 0 0 0 8 8 4 8 0 0 0 0
32 0 8 0 0 0 0 0 0 0 0 0 0 0 4 0 0 8 0 32 0 0 0 0 0 0 0 0 0 4 0 0
32 0 0 4 0 0 0 0 4 0 0 0 0 4 4 0 0 0 0 0 32 0 0 4 0 4 4 0 4 0 0 0
32 0 0 4 0 0 0 0 4 0 0 0 0 0 0 4 0 0 0 0 0 32 4 0 0 0 4 0 0 4 0 0
32 8 0 4 0 0 0 0 0 0 0 0 4 0 4 4 0 0 0 0 0 4 32 8 4 4 4 0 0 0 0 0
32 8 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 8 32 0 0 0 0 0 0 0 0
32 0 0 4 0 0 0 0 0 4 8 0 0 0 4 0 0 4 8 0 0 0 4 0 32 0 0 4 0 0 0 0
32 0 0 4 4 0 0 0 4 0 0 8 0 4 0 4 0 4 8 0 4 0 4 0 0 32 4 0 0 4 0 0
32 4 0 4 0 4 8 4 4 0 0 0 4 0 4 4 0 0 4 0 4 4 4 0 0 4 32 4 8 4 0 4
32 4 0 4 0 0 0 0 0 8 4 0 0 0 0 0 0 4 8 0 0 0 0 0 4 0 4 32 0 0 0 0
32 0 0 4 0 0 8 0 4 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 8 0 32 0 0 4
32 0 4 4 4 0 0 4 4 0 0 0 0 0 4 0 0 0 0 4 0 4 0 0 0 4 4 0 0 32 4 4
32 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 32 0
32 0 4 4 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 4 4 0 32
Table 14
The occurrence of each element in BCT and DDT of the proposed S-box.
32 16 14 12 10 8 6 4 2 0
BCT 63 2 1 8 9 30 72 178 228 433
DDT 1 – – – – 4 13 72 297 637
the avalanche of change effect (SAC) of the proposed S-box and other
existing 5-bit S-boxes. It can be observed that the average SAC value of
Fig. 9. Avalanche effect/Strict Avalanche Criterion (SAC). the proposed S-box is closest to the ideal value (0.5), and thus it beats
the competition.
Since SAC works on the concepts of completeness along with the
𝑉𝑗 , can be computed by XORing output vector 𝑌 and 𝑌𝑗 , i.e., 𝑉𝑗 = 𝑌 ⊕𝑌𝑗 . avalanche effect, it can be proven below. Let us consider a multi-output
A 5 × 5 dependency matrix, 𝐴, can be calculated by adding 𝑖th bit of function 𝑆 ∶ 𝐹2𝑛 → 𝐹2𝑚 which generates 𝑚-bit output in responds to 𝑛-bit
𝑉𝑗 to 𝑎𝑖,𝑗 , where 𝑎𝑖,𝑗 is the 𝑖th element of the matrix 𝐴. Now, depending input. Let 𝑋 be an input where 𝑋 = (𝑥1 , 𝑥2 , … , 𝑥𝑛 ), 𝑥𝑝 ∈ {0, 1} and 𝑋 𝑖
on the vector 𝑋, repeat the above steps multiple times and then divide be another input with change in 𝑖th bit(s) where 𝑖 = 1, 2, … , 𝑛. Let 𝐹 (𝑋)
each element of matrix A by 2𝑛 (𝑛 is the number of input/output bits) and 𝐹 (𝑋 𝑖 ) be the corresponding outputs, 𝐹 ∈ 𝑇 where 𝑇 ⊂ 𝑆25 .
to compute SAC matrix.
The average avalanche of change effect of the proposed algorithm is Definition 1. For multi-output function, 𝑆 ∶ 𝐹2𝑛 → 𝐹2𝑚 , each output bit
0.51 (51.00%) ( Table 15). If the average of each element and matrix is relies on every input bit, called Completeness, as follows:
close the ideal value, 0.5 (50%), then the S-box is considered to satisfy
1
SAC. Thus, the proposed S-box fulfils the SAC property. Fig. 9 compares 𝐶 =1− #{(𝑖, 𝑗)|𝑏𝑖𝑗 = 0} (8)
𝑛𝑚
8
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
where 𝑏𝑖𝑗 = #{𝑋 ∈ 𝑇 |(𝑓 (𝑋))𝑗 ≠ (𝑓 (𝑋 𝑖 ))𝑗 }, is the total of resulting output Table 15
Cryptanalysis of various 5-bit S-boxes.
bits when two inputs with 𝑖th bit difference is passed, also 𝑖 = 1, 2, … , 𝑛
S-box Linear Nonlinearity DAP SAC BIC-
and 𝑗 = 1, 2, … , 𝑚. The value of completeness, 𝐶, closer to 1 offers
(5-bit) Probability (𝐻𝑑 ) SAC
strong non-linearity. Our S-box satisfies this property (𝐶 = 1) as it
Proposed 0.25 2.625 0.25 0.51 0.53
generates unique pairs of input–output using 5-bits. ASCON 0.25 2.5 0.25 0.57 0.58
PRIMATE 0.375 2.5 0.0625 0.52 0.54
Definition 2. For any function, 𝐹 , if a change in an input reflects the ICEPOLE 0.25 1.531 0.25 0.43 0.44
SHAMASH 0.375 2.5 0.0625 0.56 0.57
change in half of the output, then it presents a strict avalanche property
(SAC) as follows:
2 ∑𝑛 ∑ 𝑚
1
𝐴𝑣𝑙_𝑒𝑓 𝑡(𝑠𝑡𝑟𝑖𝑐𝑡) = 1 − |𝑏 − #𝑇 (9) 4.9. Algebraic attacks
#𝑇 ∗ 𝑛𝑚 𝑖=1 𝑗=1 𝑖𝑗 2
Here, #𝑇 is the number of inputs. Similar to completeness, the The proposed S-box has a simple but robust structure. Based on
𝐴𝑣𝑙_𝑒𝑓 𝑡(𝑠𝑡𝑟𝑖𝑐𝑡) value close to 1 shows high avalanche effect. Our S-box the design criteria we proposed for the 5-bit S-box, as discussed in
Section 3.2, the possible S-boxes are 31! ≈ 8.22 ∗ 1033 which is huge
shows strict avalanche criterion (SAC) value 0.51 and thus
and noticeably more than that of the 4-bit S-box, i.e., 15! ≈ 1.3 ∗ 1012 .
𝐴𝑣𝑙_𝑒𝑓 𝑡(𝑠𝑡𝑟𝑖𝑐𝑡) ≈ 1.
Also, the proposed 5-bit S-box make use of a complex dynamic chaotic
system to create randomness of the element in the S-box, and it is
4.8. Bit independence criterion tough to breakthrough. Moreover, the results achieved through the
S-box Evaluation Toolbox (SET) [62], the algebraic immunity of the
proposed S-box is 2, which is excellent and similar to its 5-bit S-box
Another essential property, bit independence criterion (BIC) intro- competitors.
duced by Webster and Tavares [61], where each input bit
affects/changes every output bit, i.e., a change in 𝑖th bit reflects an 5. Conclusion
independent change of output bits 𝑗 and 𝑘, where 𝑖, 𝑗, 𝑘 ∈ (1, 2, … , 𝑛)
and 𝑗 ≠ 𝑘. According to this, two output bits of an S-box, 𝑓𝑗 and 𝑓𝑘 , While S-box is the fundamental and the only component that offers
where 𝑗 ≠ 𝑘, if 𝑓𝑗 ⊕ 𝑓𝑘 shows high nonlinearity and fulfil the SAC, the a nonlinear functionality in any SPN-based cryptography algorithm, its
S-box has good BIC property (Fig. 10). design significantly impacts its cost, performance and security features.
BIC-SAC property can be computed by determining output vectors Various researchers have proposed different S-boxes with different bit
𝑌1 , 𝑌2 , … , 𝑌5 for each input vector 𝑋 as defined in the previous Sec- lengths (e.g., 4/6/8-bit), but the 4-bit S-box from PRESENT is widely
tion 4.7. An avalanche vector, 𝑉𝑖,𝑗,𝑘 , can be computed by XORing 𝑃𝑖,𝑗 used due to its low resource requirements in constrained environ-
and 𝑄𝑖,𝑗 , i.e., 𝑉𝑖,𝑗,𝑘 = 𝑃𝑖,𝑗 ⊕ 𝑄𝑖,𝑗 . Here, 𝑃𝑖,𝑗 is the XORed value of 𝑖th and ments. Also, the 8-bit S-box attracts designers due to its promising
security structure, but it witnesses high implementation costs. The
𝑗th bit of 𝑌 and 𝑄𝑖,𝑗 is the XORed value of 𝑖th and 𝑗th bit of 𝑌𝑘 , where
other S-boxes, 3-bit and 6-bit, are far from the competition because
𝑖, 𝑗, 𝑘 ∈ {1, 2, … , 5}. Now, depending on the vector 𝑋, repeat the above
of either low-security support or expensive implementation reasons.
steps multiple times and then divide each element of matrix A by 2𝑛 (𝑛
However, the 5-bit S-box structure has limitations in going with popular
is the number of input/output bits) to obtain BIC-SAC matrix.
block sizes; the proposed new S-box design solves this issue by easing
To better the resistance property, an S-box must show the BIC- flexibility to fit various block sizes with low resource requirements.
SAC value close to 0.5. The BIC-SAC value for the proposed S-box is The experimental results demonstrate that even if the S-box size is
0.53, and thus it satisfies the BIC-SAC property. Fig. 10 illustrates a increased by one bit (proposed 5-bit S-box), the resource requirement
comparison of BIC-SAC values of the proposed S-box and other 5-bit does not really increase, particularly in the area. But, it boosts the
S-boxes competitors where the average BIC-SAC value of the proposed security level significantly and encourages using 5-bit S-box over a 4-bit
S-box is closest to the ideal value (0.5), and thus it wins the race. S-box. The comparison could be extended in the future by adding more
9
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
metrics, such as throughput and power/energy consumption, which [27] Knudsen L, Leander G, Poschmann A, Robshaw MJ. PRINTcipher: A block
are not delicately available for the S-boxes (only available for the cipher for IC-printing. In: International workshop on cryptographic hardware
and embedded systems. Springer; 2010, p. 16–32.
full algorithm) we compared. Also, a cryptanalysis comparison of the
[28] Bogdanov A, Knudsen LR, Leander G, Paar C, Poschmann A, Robshaw MJ, et
proposed 5-bit S-box with the same bit-size S-boxes over the essential al. PRESENT: An ultra-lightweight block cipher. In: International workshop on
security parameters exhibits the superiority of the proposed S-box. cryptographic hardware and embedded systems. Springer; 2007, p. 450–66.
[29] Blondeau C, Nyberg K. Links between truncated differential and multidimen-
Declaration of competing interest sional linear properties of block ciphers and underlying attack complexities. In:
Annual international conference on the theory and applications of cryptographic
techniques. Springer; 2014, p. 165–82.
The authors declare that they have no known competing finan- [30] Jeong K, Lee Y, Sung J, Hong S. Improved differential fault analysis on
cial interests or personal relationships that could have appeared to PRESENT-80/128. Int J Comput Math 2013;90(12):2553–63.
influence the work reported in this paper. [31] Zhang W, Bao Z, Lin D, Rijmen V, Yang B, Verbauwhede I. RECTANGLE: A
bit-slice lightweight block cipher suitable for multiple platforms. Sci China Inf
Sci 2015;58(12):1–15.
Data availability [32] Yap H, Khoo K, Poschmann A, Henricksen M. EPCBC-a block cipher suitable for
electronic product code encryption. In: International conference on cryptology
No data was used for the research described in the article. and network security. Springer; 2011, p. 76–97.
[33] Suzaki T, Minematsu K, Morioka S, Kobayashi E. Twine: A lightweight, versatile
block cipher. In: ECRYPT workshop on lightweight cryptography, Vol. 2011.
References 2011.
[34] Toshihiko O. Lightweight cryptography applicable to various iot devices. NEC
[1] Rivest RL. Cryptography. In: Algorithms and complexity. Elsevier; 1990, p. Tech J 2017;12(1):67–71.
717–55. [35] Guo J, Peyrin T, Poschmann A, Robshaw M. The LED block Cipher. In: Inter-
[2] Stallings W, Tahiliani MP. Cryptography and network security: principles and national workshop on cryptographic hardware and embedded systems. Springer;
practice, vol. 6. Pearson London; 2014. 2011, p. 326–41.
[3] Mohd BJ, Hayajneh T. Lightweight block ciphers for IoT: Energy optimization [36] Beierle C, Jean J, Kölbl S, Leander G, Moradi A, Peyrin T, et al. The SKINNY fam-
and survivability techniques. IEEE Access 2018;6:35966–78. ily of block ciphers and its low-latency variant MANTIS. In: Annual international
[4] McKay K, Bassham L, Turan MS, Mouha N. Report on lightweight cryptography cryptology conference. Springer; 2016, p. 123–53.
(NISTIR8114). National Institute of Standards and Technology (NIST); 2017. [37] Shibutani K, Isobe T, Hiwatari H, Mitsuda A, Akishita T, Shirai T. Piccolo:
[5] Mohd BJ, Hayajneh T, Vasilakos AV. A survey on lightweight block ciphers for An ultra-lightweight blockcipher. In: International workshop on cryptographic
low-resource devices: Comparative study and open issues. J Netw Comput Appl hardware and embedded systems. Springer; 2011, p. 342–57.
2015;58:73–93. [38] Gong Z, Nikova S, Law YW. KLEIN: A new family of lightweight block Ciphers.
[6] Thakor VA, Razzaque MA, Khandaker MR. Lightweight cryptography algo- In: International workshop on radio frequency identification: security and privacy
rithms for resource-constrained IoT devices: A review, comparison and research issues. Springer; 2011, p. 1–18.
opportunities. IEEE Access 2021. [39] Cheng H, Heys HM, Wang C. Puffin: A novel compact block cipher targeted
[7] Hatzivasilis G, Fysarakis K, Papaefstathiou I, Manifavas C. A review of to embedded digital systems. In: 2008 11th EUROMICRO conference on digital
lightweight block ciphers. J Cryptogr Eng 2018;8(2):141–84. system design architectures, methods and tools. IEEE; 2008, p. 383–90.
[8] Hua Z, Zhou B, Zhou Y. Sine chaotification model for enhancing chaos and its [40] Wu W, Zhang L. LBlock: A lightweight block cipher. In: International conference
hardware implementation. IEEE Trans Ind Electron 2018;66(2):1273–84. on applied cryptography and network security. Springer; 2011, p. 327–44.
[9] Hua Z, Li J, Chen Y, Yi S. Design and application of an S-box using complete [41] Bogdanov A, Knežević M, Leander G, Toz D, Varıcı K, Verbauwhede I. SPON-
latin square. Nonlinear Dynam 2021;104(1):807–25. GENT: A lightweight hash function. In: International workshop on cryptographic
[10] Easttom W. S-box design. In: Modern cryptography. Springer; 2021, p. 187–204. hardware and embedded systems. Springer; 2011, p. 312–25.
[11] Alshammari BM, Guesmi R, Guesmi T, Alsaif H, Alzamil A. Implementing a [42] Dobraunig C, Eichlseder M, Mendel F, Schläffer M. Ascon v1. 2. submission to
symmetric lightweight cryptosystem in highly constrained IoT devices by using the CAESAR competition. Inst Appl Inf Proc Commun Graz 2016.
a chaotic S-box. Symmetry 2021;13(1):129. [43] Dobraunig C, Eichlseder M, Mendel F, Schläffer M. Ascon v1. 2: Lightweight
[12] Siddiqui N, Yousaf F, Murtaza F, Ehatisham-ul Haq M, Ashraf MU, Alghamdi AM, authenticated encryption and hashing. J Cryptol 2021;34(3):1–42.
et al. A highly nonlinear substitution-box (S-box) design using action of modular [44] Penazzi D, Montes M. Shamash (and shamashash)(version 1). Lightweight
group on a projective line over a finite field. Plos One 2020;15(11):e0241890. Cryptogr Standard Proc Round 2019;1.
[13] Dey S, Ghosh R. 4, 8, 32, 64 Bit substitution box generation using irreducible [45] Andreeva E, Bilgin B, Bogdanov A, Luykx A, Mendel F, Mennink B, et al.
or reducible polynomials over Galois field GF (P q) for smart applications. In: PRIMATEs v1. 2014, Submission to CAESAR.
Security in smart cities: models, applications, and challenges. Springer; 2019, p. [46] Morawiecki P, Gaj K, Homsirikamol E, Matusiewicz K, Pieprzyk J, Rogawski M,
279–95. et al. ICEPOLE: High-speed, hardware-oriented authenticated encryption. In:
[14] De Meyer L, Vaudenay S. DES S-box generator. Cryptologia 2017;41(2):153–71. International workshop on cryptographic hardware and embedded systems.
[15] Yi L, Tong X, Wang Z, Zhang M, Zhu H, Liu J. A novel block encryption Springer; 2014, p. 392–413.
algorithm based on chaotic S-box for wireless sensor network. IEEE Access [47] l Morawiecki P, Gaj K, Homsirikamol E, Matusiewicz K, Pieprzyk J, Rogawski M,
2019;7:53079–90. et al. ICEPOLE v2. 2015, CAESAR Submission: http://competitions.cr.yp.to/
[16] Prathiba A, Bhaaskaran V. Lightweight S-box architecture for secure internet of round2/icepolev2.Pdf.
things. Information 2018;9(1):13. [48] Poschmann A, Leander G, Schramm K, Paar C. New light-weight crypto algo-
[17] Lu Q, Zhu C, Wang G. A novel S-box design algorithm based on a new compound rithms for RFID. In: 2007 IEEE international symposium on circuits and systems.
chaotic system. Entropy 2019;21(10):1004. IEEE; 2007, p. 1843–6.
[18] Lambić D. A novel method of S-box design based on discrete chaotic map. [49] Standaert F-X, Piret G, Rouvroy G, Quisquater J-J, Legat J-D. ICEBERG: An
Nonlinear Dynam 2017;87(4):2407–13. involutional cipher efficient for block encryption in reconfigurable hardware. In:
[19] Farwa S, Shah T, Idrees L. A highly nonlinear S-box based on a fractional linear International workshop on fast software encryption. Springer; 2004, p. 279–98.
transformation. SpringerPlus 2016;5(1):1–12. [50] Verilog. Wikimedia Foundation; 2021, URL https://en.wikipedia.org/wiki/
[20] Zhang W, Bao Z, Rijmen V, Liu M. A new classification of 4-bit optimal S- Verilog.
boxes and its application to Present, Rectangle and Spongent. In: International [51] Picek S, Mariot L, Yang B, Jakobovic D, Mentens N. Design of S-boxes de-
workshop on fast software encryption. Springer; 2015, p. 494–515. fined with cellular automata rules. In: Proceedings of the computing frontiers
[21] Saarinen M-JO. Cryptographic analysis of all 4× 4-bit S-boxes. In: International conference. 2017, p. 409–14.
workshop on selected areas in cryptography. Springer; 2011, p. 118–33. [52] Šijačić D, Kidmose AB, Yang B, Banik S, Bilgin B, Bogdanov A, et al. Hold your
[22] Lineham A, Gulliver TA. Heuristic S-box design. Contem Eng Sci 2008;1(4):147– breath, PRIMATEs are lightweight. In: International conference on selected areas
68. in cryptography. Springer; 2016, p. 197–216.
[23] Meyer LD. Looking at the NIST lightweight candidates from a masking point- [53] Wei VK, Yang K. On the generalized hamming weights of product codes. IEEE
of-view. 2020, Cryptology ePrint Archive, Report 2020/699 https://ia.cr/2020/ Trans Inform Theory 1993;39(5):1709–13.
699. [54] Matsui M. Linear cryptanalysis method for DES cipher. In: Workshop on the
[24] Daemen J, Rijmen V. AES proposal: Rijndael. MD, USA: Gaithersburg; 1999. theory and application of of cryptographic techniques. Springer; 1993, p. 386–97.
[25] Hua Z, Zhu Z, Chen Y, Li Y. Color image encryption using orthogonal latin [55] Biham E, Shamir A. Differential cryptanalysis of DES-like cryptosystems. J
squares and a new 2D chaotic system. Nonlinear Dynam 2021;104(4):4505–22. Cryptol 1991;4(1):3–72.
[26] Si Y, Liu H, Chen Y. Constructing keyed strong S-box using an enhanced [56] Wagner D. The boomerang attack. In: International workshop on fast software
quadratic map. Int J Bifurcation Chaos 2021;31(10):2150146. encryption. Springer; 1999, p. 156–70.
10
V.A. Thakor et al. Journal of Information Security and Applications 73 (2023) 103444
[57] Cid C, Huang T, Peyrin T, Sasaki Y, Song L. Boomerang connectivity table: A [62] Picek S, Batina L, Jakobović D, Ege B, Golub M. S-box, SET, Match: A Toolbox
new cryptanalysis tool. In: Annual international conference on the theory and for S-box Analysis. In: Naccache D, Sauveron D, editors. 8th IFIP international
applications of cryptographic techniques. Springer; 2018, p. 683–714. workshop on information security theory and practice. WISTP, Information
[58] Song L, Qin X, Hu L. Boomerang connectivity table revisited. application to security theory and practice. securing the internet of things, vol.LNCS-8501,
SKINNY and AES. IACR Trans Symmetr Cryptol 2019;118–41. Heraklion, Crete, Greece: Springer; 2014, p. 140–9. http://dx.doi.org/10.1007/
[59] Boukerrou H, Huynh P, Lallemand V, Mandal B, Minier M. On the feistel 978-3-662-43826-8_10, URL https://hal.inria.fr/hal-01400936.
counterpart of the boomerang connectivity table. IACR Trans Symmetr Cryptol
2020;2020(1):331–62.
[60] Feistel H. Cryptography and computer privacy. Sci Am 1973;228(5):15–23.
[61] Williams H, Webster A, Tavares S. On the design of s-boxes. In: Advances in
cryptology—CRYPTO’85 proceedings, Vol. 218. 1986, p. 523–34.
11