Lightweight Cryptography For Resource
Lightweight Cryptography For Resource
Supervisor: Dr M. A. Razzaque
September 2022
I would like to dedicate this thesis to my beloved family that includes my adore grandmother,
my loving parents, my uncles & aunties, my cousins, my better half and my little hearts,
Krishna and Parth. . .
Declaration
I hereby declare that except where specific reference is made to the work of others, the
contents of this thesis are original and have not been submitted in whole or in part for
consideration for any other degree or qualification in this, or any other university. This
dissertation is my own work and contains nothing which is the outcome of work done in
collaboration with others, except as specified in the text and Acknowledgements. This thesis
contains fewer than 40,000 words including appendices, bibliography, footnotes, tables and
equations.
Paper 2: A novel 5-bit S-box design for lightweight cryptography algorithms (Journal
of Information Security and Applications (JISA), Elsevier)-Submitted
IoT is becoming more common and popular due to its wide range of applications in various
domains. They collect data from the real environment and transfer it over the networks.
While deploying IoT in the real world, there are many challenges, varying from tiny sensors
to servers. Since most IoT devices are physically accessible in the real world, security is
considered the number one challenge in IoT deployments. Moreover, many of them are
limited in resources such as energy, memory, processing power and even physical space,
where implanting traditional security options is challenging.
This research focuses on resource-constrained IoT devices such as RFID tags, sensors,
smart cards, etc., as it is challenging to secure them in a real environment. The communication
from such devices can be secured using lightweight cryptography, a lighter version of
cryptography. To give a holistic view of lightweight cryptography, existing lightweight
cryptography algorithms are studied and compared in terms of implementation cost, hardware
and software performances, and finally, in terms of cryptanalysis to identify the research
gaps. A trade-off between cost, performance and security is missing in the existing list of
lightweight cryptography algorithms. This creates a demand for new research to carry on
and further inspires to development of a new LWC algorithm.
The research study proposes a novel LWC algorithm, named AUM, specially designed for
small messages in resource-constrained IoT devices. It offers unique features such as a robust
5-Bit S-Box structure using chaotic mapping theory and lightweight permutation through
the 2D array transpose technique. Moreover, the research proposes a lightweight approach
to generate distinct subkeys from the original key provided by the user. The resulting cost
and performance values are evaluated on popular ASIC platforms and compared with 4-bit
and 5-bit competitors. Also, the attack resistance property of the proposed model is analysed
over various measured such as bijective property, nonlinearity, linearity (LP), differential
probability (cryptanalysis), degree of avalanche effect, bit Independence criteria (BIC) and
algebraic attacks and compared with its competitors (4-bit and 5-bit) S-boxes. The test results
prove the efficiency of the proposed LWC algorithm, AUM, and show how it maintains the
trade-off between cost, performance and security.
Table of contents
List of figures xv
Nomenclature xix
1 Introduction 1
1.1 IoT Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Classification of IoT devices . . . . . . . . . . . . . . . . . . . . . 3
1.1.2 Security Concerns of Resource-Constrained IoT devices . . . . . . 3
1.2 Cryptography Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Classification of Cryptography . . . . . . . . . . . . . . . . . . . . 6
1.3 Research Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.1 Research Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.2 Research Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Thesis Outlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Research Background 13
2.1 Key requirements of Lightweight Cryptography . . . . . . . . . . . . . . . 13
2.1.1 Lightweight Cryptography Features . . . . . . . . . . . . . . . . . 15
2.1.2 Standardization of Cryptography Algorithms . . . . . . . . . . . . 17
2.2 Existing Lightweight Cryptography Algorithms . . . . . . . . . . . . . . . 18
2.2.1 Structure wise Classification of LWC Algorithms . . . . . . . . . . 18
2.3 Performance Comparison of existing LWC algorithms . . . . . . . . . . . . 26
2.4 Cryptanalysis of existing LWC algorithms . . . . . . . . . . . . . . . . . . 31
2.5 Real-time Applications and their Lightweight demands . . . . . . . . . . . 34
2.6 Research Gaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
xiv Table of contents
3 Research Methodology 37
3.1 Proposed LWC algorithm: An Overview . . . . . . . . . . . . . . . . . . . 37
3.2 Proposed LWC algorithm: Detailed Structure . . . . . . . . . . . . . . . . 38
3.2.1 Permutation through Transpose . . . . . . . . . . . . . . . . . . . 39
3.2.2 AddRoundKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.2.3 Substitution using 5-bit S-box . . . . . . . . . . . . . . . . . . . . 42
3.2.4 Subkey Generation . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.3 Inspiration for naming the proposed LWC algorithm . . . . . . . . . . . . . 53
3.4 Proposed LWC algorithm (AUM): Pseudo Code . . . . . . . . . . . . . . . 54
4 Result Analysis 59
4.1 Experiment Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.2 Performance and Cost Analysis . . . . . . . . . . . . . . . . . . . . . . . . 62
4.3 Security Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.3.1 Bijective Property . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.3.2 Nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.3.3 Linear Approximation Probability (LP) . . . . . . . . . . . . . . . 70
4.3.4 High Resistance to Differential Cryptanalysis . . . . . . . . . . . . 71
4.3.5 Boomerang Connectivity Table (BCT) . . . . . . . . . . . . . . . . 72
4.3.6 Feistel counterpart of BCT (FBCT) . . . . . . . . . . . . . . . . . 73
4.3.7 High Degree of Avalanche Effect . . . . . . . . . . . . . . . . . . 74
4.3.8 Bit Independence Criterion (BIC) . . . . . . . . . . . . . . . . . . 77
4.3.9 Algebraic Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.4 Execution results of the full algorithm, AUM . . . . . . . . . . . . . . . . 78
5 Research Contribution 83
6 Conclusion 85
References 87
Acronyms / Abbreviations
GE Gate Equivalents
Introduction
This chapter gives an overview of the Internet of Things devices and cryptography. The
chapter focuses on a specific category of IoT devices, resource-constrained IoT devices such
as RFID tags, smartcards, sensors, etc., and showcase their security concerns, primarily
when implemented in constrained circumstances. Also, how the lightweight version of
cryptography meets the above requirements is discussed in this chapter. Further, a brief on
standardizing bodies for cryptography algorithms are discussed, followed by motivation for
this research with its aim and objectives.
Internet of Things (IoT) has become a dominant research area because of its applications
in various domains such as smart transport & logistics, smart healthcare, smart environment,
smart infrastructure (that includes smart cities, smart homes, smart offices, smart malls,
Industry 4.0), smart agriculture and many more (Figure 1.2).
These connected devices are becoming more popular due to their use in various appli-
cations. With the rise of IoT, they will flood the market [11], leading to an enormous data
exchange rate amongst [12]. This research focuses on the second category of IoT devices,
i.e., resource-constrained IoT devices.
Cryptography is originally from the Greek words, "kryptÓs (i.e., hidden/secret) and
graphein (i.e., to write)", means “secret writing” [26]. It is a technique that converts readable
text into an unreadable form, called encryption [27]. Then the reverse procedure restores it
to its original form only for the intended user(s), called decryption [27]. Figure 1.5 explains
the encryption and decryption process on a message between sender and receiver.
Symmetric key cryptography is safe and comparatively fast; the only downside of sym-
metric key encryption is the sharing of the key between the communicating parties without
compromising it [29]. But this could be overcome by pre-sharing the key through a trusted
third party. Also, it ensures confidentiality, data integrity and authentication (using authenti-
cation encryption mode (AEAD)) of the data. Asymmetric cryptography uses a pair of keys,
namely public and private keys. It ensures confidentiality and integrity by using the public
key of the receiver. Further, it ensures authentication by encrypting the data by using the
sender’s private key (as a digital signature). At the other end, the receiver decrypts it by using
the sender’s public key first and then using his/her private key [28]. The only disadvantage
of asymmetric encryption is its large key which increases the complexity and slows down the
process [29]. For the reasons mentioned above, symmetric cryptography best fits IoT devices
in the resource-constrained environment (section 2.1); this research focuses on symmetric
cryptography algorithms.
Symmetric key cryptography could be further classified into three categories depending
on how it works: 1) block cipher, 2) stream cipher, and 3) hash functions. Figure 1.7 shows
the functioning of symmetric block ciphers as follows.
1.2 Cryptography Overview 7
In block cipher, both encryption and decryption take place on a fixed size block (64 bits
or more) at a time, whereas stream cipher continuously processes the input elements bit by bit
(or byte by byte) [28] as shown in the Figure 1.8 (a). There are two fundamental properties
of any cryptography, confusion and diffusion [30][31], introduced by Claude Shannon to
strengthen the cipher. The stream cipher uses only the confusion property, whereas the
block cipher uses both confusion and diffusion with a simple design compared to the stream
one. Furthermore, following the reverse encryption process to extract the original text is
challenging in a block cipher. A stream cipher performs XOR function(s) to encrypt the data,
which could be easily reverted to its original form.
(a) (b)
On the contrary, Hash is a one-way mathematical function that transforms arbitrary length
data into a specified-length bit string (short string). Usually, it compresses the input data
to produce the output, which is impossible to retrieve. Nevertheless, the hash functions are
widely popular among password storage (oneway/non-retrieval) and data integrity verification
applications (Figure 1.8 (b)).
From the above discussion, it is evident that the block cipher provides better security over
the stream cipher by offering both crucial properties, confusion and diffusion, to strengthen
the cipher. Further, Hash is a one-way function, where retrial of the original message is
8 Introduction
impossible. Since retrieval of the original message is essential in most IoT applications, the
Hash is unsuitable for such scenarios (even in resource-constrained environments). For these
reasons, a block cipher is preferred over a stream cipher and hash functions in resource-
constrained IoT devices.
Depending on the internal structure (functions) used to create the cipher, the block
cipher is classified into six following types. The Figure 1.9 portrays the full classification of
cryptography.
• Add-Rotate-XOR (ARX)
• Hybrid
of sub-blocks, followed by a cyclic shift proportional to the number of sub-blocks [32]. ARX
performs encryption-decryption using addition, rotation and XOR functions without making
use of S-box. Implementation of ARX is fast and compact but limited in security properties
compared to SPN and Feistel ciphers. Nonlinear feedback shift register (NLFSR), applies
to both stream and block ciphers, utilizes the building blocks of stream ciphers whose current
state is derived from its last state, which is a nonlinear feedback value [33]. Hybrid cipher
combines any three types (SPN, FN, GFN, ARX, NLFSR) or even mixes block and stream
property to improve specific characteristics (for example, throughput, energy, GE, etc.) based
on its application requirements. Figure 1.10, Figure 1.11 and Figure 1.12 depict the internal
structure of the subcategories of the block cipher.
Fig. 1.10 (a) Substitution-Permutation Network (SPN) (b) Feistel Network (FN)
Fig. 1.11 (a) General Feistel Network (GFN) (b) Add-Rotate-Xor (ARX)
10 Introduction
Out of these structures, SPN and FN are the most popular choice due to their flexibility
to implement, based on application requirements [31]. Although Feistel structures are
incorporated easily into low-average power hardware (due to the absence of round function
in one-half of the states), it usually requires more round function compared to SPN structures
for safety reasons [34]. Therefore, when there is a choice between fewer SPN function
rounds and higher Feistel function rounds, the SPN function could be better. SPN provides
the same level of security with similar or low energy costs (in most cases) over the Feistel
network that shows the higher need for other resources such as computing power, GE etc.
[34]. Due to these reasons, this research concentrates on SPN structure to develop a new
symmetric LWC algorithm.
only. After a thorough study of existing LWC algorithms, it was understood that none of
the existing algorithms meets all the lightweight criteria in terms of cost, performance and
strong security. Also, non of the existing LWC algorithms with SPN structure offers small
blocks and keys (i.e., < 64 bits). Small block size is essential for processing small messages
efficiently, typically in IoT devices such as sensors, RFID tags and smart cards, where the
message size is less than 2Kb. Thus, an efficient algorithm to work on small messages
(message size < 2Kb) of resource-constrained IoT devices is still missing. In addition, a
competition call from NIST [51] in 2018 to create new LWC algorithms for easy and efficient
implementation on resource-constrained circuitry, really motivated me to explore further
research on lightweight cryptography algorithms and it’s demand.
• How to design simple but fast and robust S-Box (Substitution box) for confusion
properties with the reduced number of rounds?
• How to make key scheduling lighter with a small key size but adequate strength?
Research Background
• Real-time response
Most IoT devices (such as RFIDs and sensors) are small in size. They are equipped with
limited resources such as small memory (RAM, ROM) to store and run an application, low
computing power to process the data, little battery power (or no battery in case of passive
RFID tags) [11], small physical area to fit-in the assembly [11][52]. Moreover, most of the
IoT devices deal with real-time applications where quick and accurate response with essential
security using available resources is a challenging task [53][54]. IoT device designers face
several risks and challenges, including energy capacity [55], and data security [14]. In these
context, if conventional cryptography standards are applied to IoT devices (mainly RFIDs
and sensors), their performance may not be acceptable [11].
The issues with conventional cryptography are very well addressed by its sub-discipline,
lightweight cryptography, by introducing lightweight features such as small memory, small
processing power, low power consumption, real-time response, etc. (Figure 2.2).
2.1 Key requirements of Lightweight Cryptography 15
Based on the first two characteristics (physical and performance) offered by any LWC algo-
rithms, hardware and software specific resource requirement could be measured in terms of
memory requirements, gate area, latency, throughput, and power and energy consumption as
follows:
Latency: It is the time to produce the cipher from the original text in terms of hardware
performance [11] whereas the amount of clock cycles per block (during encryption) defines
the software latency.
Power requirements: The amount of power required by the circuit to process the algo-
rithm can be measured in µW .
Energy consumption: Energy consumption per bit can be calculated as follows [31]:
The above organizations conduct various activities such as expert talks, seminars, work-
shops, conferences. Furthermore, they invite researchers from all around the world to
participate and share their innovative ideas in the various security competitions.
Structure
Algorithms
Types
AES [67] is a classic example of SPN based algorithm, standardized by NIST, performs on
128-bit block with 128, 192 and 256-bit key variants [68]. The minimum GE requirement
recorded for AES is around 2400 GEs (23% smaller than the usual one) [68], which is still
heavy for some small scale real-time applications [30]. It shows the comparatively efficient
performance when supplied with additional resources [69].
Another, most hardware and software efficient and ISO/IEC(29192-2P:2012) approved
algorithm is PRESENT. It is Substitution-Permutation network-based uses 64-bit block
on two key variants: 80-bit and 128-bit keys with the GE requirements of 1570 and 1886,
respectively [64]. The minimum GE requirement noted for a version of PRESENT is approx.
1000 GE (encryption only) [70], where it takes 2520-3010 GE to provide an adequate level
of security [30]. It is a hardware efficient algorithm and uses 4-bit S-boxes (substitution
layer - replaces eight S-boxes with single S-box), whereas it takes large cycles in software
(permutation layer) which demands an improved version of this [29][30][31][64][71].
GIFT[72], an improved version of PRESENT, was presented in CHES-2017. It offers a
lighter S-Box with smaller physical space. Also, the number of rounds is less and gives high
throughput along with a simpler and faster key schedule. There are two versions of GIFT:
GIFT-64, 28-round with 64-bit block size and GIFT-128, 40-round with 128-bit block size.
20 Research Background
Both use a 128-bit key. Also, lighter version, GIFT-64 found more vulnerable than GIFT-
128[73][74]. Minimal documents have been found with the micro-controller implementation
of GIFT[75][76].
SKINNY[77] has two versions: SKINNY-64 and SKINNY-128. SKINNY-64 uses a 64-
bit block with 64/128/192-bit key variants to perform 32/36/40 rounds, whereas SKINNY-128
uses a 128-bit block with 128/256/384-bit key variants to perform 40/48/56 rounds.
RECTANGLE is an ultra-lightweight block cipher that can be used with various applica-
tions. With minor changes in SPN structure, the rounds are reduced to 25 (compared to 31
rounds in PRESENT) to meet with the competitive environment [71].
TWINE achieves good overall status as PRESENT and also overcomes many of its
implementation issues. It operates 64-bit input with two key variants, 80-bit and 128-bit [78].
It requires around 2000 GE and a larger circuit size per throughput compared to AES [53].
In speed comparison, when 1KB or more ROM is available, AES is faster than TWINE, but
when only 512bytes of ROM is available, AES can’t be implemented and works 250% faster
than PRESENT [53].
Midori was designed with a focus on low/tight energy budget, for instance, medical
implants. It comes in two different versions, Midori64 and Midori128. Both of these use
a 128-bit key on two different block sizes, 64-bit and 128-bit through 16 and 20 iterations,
respectively [34][79].
mCrypton (miniature of Crypton) [80] is a cost and energy-efficient, lightweight edition
of Crypton [81], suitable for both hardware and software deployments. It performs 13
iterations on the 64-bit block using a variety of keys (64-bit, 96-bit and 128-bit).
NOEKEON [82] works on the same block and key size, 128 bit, via 16 iterations. The
NESSIE project rejected the cipher due to its less resistance against the attacks [83].
ICEBERG [84] is optimized for re-configurable hardware deployment with a property
of modifying the key at each clock cycle without compromising quality. Here, the round
keys are derived on the fly. It performs on 64-bit input with 128-bit key via 16 iterations with
a demand of 5800 GE at a throughput of 400 Kb/s [85].
PUFFIN-2 [86] is a compact edition of PUFFIN (2303GE) [87]. It uses 80-bit key to
perform 34 iterations on 64-bit data using serialized SPN structure. It requires only 1083
GEs for both encryption and decryption.
PRINCE is both hardware and software efficient lightweight algorithm [88] which
performs on 64-bit input using a 128-bit key for 12 times [89]. The smallest hardware
implementation demands 2953GE at a throughput of 533.3 Kb/s. It shows the low energy
consumption of 5.53 µJ/bit [90].
2.2 Existing Lightweight Cryptography Algorithms 21
PRIDE [88] exhibits low latency and low energy demand with a 128-bit key to perform
20 iterations on 64-bit input.
PRINT [91] is a domain-specific cipher designed for two applications: PRINT-48 for
IC-printing applications which make use of an 80-bit key to perform 48 iterations on 48-bit
input (402GE) and PRINT-96 for EPC encryption which uses a 160-bit key to perform 96
iterations on 96-bit input (726GE). Although it uses 3-bit operations where an odd number
of bit operations is not feasible, the actual deployment of the algorithm is not ready yet.
Klein [92] works on 64-bit input using 64-bit, 80-bit and 96-bit keys through 12 (1220
GE), 16 (1478 GE), and 20 (1528 GE) iterations, respectively. It was designed with a focus
on software implementation, mainly for sensors.
To obtain efficient hardware and software footprints, LED [93] borrows features from
PRESENT (S-box), Lighter version of AES (row-wise data processing) [68] and PHOTON
(mix column approach) [94]. There is an absence of key scheduling in LED, which is a
unique feature. This approach reduces the chip area but increases the security risk like related
key attacks [95]. It processes 64-bit input using various keys such as 64-bit (966 GE), 80-bit
(1040 GE), 96-bit (1116 GE) and 128-bit (1265 GE) keys for either 32 or 48 times [93].
PICARO [96] is a novel cipher with a good balance between performance and security
(by a good choice of S-box). It has four different masking levels with faster hardware
performance compared to AES. In addition, it uses a 128-bit key through 12 rounds and
shows high resistance to side-channel attacks.
Zorro [97] is based on AES, suitable for embedded systems and more efficient than
PICARO. It takes a similar block and key size (128-bit) through 24 rounds.
EPCBC (Electronic Product Code Block Cipher) [98] is a lightweight cipher, inspired
by PRESENT, supports a 96-bit key with the input of 48-bit and 96-bit block to perform
32 iterations. The most compact version needs 1008GE. In addition, the optimized sub-
key generation technique of EPCBC enhances its immunity against related-key differential
attacks.
I-PRESENT [99] is an involutive version of PRESENT inspired by PRINCE and
NOEKEON. It takes a similar block and key size to perform 30 rounds with two addi-
tional 4x4 S-boxes (16 times). The most compact hardware implementation requires about
2769 GE (encryption and decryption).
ASCON [100] [101] is a sponge-based family of authenticated encryption and hashing
algorithms, with two versions, ASCON-128 and ASCON-128a. Both versions use the 128-bit
key on 64-bit and 128-bit data blocks. It performs 12 rounds for initialization and finalization
permutation, whereas performing 6 and 8 rounds for the intermediate permutation. Moreover,
they use 5-bit S-box in parallel over the state of 320-bits in a bit-slice manner.
22 Research Background
The lightweight DES (Data Encryption Standard) is known as DESL. It works on a similar
block size (64-bit), key (56-bit) and a similar number of rounds as DES. The reduced number
of S-box (eight to only one [106]) and multiplexer [107] used in DESL distinguishes it from
DES. It demands 1850 GE which is 20% compact compare to DES (2310 GE) [107]. DESL
also discards the initial and final permutation of DES to make it lighter [108]. DESXL is
another lighter edition of DES with a key whitening feature to strengthen the cipher and with
2170 GE demands[107]. It performs the same number of cycles and uses the same block size
as DESL, but a larger key, 184-bit (k=56, k1=64, k2=64) [108].
Tiny Encryption Algorithm (TEA) is suitable for very small, computationally weak
and low-cost hardware [109]. It operates 128-bit key on 64-bit input to perform 32 rounds
[110] with GE requirements of 3872 [111]. Its simple key scheduling is vulnerable to brute
force attack [112][113]. Another limitation of the TEA structure is its three equivalent keys
for decryption which makes it vulnerable to the attackers [112]. The improved version of
TEA is (XTEA) which uses the same size of key and block but with more iterations (64
rounds), demanding 3490 GE [114]. It offers more complex key scheduling with little change
in Shift, XOR and addition functions [115]. XTEA was further modified with XXTEA [116]
to immune against related-key rectangle attack (on 36 rounds) [115].
Camellia [117] is an ISO/IEC, IETF, NESSIE and CRYPTREC recognised cipher. It
was designed by Nippon Telegraph and Telephone Corporation, and Mitsubishi Electric
Corporation. Camellia offers a similar level of security by processing the same size of key
and block as AES with two round variants, 18 and 24. It is known for its fast software
implementations [118] whereas the hardware implementation requires 6511 GE.
2.2 Existing Lightweight Cryptography Algorithms 23
NSA designed SIMON [119], which is known for its small footprint in hardware. It
offers various keys of size (64-bit, 72-bit, 96-bit, 128-bit, 144-bit, 192-bit, 256-bit) over
the block of 32-bit, 48-bit, 64-bit, 96-bit, 128-bit through 32, 36, 42, 44, 52, 54, 68, 69, 72
rounds [119]. The most compact version requires 763GE for execution [119].
SEA [120] is designed for tiny IoT devices, especially for memory-constrained devices
[121], with the concept of on-the-fly key generation [120]. It uses 96-bit key on two
recommended block size 96-bit and 8-bit with the requirement of 3758GE [121] for the most
lightweight hardware version. The optimised software execution demands 426 bytes with
encryption cycle of 41604 on 8-bit micro-controllers [122].
KASUMI [123] takes 64-bit input to performs 8 iterations using a 128-bit key. It demands
3437GE for deployment on hardware [124]. It is mainly designed for GSM, UMTS and
GPRS systems.
MIBS [125] takes 64-bit input to perform 32 iterations using two variants of keys, 64-bit
(1396 GE) and 80-bit (1530 GE). It is Feistel based structure, makes use of S-box from
mCrypton [80] and uses PRESENT’s keys extraction technique to derive the sub-keys.
LBlock [126] is an ultra-lightweight cipher, performs 32 iterations on 64-bit input along
with 80-bit keys. The smallest hardware deployment needs 1320 GE for a throughput of 200
Kb/s, whereas the most efficient software implementation takes 3955 clock cycles to encrypt
a single block (on the 8-bit microcontroller).
Designed and developed by the government of the Soviet Union (1989), the lightweight
version of GOST executes 32 times on 64-bit input with a 256-bit key. The S-Box in this
version is adopted from PRESENT [127] with the demands of 651 GE.
ITUbee [128] is a software efficient cipher with a code size of 586 bytes and 2937 cycles
(the most compact version of encryption). It takes the exact size of the key and block (80-bit).
Here, key scheduling is replaced by round-dependent constants to reduce software overload.
FeW [129] processes 64-bit input with two varieties of the key, 80-bit and 128-bit for 32
times. It makes use of the S-box of Humminbird-2 and follows the key expansion process
from PRESENT. There no cryptanalytic attack found on FeW [129].
Introduced by SONY corporation and approved by NIST, CLEFIA offers 128-bit block
with choice of 128, 192, 256 bit key through 18, 22, 26 round, respectively [65][130]. It
shows high performance and strong immunity against various attacks [31][65][131][132]
with comparative high cost as the most compact version requires 2488 GE (encryption only)
for 128-bit key [130]. The strong immunity of CLEFIA against security attacks is grateful to
24 Research Background
its dual confusion and diffusion properties. On the contrary, this demands higher memory
and limits its use in ultra-small applications [30].
Piccolo [133] is another ultra-lightweight cryptography algorithm suitable for extremely
restricted environmental devices (RFID, sensors, etc.). It processes 64-bit input to perform
two iterations, 25 and 31, using two key sets, 80-bit and 128-bit, respectively. The small-
est hardware deployment (80-bit key) requires 432 GE and additional 60 GE to perform
decryption.
TWIS [134], derived from CLEFIA, takes equal size block and key (128-bit) to perform
10 iterations. It is a victim of differential distinguisher with probability one [135].
TWINE [78], derived from LBlock, performs 36 iterations on a 64-bit state along with
two key options, 80-bit and 128-bit. The most compact hardware implementation requires
1866 GE. TWINE uses nibble permutation instead of bit permutation (for sub-key generation)
of LBlock. Also, it uses a single S-box instead of ten S-Boxes of LBlock.
HISEC [136] performs 15 iterations on 64-bit input along with an 80-bit key, demanding
1695 GE. It shows good resistance against different attacks, and the characteristics are more
like to PRESENT except bit-permutation.
Add-Rotate-XOR (ARX)
2200 GE. The core functions of BEST-1 are mod 28 addition and subtraction, bitwise shift
and XOR.
LEA [143] is a software-oriented cipher and was introduced by the ETRIK for 32-bit
common processor. It processes 128-bit input to perform 24, 28, and 32 iterations using
128-bit, 192-bit and 256-bit keys. On the ARM platform, LEA performs 326.94 cycles/byte
with a storage demand of 590 bytes (code) and 32 bytes for execution. The most compact
version requires 3826 GE for 76.19 Mbps throughput [144].
With focus on automobile industry, KeeLoq [41] is designed with an aim to keyless authen-
tication (remote access) in cars [145] by Gideon Kuhn. It takes 32-bit input with a 64-bit
key to perform 528 rounds. Even though developed in the ’80s, the cryptanalysis report of
KeeLoq was issued in February 2007 for the first time by Bogdanov [146].
KATAN/KTANTAN [147], inspired by KeeLoq, cipher family applies 80-bit key on
various block size (32-bit, 48-bit and 64-bit) through 254 iterations. They could be executed
on small-scale hardware (KATAN 802 GE and KTANTAN 462 GE), mainly designed for
RFID tags and sensor networks. They follow a linear structure (LFSR) instead of the NLFSR
of KeeLoq. KATAN has straightforward key scheduling compared to KeeLoq, whereas
KTANTAN exhibits no key generation operations (reduce GE requirement). As the key
remains unchanged once initialized, the applications of KTANTAN is limited. KTANTAN-48
(588 GE) is more appropriate for RFID tags. In software, both shows poor performance (low
throughput and high energy consumption) due to overuse of bit manipulation [122].
Halka [148] performs well on both hardware and software. It takes 64-bit input with
an 80-bit key to perform 24 iterations. The multiplicative inverse based S-boxes (8-bit)
with LFSR makes Halka more secure than PRESENT. It demands 138 GE (7% less GE
than PRESENT) [148]. Also, the software performance is three times more efficient than
PRESENT [148].
Hybrid
SEA* 96 8 0.13 2562 2.56 1117.67 2.29 0.89 96 96 426 24 41604 173.7 9.2 21.6
KASUMI* 128 64 0.13 3437 3.44 29.9 115.14 33.5 128 64 1264 24 11939 47.6 21.4 16.93
MIBS^ 64 64 0.18 1396 2.09 10.47 200 143.26 64 64 3184 29 49056 66.2 5.2 1.63
LBlock^ 80 64 0.18 1320 2 9.9 200 151.51 80 64 976 58 18988 25.6 13.48 13.81
ITUbee* - - - - - - - - 80 80 716 0 2607 10.4 122.7 171.37
GOST^ 256 64 0.18 1000 1.5 7.5 200 200 256 64 4748 190 10240 13.8 25 5.27
Robin^ - - - - - - - - 128 128 1942 80 4935 6.6 103.74 53.42
Fantomas^ - - - - - - - - 128 128 1920 78 3646 4.9 140.42 73.14
CLEFIA* 128 128 0.13 2678 2.67 36.82 76 28.37 128 128 3046 0 28648 114.5 17.8 5.84
PICCOLO^ 80 64 0.13 1136 1.13 4.8 237.04 208.66 80 64 966 70 21448 28.9 11.93 12.35
TWINE# 80 64 0.09 1503 1.05 5.91 178 118.42 80 64 1180 140 20505 - 12.48 10.58
SPECK* 96 48 0.13 884 0.88 73.67 12 13.57 96 48 134 0 408 1.6 470.5 3511.19
IDEA* - - - - - - - - 128 64 596 0 2700 10.8 94.8 159.06
HIGHT* 128 64 0.35 2608 4.7 24.93 188 72.08 128 64 5718 47 6377 25.5 40.14 7.02
27
LEA# 128 128 0.13 3826 3.82 50.22 76.19 19.91 128 128 590 32 5231 - 97.8 165.76
KATAN* 80 32 0.13 802 0.8 64.16 12.5 15.58 80 64 338 18 72063 289.2 3.5 10.35
KTANTAN^ 80 32 0.13 462 0.46 36.96 12.5 27.05 80 32 10516 614 10233211 13814.8 0.012 0
Hummingbird^ - - - - - - - - 128 16 1822 82 4637 6.2 13.8 7.57
Hummingbird-2^ 128 16 0.18 2159 3.23 40.48 80 37.05 128 16 770 50 1520 2 42.1 54.68
* 8-bit microcontroller, ^16-bit microcontroller, # 32-bit microcontroller
28 Research Background
According to the graph (Figure 2.3), software efficiency competition is won by SPECK,
followed by SIMON and then PRIDE. Also, ITUbee, LEA, IDEA, and AES show better
software efficiency than the other LWC algorithms.
Memory (RAM and ROM) requirements by various LWC algorithms can be studied from
the above graph (Figure 2.4), which reveals the top ten memory-efficient LWC algorithms.
The competition is again won by SPECK and SIMON with less than 200 bytes of ROM and
zero bytes of RAM requirement, closely followed by PRIDE.
Another two crucial software metrics, latency and throughput, led by again SPECK and
SIMON with the lowest latency rate, 408 cycles/block and 594 cycles/block, respectively,
and highest throughput, 470.5 Kb/s and 323 Kb/s, respectively, unceasingly followed by
PRIDE. Also, ITUbee and IDEA secure their places in the list of the top ten performers with
almost 7-times high latency compared to SPECK (Figure 2.5).
Midori is on the top of the list in the race of hardware efficiency, 259.4 Kbps/KGE,
followed by PICCOLO, as runners-up with a minor difference of 8.66 Kbps/KGE with GOST.
One of the standard LWC algorithms, PRESENT, documents half efficiency compared to the
top one in this race. Figure 2.6 visualizes the first ten hardware efficient LWC algorithms.
From the graph (Figure 2.7), SEA leads the key and block-wise (hardware efficiency)
competition with tiny block size (only 8-bit), followed by Hummingbird-2 with a double-
sized block (and the largest key in this top-10 list). Further, KATAN/KTANTAN has four
times bigger blocks than the leader. List accommodates PRINT, EPCBC, SIMON/SPECK,
PRESENT and RECTANGLE with either 48-bit or 64-bit block along with 80-bit or 96-bit
key, respectively.
Fig. 2.7 Block & Key size wise Hardware Efficient LWC algorithms (Top 10)
From the graph (Figure 2.8), we can say that KTANTAN demands the smallest area (462
GE) to implement, with a minor difference from PRINT (41GE more). SPECK/SIMON
shows their presence in the top 5 lists with less than 900GE needs. All of these performances
are noticed either on 0.13 µm or 0.18 µm technologies.
Fig. 2.8 Physical Area wise Hardware Efficient LWC algorithms (Top 10)
2.4 Cryptanalysis of existing LWC algorithms 31
In terms of energy consumption, Midori shows the lowest energy requirement (only 1.61
µJ/bit), followed by Piccolo, PRINCE, TWINE and RECTANGLE with more than double
energy requirements. Here, PRESENT, placed in the tenth position, demands almost six
times more energy than the top performer. Figure 2.9 depicts the top 10 hardware efficient
LWC performers by their energy demand.
Fig. 2.9 Energy Efficient Hardware Efficient LWC algorithms (Top 10)
In summary, SIMON and SPECK shine by their most efficient software implementation
but disappears from the top-10 list of hardware efficient LWC algorithms. Also, derived ver-
sions of AES such as PRESENT and derived lighter versions of DES such as DESL/DESLX
and CLEFIA are widely recognised algorithms (by the standardising bodies) due to high-
security reasons. However, overall, none of the LWC algorithms meets all the efficiency
metrics of the hardware and software requirements and shows distinct performances in
different circumstances.
Integral/Square/ Side-Channel/
LWC Differential Linear Crypt- Algebraic/Cube MITM/ Related
Saturation Differential
Algorithm Cryptanalysis* analysis Cryptanalysis Biclique Key attack
Cryptanalysis fault attacks
AES ✓[158] - - - ✓[68] ✓[68] ✓[159][160][161]
PRESENT ✓[162][163] - - - ✓[47] ✓[164] ✓[159][161][165][166]
GIFT ✓[167][74] - ✓[168] - ✓[72][168][75] ✓[169][74][170] ✓[171]
SKINNY ✓[172] - - - - ✓[170] ✓[161][173][174]
RECTANGLE - - ✓[71] - - ✓[71] ✓[71]
MIDORI ✓[34] ✓[34] - - ✓[34] - -
mCrypton - - - - - ✓[175] -
NOEKEON - - - - - ✓[83] -
ICEBERG ✓[176] - - - - - -
PUFFIN-2 ✓[177] - - - - - -
PRINCE ✓[178] - - - - - -
PRINT - - - - - ✓[179] -
Klein - - - - ✓[180] ✓[181] ✓[182]
LED ✓[183] - - - ✓[47] ✓[95] -
EPCBC - - - ✓[42] - ✓[42] -
TEA - - - - - ✓[112][113] -
XTEA - - - - - ✓[115] -
XXTEA ✓[184] - - - - - -
Camellia ✓[118] - - - - - ✓[43][160]
SIMON ✓[48][185] - - ✓[49] - ✓[49] -
KASUMI ✓[37] - - - - ✓[38] -
MIBS ✓[186] ✓[186] - - - - -
LBlock ✓[44][45] - ✓[78] - ✓[187] - -
ITUbee - - - - - ✓[188] -
GOST - - - - ✓[189] ✓[190] -
CLEFIA - - ✓[130] - - ✓[130] ✓[160]
PICCOLO ✓[191] - - - ✓[47][192] - -
TWIS ✓[135] - - - - - -
TWINE - - ✓[108] - ✓[193] - -
SPECK ✓[185][194] - - - - ✓[194] -
IDEA - - - - ✓[36] - -
HIGHT ✓[164] ✓[35] - - ✓[192] ✓[195] -
LEA - - - - - - ✓[46]
KeeLoq - ✓[146] - ✓[145] ✓[196] - ✓[146]
KATAN - - - - ✓[197] - -
KTANTAN - - - - - ✓[39] -
Hummingbird-2 - - - - - ✓[198] -
Hummingbird Vulnerable to several attacks [150]
*It includes Truncated/Higher-order/Impossible/Boomerang Differencial Cryptanalysis
34 Research Background
Smart home appliances such as smart TV, smart fridge, smart kettle, smart bulbs, etc.,
demands small memory and small processing. The best-suited algorithms in this scenario are
SIMON, SPECK, PICCOLO and TWINE.
A person under medical treatment in a hospital or residence could be monitored for
pulse count, pressure level, sugar and oxygen in the blood using IoT sensors. Here, security
and privacy of the transmitting data are crucial, along with tiny circuitry, little processing
power, limited batteries (in case of an implanted device), and quick response time. In this
constrained environment, SIMON, SPECK, PICCOLO, PRESENT and Midori are the best
suit solutions to secure the communication in health care applications due to their overall
compact hardware and software implementation to match with real-time response while
in-body and/or out-body (wearable) implantation.
2.6 Research Gaps 35
For industrial systems (Industry 4.0), sensors could be attached to equipment at various
places (not easily accessed by the operators) to transmit the data wirelessly for specific
distances. In this state, real-time processing is the critical element with adequate security
(without bothering about energy consumption). As a result, Midori and PRINCE show the
best performance in a demanding scenario.
Due to tiny physical space and a little or no power backup in RFID tags, SIMON, SPECK,
Piccolo and PRINCE are the best options for logistics applications.
In an era of 5G technology, automobile industry demands not only in-vehicle commu-
nication but also communication with infrastructures such as traffic signals and road signs
(V2X). This communication requires a prompt response (low latency) on a tiny circuitry
with high security. Midori, PRINCE, PRESENT, and SIMON are the right choices for auto
industries. Keeloq is another powerful LWC algorithm for secure remote keyless entry in
cars and buildings [196].
Nowadays, smart agriculture is an emerging field that demands compact implementation,
fewer processing cycles, little power consumption with plenty of sensors in a remote location.
SIMON, SPECK, PRESENT and TWINE fulfil the requirements of smart agriculture.
memory (to store) and computing power (to produce) while maintaining the same
security level? (motivation: PRESENT is designed from AES and replaces eight
S-boxes with just one. Similarly, many researchers have derived the lighter versions
from the standard cryptography algorithms with a few modifications by reducing
substitution-permutation (counter-effect on security level)). But how to replace S-
boxes with some other confusion techniques with the same level of security and less
overhead of memory and processing cost is still an open problem.
2. Making key scheduling lighter with smaller key size and adequate strength, i.e., How
to generate random sub-keys from the provided initial key for all n rounds?
3. An increase in the number of rounds adversely affects the performance and cost,
i.e., How to decrease (or increase) the number of rounds without compromising
performance as well as security level?
A concern from the above-discussed challenges is how to fulfil all three lightweight
characteristics (cost, performance, and security) into a single LWC algorithm. Therefore, it
encourages rethinking and redesigning the substitution-permutation network (i.e., S-Box and
permutation technique).
Chapter 3
Research Methodology
The algorithm is designed carefully with the novelty of features such as an eccentric
permutation technique (transpose) to create diffusion [27] as well as a novel 5-bit substitution
box to develop the confusion property [27]. In addition, it offers a unique way to create
16 subkeys from the original one. Here, the number of rounds is reduced to 16 compared
to 32 in [64] to balance the performance and cost ratio, consequently affecting the subkey
generation operation in a lightweight manner. On the contrary, security is maintained by
offering more bit-size S-box (5-bit instead of 4-bit).
Three main functions perform in each round are as follows:
1. Permutation (Transpose)
2. AddRoundkey
Figure 3.2 illustrates the structure of AUM, in brief, using the functions mentioned above.
Transpose Key : 7 12 9 14 3 5 11 8 2 13 4 10 15 0 1 6
Now, place each bit of plaintext according to the transpose key value, tki , in a column
wise manner (figure 3.4), where 0 ≤ tki ≤ 15.
Fig. 3.4 Filling plaintext bits column wise into 2-D transpose
The above 2-D array will be now read in a row-wise manner to increase the diffusion level
(figure 3.5). Thus the output from the transpose will be, P14 , P24 , P18 , P28 , P6 , ...... P31 , P1 , P3 , P13 .
Fig. 3.5 Reading the bits from 2-D array row wise
The process could be presented in the form of an equation, Ti , which is based on two
independent variables j and n as follows:
Here, the transpose key value, tk, is random and ranges from 0 to 15. Instead of having the
same number of transpose/permutation values (like in traditional permutation) to rearrange
the inputs, the 2-D array transpose design of AUM reduces the same to half (32/2). It reduces
the resource requirement [64][68], only 16 values instead of 32, and makes the permutation
lighter by providing almost the same level of security. Figure 3.6 depicts the permutation
process as a whole.
3.2 Proposed LWC algorithm: Detailed Structure 41
3.2.2 AddRoundKey
The number of rounds is reduced to 16 to boost the performance along with robust security
through 3 levels of random inputs from the user: transpose (permutation), AddRoundKey
and finally, 5-bit S-box. Here, at AddRoundKey, the input from transpose is altered by
performing an Exclusive-OR with a subkey, uniquely generated for that round.
j j j
For any given round, the subkey, sk j = {sk31 , sk30 , ...sk0 } for 0 ≤ j ≤ 15 and the transpose
value, Ti = {t31 ,t30 , ...t0 }, addRoundKey consists of the operation for 0 ≤ i ≤ 31 as follows:
j
adRKi ⇒ ti ⊕ ski (3.2)
The output of the addRoundKey function is served as an input to the next level for
substitution using the 5-bit S-box.
Popular S-boxes
Many researchers and scientists proposed a variety of S-box concepts in the past. Some show
high resistance against various attacks and high resource demand, whereas some demonstrate
better performance but a weak stand against the security attacks. Most of these S-boxes take
3.2 Proposed LWC algorithm: Detailed Structure 43
3-bit, 4-bit, 5-bit, 6-bit or 8-bit input and produce either the same or compressed bit output
[204]. Among these, 4-bit S-boxes are popular among lightweight cryptography algorithms
due to their compact [205][206] but simple implementation [207]. This section presents an
overview of S-boxes used by popular lightweight cryptography algorithms such as PRINT,
PRESENT, RECTANGLE, EPCBC, TWINE, LED (Light Encryption Device), SKINNY,
Piccolo, KLEIN, Puffin, LBlock, SPONGENT, DESL/DESXL, ASCON, PRIMATE, ICE-
POLE, and SHAMASH.
3-bit S-box: PRINT [91], dedicated designed for integrated circuit (IC) printing, offers
the smallest 3x3-bit S-box, S : {0, 1}3 → {0, 1}3 . A single S-box (Table 3.1) in an octal
numeral system is used parallelly for b3 times, where b ∈ {48, 96}, the size of input block. It
is both hardware and software efficient due to its cost-effective implementation on extremely
low-cost RFID tags. At the same time, it is vulnerable to attackers due to its small number of
possibilities to create different S-boxes.
x 0 1 2 3 4 5 6 7
S(x) 0 1 3 6 7 4 5 2
4-bit S-box: PRESENT [64] uses 4-bit S-box, S : {0, 1}4 → {0, 1}4 , (Table 3.2). It relies
on of Hexadecimal system and forms a state as sixteen 4-bit words in each sBoxLayer. The
S-box design criteria allows 8064 possible S-boxes schemes (maximum) [205]. It is victime
of differential cryptanalysis [163][44].
x 0 1 2 3 . . . . . . D E F
S(x) C 5 6 A . . . . . . 7 2 9
RECTANGLE [71] adopts a 4x4 S-box from PRESENT with a reduced number of rounds
(25 compared to 31) to offer software efficiency. It has AES like structure with the removal
of a few functionalities (a slight change in SP Network) and the introduction of the bit-slice
44 Research Methodology
technique to improve performance and cost. Unfortunately, like PRESENT, it also suffers
from various cyber-attacks [71].
EPCBC (Electronic Product Code Block Cipher) [98] uses the same 4x4 S-box as used
in PRESENT. It just varies in key scheduling from PRESENT.
Like the above algorithms, TWINE [78] also use the ready-made 4x4 S-box from
PRESENT. With other structural changes in the algorithm, it gives faster performance
than PRESENT [53].
The trend of using 4x4 S-box from PRESENT continues with LED [93], SKINNY [77],
Piccolo (four bijective S-boxes) [133], KLEIN [92], Puffin [87], LBlock (such 8 different
4x4 bit S-boxes) [126] and SPONGENT (uses it for b4 times parallelly, where b is the fixed
number of bits of a state) [208].
5-bit S-box: ASCON [100][101] uses 5-bit S-box, S : {0, 1}5 → {0, 1}5 , in parallel over 320
bits in bit-slice manner (Table 3.3). SHAMASH [102], similar to ASCON, uses 5-bit S-box
with minor linearity and bit distribution difference compared to ASCON’s S-box. PRIMATE
[103] works on 5x8 and 7x8 state of 5-bit elements for multiple times on different variance.
ICEPOLE [104][105] operates 5-bit S-box on 256 rows of 1280 state of the plaintext. The
structure of all of these S-boxes is remarkably similar. Due to their odd size (not the multiple
of two, i.e., size ̸= 2n ), they are not as popular as 4-bit S-boxes and have limited history.
x 0 1 2 3 . . . . . . 29 30 31
S(x) 4 11 31 20 . . . . . . 10 15 23
6-bit S-box: DESL is the lightweight version of DES (Data Encryption Standard), where
it is further updated as DESXL with a key whitening feature to improve the security [106].
DESL/DESXL, uses 6-bit S-box that takes 6-bit input and produces compressed 4-bit output
[204][106]. Both replaces 8 different 6x4 bits S-box of DES with a single 6x4 bits S-box,
S : {0, 1}6 → {0, 1}4 . The first and last bits of the input form a 2-bit binary to select one of
four rows, and the middle 4-bit selects one of the sixteen columns (Table 3.4). For instance,
6-bit input 011001, the row is 01 (row 1), and the column is 1100 (column 12) will be
selected to produce the output 13 (1101). The possible number of different S-boxes with this
design criteria is 256 [106].
3.2 Proposed LWC algorithm: Detailed Structure 45
x 0 1 2 3 . . 11 12 13 14 15
(00) 14 5 7 . . . . 0 6 13 3
(01) 5 0 8 . . . . 13 4 1 10
S(x)
(10) 4 9 2 . . . . 5 11 3 6
(11) 9 6 15 . . . . 0 14 10 13
8-bit S-box: ICEBERG [84] uses an 8×8 S-box, S : {0, 1}8 → {0, 1}8 (Table 3.5) (inspired
from AES [209]), spread over 3 stages (S0 , S1 , S0 ) in the form of 4x4 S-boxes (Table 3.6, 3.7)
in parallel to achieve the substitution. It is quite expensive in terms of cost and performance
while implementing on resource-constrained IoT devices.
00 01 02 03 04 05 . . 0C 0D 0E 0F
00 24 c1 38 e7 . . . . . d6 52 fd
10 40 6c d3 3d . . . . . fb fc f1
20 07 f5 93 cd . . . . . 5f 92 6b
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
d0 10 49 25 fa . . . . . b9 c4 12
e0 a0 95 65 bf . . . . . 9b a4 d1
f0 cb 1f 8f 8e . . . . . 1e 0f 79
46 Research Methodology
0 1 2 3 4 . . . A B C D E F
d 7 3 9 . . . . . 5 e 6 0 8
0 1 2 3 4 . . . A B C D E F
4 a f c . . . . . 6 1 7 3 2
• 3-bit S-box is the cheapest in terms of memory, energy and computing power along
with high performance but can be easily victimised of an attack due to only 23 different
S-box possibilities.
• 4-bit S-box is more efficient than 8-bit S-box in terms of energy consumption but
provides low security (this could be resolved by increasing the number of rounds).
• 5-bit S-box is not widely used due to its odd nature but could be an alternative to 4-bit
S-box in terms of improved security.
• 6-bit and 8-bit S-boxes are comparatively more secure than 4-bit S-box but expensive
in terms of resources.
Table 3.8 exhibits the existing n-bit S-boxes and their related concerns.
3.2 Proposed LWC algorithm: Detailed Structure 47
• Demands little more memory (to store 64 possible values) and little high
processing power (to derive/process 64 possible values) compare to 4-bit
S-box
6-bit [106] • The above demand leads to high energy consumption compared to 4-bit
S-box
• The above parameters could increase the demand for the physical area
(GE)
• Demands huge memory (to store 256 possible values)and very high
processing power (to derive/process 64 possible values)
• The above demand leads to very high energy consumption compared to
8-bit [84, 209]
4-bit and 6-bit S-box
• The above parameters could dramatically increase the demand for the
physical area (GE)
48 Research Methodology
One of the two key aspects of any cryptography scheme: confusion and diffusion [27],
confusion can be procured using substitution to build a complex relationship between the
ciphertext and the key. Various academics have proposed a variety of S-boxes to accommodate
a variety of cryptography applications. The majority of lightweight cryptography algorithms
use a 4-bit or 6-bit S-box [53, 64, 71, 78, 98]. The proposed LWC algorithm, AUM, offers a
new 5-bit S-box derived using a dynamic chaotic system called enhanced logistic mapping.
AUM performs the substitution in three steps: 1) Swapping the first and last bit of 32-bit
input from addRoundKey, and 2) Divide the remaining 30-bits into six blocks, each block
made up of 5-bit and 3) Mapping each 5-bit block into an S-box for its replacement bits
(Figure 3.7, Figure 3.8).
Now, each 5-bit input block is transformed into a distinctive 5-bit output, S : {0, 1}5 →
{0, 1}5 : x → S(x). The 5-bit S-box consists of 2 rows and 16 columns. The first bit of 5-bit
input (i.e., 0 or 1) selects the row, and the remaining four bits decide the column number.
The number of columns is equal to half the number of distinct output values in the S-box (2m ,
where m = 5 is the number of output bits). The 5-bit input creates 25 possible input values,
and these 25 (i.e., 32) values can be easily accommodated into this S-box table.
Figure 3.8 demonstrates an example of the proposed 5-bit S-box with randomly placed 32
values (using Enhanced Logistic mapping theory) into a 2x16 table. Further, it demonstrates
a unique mapping of 5-bit input into an S-box for matching output.
3.2 Proposed LWC algorithm: Detailed Structure 49
Fig. 3.8 Mapping each 5-bit block into an S-box for its replacement bits (example)
Step 6. Repeat step 5 for n-times to generate dynamic chaotic sequence (In our case, n = 32
times)
Step 7. Finally, arrange the elements (1, 2, . . . n) in ascending order of the sequence generated
To build a simple but robust 5-bit S-box, S : F25 → F25 , that could be easily implemented on
resource-constrained IoT devices, the following simple but security efficient rules need to
apply:
1. S-box, S, must have distinct 32 elements (0 - 31) spread over 16 columns and 2 rows
that satisfies bijective property (section 4.3.1).
50 Research Methodology
2. Generate the complex chaotic sequence of the elements in 5-bit S-box using enhanced
logistic map equation [210] as defined follows:
where p is a control parameter, and p ∈ (2, +∞). Even though p could have initiated
with 0, the suggested initial value of p is 2 for a complex dynamic chaotic behavior
reasons. This is because all the fixed points of the enhanced logistic map are unstable
when p ≥ 2 [200].
3. Any value, Vi , in S, must be different from its column index, Ci , to avoid a fixed point,
i.e.,
(
Ci ifVi ∈ R0
Vi ̸=
C(15+i) ifVi ∈ R1
4. An input value, Ini , and its corresponding value, Vi , in S must have bit variation of n
bit(s), 0 < n ≤ 5, to meet overall Strict Avalanche Criteria (SAC), i.e.,
where Ini : f (Ri ,Ci ), Ri → {0, 1}, Ci → {0, 1}4 and Vi → {0, 1}5
Here, in design criteria 2), the sequence of elements in the 5-bit S-box could be generated
using any chaotic mapping methods such as logistic map, sine map, tent map and quadratic
map to improve its dynamic behaviour. But, we adopt an enhanced logistic map technique
for our 5-bit S-box as it eliminates fixed point [200] weakness of an S-box design.
By implementing the above-defined set of rules, the total number of possible random
5-bit S-box could be 31! ≈ 8.22 ∗ 1033 which is enormous compared to a number of 4-bit
S-box that is 15! ≈ 1.3 ∗ 1012 . Thus, the proposed technic takes care of all security aspects
(see section 4.3 for Security Analysis) with high performance and low cost (see section
4.2 for Performance and Cost Analysis) with the flexibility to go with various block sizes
(following section 3.2.3).
3.2 Proposed LWC algorithm: Detailed Structure 51
Usually, the input block size are even and of 2n (n = 5, 6, 7, ...) [211][212][205]. Also, they
are multiple of either 4 or 6, in general. Odd size S-boxes are avoided with the flexibility to
split the input block over the S-box size, and always 4, 6 or 8 bits are considered.
Although the proposed S-box is 5-bit, an odd size S-box, it easily fits over the various
input block sizes such as 32, 48, 64, 128 and 256.
Let’s consider a 32-bit input block where the middle 30 bits (out of 32) can be split
into six 5-bit inputs (to the 5-bit S-box). Then remaining first and last bits can be swapped.
Similarly, a n-bit input block can be divided into m 5-bit input (to the 5-bit S-box). Then
remaining x (i.e., n − 5m) bits, x ∈ {1, 2, 3, 4}, can be interchanged. Table 3.9 gives the brief
of how 5-bit S-box can be implemented with popular input block sizes.
Table 3.9 Implementation Flexibility of 5-bit S-box with different block size
Block
Implementation on 5-bit S-box Remaining bits
Size
The middle 30 bits (out of 32) can be split The remaining first and last bits can be
32-bit
into six 5-bit inputs to the 5-bit S-box swapped.
The middle 60 bits (out of 64) can be split The remaining first two and last two bits
64-bit
into twelve 5-bit inputs to the 5-bit S-box can be interchanged.
The middle 255 bits (out of 256) can be split The remaining one bit (either first or last)
256-bit
into fifty-one 5-bit inputs to the 5-bit S-box can be inverted (Ones’ complement).
52 Research Methodology
Transpose Key : 7 12 9 14 3 5 11 8 2 13 4 10 15 0 1 6
Now rotate the original key right seven times to produce the first subkey (for round 1),
rotate the first subkey right for 12 times to produce the second subkey, rotate the second
subkey right for nine times to produce the third subkey and so on till the last subkey for the
round 16. If the transpose key value, tki , is 0 (in 14th key in this example), rotate it for 16
times.
3.3 Inspiration for naming the proposed LWC algorithm 53
Step 7: Repeat the step 4, 5 and 6 for 32 times to produce 32 bit trans[] bits
Exclusive OR (XOR) between the output from transpose and the subkey
(addRoundKey)
Step 1: Declare unsigned integer variables i
Step 2: Perform XOR between each bit of trans[i] and sub_key[r][i] and store the result into
some variable addKey_out[i]
Step 3: Repeat the step 2 for 32 times
Result Analysis
This chapter discusses three criteria defined by NIST to evaluate any lightweight cryptography
algorithm. It talks about the cost and performance of the proposed model and then gives a
complete view of security aspects in the second part. First, it reveals the performance and
cost efficiency of the proposed algorithm by implementing it on different ASIC platforms and
comparing it with its competitor LWC algorithms. It also discusses the resource requirements
by their individual elements. Then, a broad view of its core element, the S-box, is given
by comparing it with other n-bit size S-boxes. Further, the section gives a clear picture
of the security strength of the proposed algorithm by comparing it with the same bit-size
S-boxes. Finally, the security measure is carried out by considering all essential and popular
security metrics such as bijective property, nonlinearity, linearity (LP), differential probability
(cryptanalysis), degree of avalanche effect (SAC), bit Independence criteria (BIC) and
algebraic attacks.
Figure 4.2 shows the datapath of an area-optimized version of the proposed algorithm
(AUM), which performs one round in 32 clock cycle to encrypt 32-bit plaintext using a 32-bit
key. Also, Figure 4.3 shows the behavioural simulation of the AUM implementation.
4.1 Experiment Setup
Fig. 4.4 Performance and cost comparison of AUM with other competitors
The proposed LWC algorithm, AUM, takes very little power, 0.13 µW and 0.16 µW , on
Cadence RTL Compiler for without subkey generation and with subkey generation modules,
respectively. On the other hand, it takes 0.95 µW of power on Synopsys Design Compiler for
the full implementation of the AUM. One of the competitors (4-bit S-box) and milestone of
the LWC algorithms, PRESENT, demands 5 µW of power which is very high compared to the
proposed one. Even the power demands by both of the version of ASCON is drastic (up to 45
µW ) at 1 MHz frequency on Cadence platform. Two variants of PRIMATE, PRIMATE-80A
64 Result Analysis
and PRIMATE-80B, demand 2.32 µW and 0.68 µW of power, respectively. The second
variant gives close competition to the proposed algorithm for this ASIC implementation.
Also, the proposed algorithm, AUM, without subkey generation and with subkey genera-
tion module requires only 1056 GE, 1289 GE (on Cadence) and 1319 GE (on Synopsys) of
area to execute on the listed 0.18 µm technology platforms. All the competitors, including
PRESENT, demand a higher implementation area on either platform except PRIMATE-80B.
PRIMATE-80A shows high throughput (20000 Kbps) but requires almost 3-time more GE
than AUM# . While PRIMATE-80B is a strong contender in performance and cost, our pro-
posed algorithm, AUM, exhibits better immunity against various cryptanalysis (Table 4.10)
with a minor affordable resource increase. Thus, selecting the AUM over PRIMATE-80B
is preferable for safety reasons. All ASCON and PRIMATE versions are evaluated on 0.09
µm technology. The lighter version of ASCON requires almost double physical area (GE) to
implement, while round base ASCON demands 6-times more GE than the key generation
version of AUM. Thus, AUM beats all of these competitors and proves the best choice.
An implementation that takes up to 3000 logic gates is described as a lightweight
implementation, an implementation that takes around 2000 logic gates is called a low-
cost, and a further compact implementation with about 1000 logic gates is known as an
ultra-lightweight implementation [31]. Our proposed algorithm requires only 1056 GE
(without subkey generation) and 1289 GE (with subkey generation), and thus it earns the
ultra-lightweight title. Figure 4.4 outlines performance and cost comparison between AUM
and its’ competitors.
The proposed algorithm targets RFID tags, smart cards and sensors with small messages,
usually, message size < 2Kb. However, AUM achieves a throughput of 100 Kbps, and other
competitors show higher values; it doesn’t really affect real-world processing while message
size is small. Also, many real-time applications, such as RFID tags, smart cards, etc., use the
same subkeys (already created) for every transaction. In addition, the key remains the same
for its lifetime (mostly); there is no need for subkey generation again. So, it is possible to
execute the subkey generation module separately, and the algorithm excluding the subkey
generation module could be embedded on the device. These subkeys could be updated
periodically or on-demand separately.
The individual GE requirements by each component of the proposed algorithm, AUM, is
exhibited in Table 4.2.
4.2 Performance and Cost Analysis 65
As S-box is the key element of this research work, the following sections discusses
more on 5-bit S-box by comparing it with the 4-bit and 6-bit S-boxes. Figure 4.5 shows the
datapath of an area-optimized by 5-bit S-box, which performs one round in one clock cycle
i.e. a 32-bit width datapath.
Table 4.3 gives the comparison of area (KGE), power (µW ) and energy (µJ/bit) require-
ments by 4-bit, 5-bit (the proposed one) and 6-bit S-boxes while implementing on Synopsys
Design Compiler (v-K2015.06). It is illustrated in Figure 4.6. From the graph, it can be seen
that all three parameters increase more or less as the number of input bit(s) to the S-box
increases. Broadly, there is a little rise in power (µW ) as well as in energy (µJ/bit) while
shifting from 4-bit input to 5-bit input to the S-box. On contrary, there is an observable
difference in all three dimensions while adding 1 or 2 bit(s) to the S-box input. Overall, the
cost of a 4-bit or 5-bit S-box is almost similar and affordable compare to 6-bit S-box.
Fig. 4.6 Area, Power & Energy requirement by various S-boxes @ 100KHz frequencies
4.2 Performance and Cost Analysis 67
Further, Table 4.4 compares area requirements (in GE) of the various S-boxes (4-bit/5-bit)
used in the popular LWC algorithms. Our proposed 5-bit S-box requires only 12.54 GE on
Cadence (Genus) RTL synthesis tool (compiler) and beats out 4-bit/5-bit competitors. This
can be visualized in Figure 4.7. Our S-box consists of eight NAND gates (seven 2-input
NAND gates and one 3-input NAND gate) and seven NOR gates (six 2-input NOR gates
and one 3-input NOR gate). Here, one NAND/NOR gate costs 0.78 GE for all 2-input logic
gates, whereas a 3-input NAND gate costs 1.37 GE and a 3-input NOR gate costs 0.98 GE. It
takes around 0.042 µW of power to implement this logic.
Table 4.4 Various S-box Area Comparison
where bi ∈ {0, 1} and (b1 , b2 , ...bn ) ̸= (0, 0, ...0) for each Boolean function, fi (1 ≤ i ≤ n).
Here, fi fulfils the bijective property by balancing 0 and 1. Also, the proposed 5-bit S-box
has all distinct values from 0 to 31, and thus manifest the bijective property.
4.3.2 Nonlinearity
S-box operations are designed to obtain nonlinearity to the algorithm. It should not be
possible to break the algorithm by solving a set of equations using some set of unknown
values. Since the proposed S-box selects its elements at random using a dynamic chaotic
mapping system (under a defined set of rules), it is almost impossible to derive an equation
that solves any correlations between the input value and the corresponding substitution value.
Section 3.2.3 details how 5-bit input is arbitrary replaced with another 5-bit output. The
nonlinearity can be measured either using Hamming distance or the Walsh matrix. Here, the
Walsh matrix is not possible to apply as it works on multiple of two, and our proposed S-box
makes use of 5 bits. We measure the nonlinearity using Hamming distance (Hd ). It is the
distance between any corresponding input-output pairs (xi , yi ), where Hd (xi , yi ) = #(xi ̸= yi ).
The minimum value of Hamming distance (Hd ) for the proposed 5-bit S-box is 1, whereas
maximum is 5 (Table 4.5). The average Hamming distance (Hd ) calculated for the proposed
4.3 Security Analysis 69
5-bit S-box is 2.625. Figure 4.8 depicts the nonlinearity comparison via Hamming distance
(Hd ) for the proposed S-box and its 5-bit competitors. The higher the Hamming distance (Hd ),
the higher the nonlinearity property. Thus our proposed 5-bit S-box satisfies the nonlinearity
characteristics.
Hamming Hamming
Input Output Input Output
distance (Hd ) distance (Hd )
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
70 Result Analysis
6 6 6 6 8 6 8 8 8 8 6 4 4 8 8 8
6 6 8 8 8 4 8 6 6 6 6 8 8 4 8 8
Here, S−1 is the inverse function of S-box. The values in the boomerang connectivity
table are usually greater than or equal to that in the differential distribution table values
in terms of strength. This relationship is described in [221]. Table 4.8 summarizes the
occurrence of each element in BCT and DDT of the proposed S-box.
4.3 Security Analysis 73
32 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 0 0 0 0 0 0
0 0 2 0 0 4 0 2 0 4 0 4 0 0 0 0 4 0 0 0 0 2 0 2 0 0 0 2 2 4 0 0
0 2 0 0 0 2 0 0 0 0 0 0 2 0 2 0 4 0 6 0 0 4 2 0 0 0 0 4 2 0 2 0
0 0 2 0 0 4 0 0 2 0 0 4 0 2 2 0 0 0 0 0 0 0 0 2 0 8 0 0 4 0 2 0
0 2 0 2 0 2 2 2 4 4 2 2 0 0 2 0 0 0 0 0 0 0 2 0 0 0 2 2 0 0 2 0
0 0 2 4 0 0 2 0 0 0 2 2 2 2 4 0 0 0 2 2 0 0 2 2 2 0 0 0 2 0 0 0
0 0 0 0 0 0 0 0 2 0 0 4 0 2 0 0 0 2 4 4 2 2 0 2 0 0 2 2 0 2 2 0
0 0 4 4 0 0 2 2 2 0 2 0 0 0 2 2 4 2 2 0 0 0 0 0 2 2 0 0 0 0 0 0
0 0 2 2 2 0 4 0 0 0 0 2 2 2 0 0 0 0 0 0 0 0 2 0 0 0 2 0 6 0 4 2
0 4 0 2 0 0 0 2 0 0 2 0 0 0 0 2 0 0 0 0 2 2 2 6 0 2 0 2 0 2 2 0
0 0 0 0 2 0 0 2 2 0 2 0 2 0 6 0 4 2 0 0 0 0 2 0 2 0 2 2 0 2 0 0
0 0 0 0 0 2 2 4 0 0 0 2 0 0 0 2 0 2 2 0 4 2 0 2 2 0 2 2 0 0 0 2
0 0 2 0 2 4 0 0 2 0 0 0 0 2 0 0 2 0 0 0 2 0 2 2 2 2 2 0 0 2 0 4
0 0 2 0 0 0 0 0 4 2 2 0 2 2 0 2 0 0 0 2 2 2 0 0 0 2 2 0 0 0 2 4
0 0 0 0 0 0 2 2 0 2 0 0 0 6 0 0 2 4 0 2 2 2 2 2 2 0 0 0 0 0 2 0
0 0 0 2 2 2 2 0 2 0 0 0 2 2 2 0 0 0 0 2 2 0 0 0 0 0 2 0 4 4 2 0
0 0 0 0 0 2 0 2 0 0 2 0 0 2 0 0 2 0 2 2 0 2 2 2 0 0 0 4 0 4 0 4
0 0 2 0 2 2 2 0 0 0 2 2 2 0 0 2 0 0 2 0 0 2 8 4 0 0 0 0 0 0 0 0
0 4 0 0 2 0 0 0 0 2 0 2 0 0 6 8 0 0 0 0 0 0 0 2 2 0 0 2 2 0 0 0
0 0 0 0 4 0 2 2 0 0 2 2 4 0 0 0 0 0 2 4 2 0 0 0 0 2 2 2 0 0 2 0
0 0 0 2 2 2 0 0 0 2 0 0 0 0 0 0 2 0 0 2 2 4 0 0 2 0 0 2 6 2 2 0
0 2 0 0 0 0 0 0 2 2 0 2 4 2 2 0 2 0 0 2 0 2 0 0 0 4 0 0 0 0 2 4
0 0 0 0 0 4 6 4 0 2 0 0 2 0 4 2 2 0 0 0 2 2 0 0 0 0 0 0 0 2 0 0
0 2 4 0 2 2 0 2 0 0 0 0 0 2 0 2 0 0 0 0 0 0 0 0 4 4 2 0 2 2 2 0
0 6 0 4 2 0 0 0 0 0 2 0 2 0 0 0 0 4 0 2 2 2 2 0 2 0 0 0 0 0 0 2
0 0 0 0 2 0 0 0 4 2 4 2 0 0 0 2 0 4 0 2 4 0 0 0 0 0 6 0 0 0 0 0
0 0 0 4 2 0 0 2 0 0 2 0 0 6 0 0 0 8 2 2 0 0 0 0 2 0 0 0 0 2 0 0
0 4 0 0 2 0 2 0 0 0 2 0 2 0 0 4 2 0 0 0 2 0 0 0 6 0 2 0 0 2 0 2
0 0 4 0 0 0 2 0 4 4 0 0 0 0 0 2 0 0 0 0 0 2 2 2 0 2 2 0 0 0 2 4
0 2 4 0 0 0 0 0 0 4 2 0 2 0 0 2 0 0 6 2 2 0 0 0 0 0 0 0 0 2 0 4
0 2 0 2 2 0 0 2 2 0 2 2 2 0 0 0 2 0 2 2 0 0 2 0 2 4 0 2 0 0 0 0
0 2 2 4 2 0 2 2 0 2 0 0 0 0 0 0 0 4 0 0 0 0 0 2 0 0 2 4 2 0 2 0
#{x ∈ {0, 1}n |S(x) ⊕ S(x ⊕ ∆x) ⊕ S(x ⊕ ∆y) ⊕ S(x ⊕ ∆x ⊕ ∆y) = 0} (4.5)
Table 4.9 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 (β F ), is 8. Here, the FBCT
values at the first row, first column, and diagonal is 2n (i.e., 32) which are neglected. The first
row and first column with the values 2n are known as ladder switch, whereas the diagonal
74 Result Analysis
Table 4.8 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
with the values 2n is known as Feistel switch. Some common properties of any FBCT are as
follows [222]:
2. Fixed values:
Table 4.9 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
As introduced by Webster and Tavares [224], we can confirm whether an S-box fulfil the
SAC property or not by considering a 5-bit input X and a set of input vectors, X1 , X2 , ..., X5 ,
derived by changing jth bit only. Its corresponding 5-bit output vectors, Y1 ,Y2 , ...,Y5 , can be
assigned using a substitution function, Y j = S(X j ). An avalanche vector, V j , can be computed
by XORing output vector Y and Y j , i.e., V j = Y ⊕ Y j . A 5x5 dependency matrix, A, can
be calculated by adding ith bit of V j to ai, j , where ai, j is the ith element of the matrix A.
Now, depending on the vector X, repeat the above steps multiple times and then divide each
element of matrix A by 2n (n is the number of input/output bits) to compute SAC matrix.
The average avalanche of change effect of the proposed algorithm is 0.51 (51.00%)
(Table 4.10). If the average of each element and matrix is close the ideal value, 0.5 (50%),
then the S-box is considered to satisfy SAC. Thus, the proposed S-box fulfils the SAC
property. Figure 4.11 compares the avalanche of change effect (SAC) of the proposed S-box
76 Result Analysis
and other existing 5-bit S-boxes. It can be observed that the average SAC value of 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 avalanche effect, it can
be proven below. Let’s consider a multi-output function S : F2n → F2m which generates m-bit
output in responds to n-bit input. Let X be an input where X = (x1 , x2 , ...xn ), x p ∈ {0, 1} and
X i be another input with change in ith bit(s) where i = 1, 2, ...n. Let F(X) and F(X i ) be the
corresponding outputs, F ∈ T where T ⊂ S25 .
Definition 1: For multi-output function, S : F2n → F2m , each output bit relies on every
input bit, called Completeness, as follows:
1
C = 1− #{(i, j)|bi j = 0} (4.6)
nm
where bi j = #{X ∈ T |( f (X)) j ̸= ( f (X i )) j }, is the total of resulting output bits when
two inputs with ith bit difference is passed, also i = 1, 2, ...n and j = 1, 2, ...m. The value of
completeness, C, closer to 1 offers strong non-linearity. Our S-box satisfies this property
(C = 1) as it generates unique pairs of input-output using 5-bits.
Definition 2: For any function, F, if a change in an input reflects the change in half of the
output, then it presents a strict avalanche property (SAC) as follows:
n m
2 1
Avl_e f t(strict) = 1 − ∑ ∑ |bi j − #T (4.7)
#T ∗ nm i=1 j=1 2
4.3 Security Analysis 77
Here, #T is the number of inputs. Similar to completeness, the Avl_e f t(strict) value close
to 1 shows high avalanche effect. Our S-box shows strict avalanche criterion (SAC) value
0.51 and thus Avl_e f t(strict) ≈ 1.
To better the resistance property, an S-box must show the BIC-SAC value close to 0.5.
The BIC-SAC value for the proposed S-box is 0.53, and thus it satisfies the BIC-SAC property.
Figure 4.12 illustrates a comparison of BIC-SAC values of the proposed S-box and other
5-bit S-boxes competitors where the average BIC-SAC value of the proposed S-box is closest
to the ideal value (0.5), and thus it wins the race.
78 Result Analysis
Linear
S-box Nonlinearity
Probability DAP SAC BIC-SAC
(5-bit) (Hd )
(LP)
Table 4.10 exhibits that the proposed algorithm shows high resistance to linearity by
achieving a value close to zero, the highest value for nonlinearity (higher the better), close to
value 0.5 for strict avalanche criterion and BIC-SAC count. Thus, the proposed algorithm
ensures the best security resistance against various cryptanalysis. Figure 4.13 visualize this
comparison and proves the security strength of the proposed model. The compared version
of PRIMATE is PRIMATE-80B.
Transpose Key: 7 12 9 14 3 5 11 8 2 13 4 10 15 0 1 6
Original Key: 6 1 13 5 3 2 12 15
The following Figure 4.15 shows how sixteen distinct subkeys are generated from the
user-provided original key.
The following Table 4.11 shows twenty 32-bit input plaintext (random) and their’ corre-
sponding 32-bit ciphers while full execution (16 rounds) of AUM. Here, one bit is changed in
the input plaintext to examine the avalanche of change (strict avalanche effect (SAC)) in the
output ciphers. The obtained results show that the minimum bits changes in the cipher are 12,
whereas the maximum bit changes in the cipher are 20 while making a 1-bit change in the
plaintext input. The average number of bit changes in the output (cipher) is 15.53 (around
49%), which is closed to the desired value (50%). Thus, AUM shows a strict avalanche effect
and proves high immunity.
The achieved experimental results are available in form of soft reports (hardware im-
plementation) or software programs developed to evaluate them (mainly, cryptanalysis) for
validation purpose. Some the examples included are Figure 4.3 Behavioural simulation of
AUM (32 clock cycle), page 61 and Figure 4.15 AUM subkey generation from the original
key, page 80.
4.4 Execution results of the full algorithm, AUM 81
Table 4.11 Plaintext and their’ corresponding cipher of AUM (Avalanche effect)
Plaintext input with 1 bit change (32-bit) Cipher (32-bit) Bit Difference
10100110000111001110111100100000 10010100111100011101101010010011 -
10100110000111001110111100100001 10100010010100100010011000000100 19
10100110000111001110111100100010 11000011110011100001100110101001 19
10100110000111001110111100100100 10111010001001100110110111111111 20
10100110000111001110111100101000 00010000001100100011001000011010 13
10100110000111001110111100110000 10101101100100110100110100010001 14
10100110000111001110111100000000 10000100100000100000101010111111 12
10100110000111001110111101100000 01110000000100111001100100101100 18
10100110000111001110111110100000 01000010001001001101110010000001 14
10100110000111001110111000100000 10000111010001111111111111000000 15
10100110000111001110110100100000 01100100011101111111111101111001 15
10100110000111001110011100100000 01111110011010111101101100110000 14
10100110000111001111111100100000 11010101011001000110001010110111 12
10100110000111001100111100100000 01010111011100110000001011110101 14
10100110000111001010111100100000 10111001101010000001000101011000 18
10100110000111000110111100100000 11011100001101011111001110100101 12
10100110000111011110111100100000 00010100000110001100000100110010 13
10100110000111101110111100100000 10001101011010100001001001000101 16
10100110000110001110111100100000 00001010110111110110111000000110 17
10100110000101001110111100100000 01111100001111010110011100001100 20
Average 15.53 (49%)
Chapter 5
Research Contribution
The research was started with an aim to develop a novel lightweight cryptography algorithm
for resource-constrained IoT devices to trade-off amongst cost, performance and security. It
targets IoT devices such as RFID cards, smart cards, sensors, actuators where the message
size are tiny (< 2Kb). With an objective to design a lighter but secure permutation, simple
but fast and robust S-box and more lightweight key scheduling, all the research challenges
(section 2.6) are addressed by the proposed algorithm, AUM, as follows:
• Small block size (32-bit) and small key size (32-bit) compared to existing algorithms
(section 3.1)
• Small memory, low processing, low energy and small physical area (GE) requirements
(section 4.2)
Conclusion
Due to the exponential growth in the number of IoT devices in various domains, IoT security
is one of the main concerns. For resource-constrained IoT devices, lightweight cryptography
is an effective way to secure communication by transforming the data. The well-defined
LWC characteristics (cost, performance and security) by NIST are studied and compared for
various lightweight cryptography algorithms, and further research gaps and open research
challenges are highlighted in this research. The literature review reveals that none of the
existing LWC algorithms fulfils all the hardware and software cost and performance criteria
but performs at their best in the specified environment. Also, most of these algorithms
are victims of various cyber attacks (cryptanalysis). Consequently, there is a need for a
lightweight algorithm(s) with trade-offs amongst cost, performance and security.
This research proposes a lightweight cryptography algorithm, AUM. It targets IoT devices
such as RFID tags, smart cards, sensors, and actuators where message sizes are usually small
(message size < 2Kb). AUM performs 16 rounds using a small key (32-bit) over the same
bit size block. Each round consists of three main functions: permutation through transpose,
addRoundKey (apply one of the 16 subkeys), and substitution using a 5-bit S-box. First,
the research proposes a lightweight permutation using a 2-D array to disperse the 32-bit
plaintext through a random transpose key. Then, one of the 16 subkeys is applied to offer
nonlinearity to the algorithm. Finally, a robust cipher is achieved by passing 32-bit data
through a novel and a compact 5-bit S-box. Here, transpose offers diffusion property,
whereas addRoundKey and S-box offer confusion property to straighten the algorithm. A
unique lightweight technique to extract sixteen distinct subkeys from an original key is also
introduced to straighten the algorithm. Since S-box is a fundamental and the only component
that embeds a nonlinear functionality in any SPN based cryptography algorithm, the primary
focus of the proposed lightweight cryptography algorithm, AUM, is on S-box design.
86 Conclusion
Many S-boxes with various bit lengths (e.g., 4-bit, 5-bit, 6-bit, and 8-bit) are proposed by
various researchers. Out of these proposed S-boxes, 4-bit S-box from PRESENT is widely
used due to its low resource requirements in constrained environments. Also, the 8-bit S-box
attracts designers due to its promising security structure but witnesses high implementation
costs. Due to its odd size (not the multiple of two, i.e., size ̸= 2n ), 5-bit S-box is not a popular
choice. Since the input block size is usually even (usually, a multiple of 4), an odd-size S-box
is avoided to provide the flexibility to split the input block over the S-box size (generally, 4,
6 or 8 bits). However, our proposed 5-bit S-box resolves this issue by introducing various
schemes to fit different popular input block sizes. The other S-boxes, 3-bit and 6-bit, are far
from the competition because of either low-security support or expensive implementation
reasons.
This research proposes a new 5-bit S-box design based on the latest chaotic mapping
theory for lightweight cryptography algorithms, particularly for small/tiny messages in IoT
devices like RFID tags, sensors, and smart cards. The proposed design (including chaotic
mapping) is flexible to fit various block sizes, ranging from 32-bit to 256-bit blocks, without
any challenge. Also, the experiment results on popular ASIC platforms and its comparison
with other n-bit S-boxes competitors clearly demonstrate the significance of the 5-bit S-box
in terms of performance and execution cost. Furthermore, it proves that a small number of
resources inclusion (approximately 150GE and even less than 0.1µW of Power) can increase
a significant level of security (more than double) and encourage to use of 5-bit S-box over
4-bit S-box. Further, the cryptanalysis of the proposed 5-bit S-box and its comparison with
the same bit-size S-boxes over the essential security measures such as bijective property,
nonlinearity, linearity (LP), differential probability (cryptanalysis), degree of avalanche effect,
bit Independence criteria (BIC) and algebraic attacks, exhibits the superiority of the proposed
S-box.
In summary, the implementation of the proposed algorithm, AUM, on popular ASIC
platforms and a comparison with its competitors over different cost and performance metrics
demonstrate its compactness and efficiency. However, this could extend by implementing
proposed algorithms on popular FPGA platforms and comparing results over more metrics in
future. Also, the proposed algorithm shows strong resistance against various cryptanalysis
and stands ahead of all its competitors. Thus, the proposed algorithm, AUM, and its core
component, 5-bit S-box, prove the trade-off between cost, performance and security.
References
[1] C. Buck and C. Winkler, “The iot story,” Jan 2020. [Online]. Avail-
able: https://new.siemens.com/global/en/company/stories/research-technologies/
digitaltwin/iot-story.html
[2] GartnerInc, “Forecast: It services for iot, worldwide, 2019-2025,” Aug
2021. [Online]. Available: https://www.gartner.com/en/documents/4004741/
forecast-it-services-for-iot-worldwide-2019-2025
[3] J. Clark, “What is the internet of things, and how does it work?” Aug 2020. [Online].
Available: https://www.ibm.com/blogs/internet-of-things/what-is-the-iot/
[4] “What is ...” [Online]. Available: https://aws.amazon.com/what-is/iot/
[5] “What is iot (internet of things)?: Microsoft azure.” [On-
line]. Available: https://azure.microsoft.com/en-us/overview/internet-of-things-iot/
what-is-the-internet-of-things/#overview
[6] G. Kortuem, F. Kawsar, V. Sundramoorthy, and D. Fitton, “Smart objects as building
blocks for the internet of things,” IEEE Internet Computing, vol. 14, no. 1, pp. 44–51,
2010.
[7] N. Pérez Moldón, “Security in iot ecosystems.”
[8] E. Brown, “21 open source projects for iot,” Linux. com. Retrieved, vol. 23, 2016.
[9] S. Charmonman and P. Mongkhonvanit, “Internet of things in e-business,” in Proceed-
ing of the 10th International Conference on e-Business King Mongkut’s University of
Technology Thonburi, 2015, pp. 1–9.
[10] “The trouble with the internet of things,” Aug 2015. [Online]. Available:
https://data.london.gov.uk/blog/the-trouble-with-the-internet-of-things/
[11] K. McKay, L. Bassham, M. S. Turan, and N. Mouha, “Report on lightweight cryptog-
raphy (nistir8114),” National Institute of Standards and Technology (NIST), 2017.
[12] B. J. Mohd and T. Hayajneh, “Lightweight block ciphers for iot: Energy optimization
and survivability techniques,” IEEE Access, vol. 6, pp. 35 966–35 978, 2018.
[13] A. Banafa, “Three major challenges facing iot,” IEEE IoT Newsletter, 2017.
88 References
[44] K. Jeong, C. Lee, and J. I. Lim, “Improved differential fault analysis on lightweight
block cipher lblock for wireless sensor networks,” EURASIP Journal on Wireless
Communications and Networking, vol. 2013, no. 1, p. 151, 2013.
[45] H. Yoshikawa, M. Kaminaga, A. Shikoda, and T. Suzuki, “Secret key reconstruction
method using round addition dfa on lightweight block cipher lblock,” in 2014 Inter-
national Symposium on Information Theory and its Applications. IEEE, 2014, pp.
493–496.
[46] Y. Kim and H. Yoon, “First experimental result of power analysis attacks on a fpga
implementation of lea.” IACR Cryptology ePrint Archive, vol. 2014, p. 999, 2014.
[47] K. Jeong, H. Kang, C. Lee, J. Sung, and S. Hong, “Biclique cryptanalysis of
lightweight block ciphers present, piccolo and led.” IACR Cryptology ePrint Archive,
vol. 2012, p. 621, 2012.
[48] H. AlKhzaimi and M. M. Lauridsen, “Cryptanalysis of the simon family of block
ciphers.” IACR Cryptology ePrint Archive, vol. 2013, p. 543, 2013.
[49] R. Rabbaninejad, Z. Ahmadian, M. Salmasizadeh, and M. R. Aref, “Cube and dy-
namic cube attacks on simon32/64,” in 2014 11th International ISC Conference on
Information Security and Cryptology. IEEE, 2014, pp. 98–103.
[50] F. Abed, E. List, S. Lucks, and J. Wenzel, “Differential and linear cryptanalysis of
reduced-round simon,” Cryptology ePrint Archive, Report 2013/526, 2013.
[51] CSRC, “Lightweight cryptography | csrc,” https://csrc.nist.gov/projects/
lightweight-cryptography, Jan 2017, (Accessed on 10/30/2020).
[52] B. J. Mohd, T. Hayajneh, and A. V. Vasilakos, “A survey on lightweight block ciphers
for low-resource devices: Comparative study and open issues,” Journal of Network
and Computer Applications, vol. 58, pp. 73–93, 2015.
[53] O. Toshihiko, “Lightweight cryptography applicable to various iot devices,” NEC
Technical Journal, vol. 12, no. 1, pp. 67–71, 2017.
[54] A. Biryukov and L. P. Perrin, “State of the art in lightweight symmetric cryptography,”
2017.
[55] Z. Sheng, S. Yang, Y. Yu, A. V. Vasilakos, J. A. McCann, and K. K. Leung, “A
survey on the ietf protocol suite for the internet of things: Standards, challenges, and
opportunities,” IEEE Wireless Communications, vol. 20, no. 6, pp. 91–98, 2013.
[56] A. Juels and S. A. Weis, “Authenticating pervasive devices with human protocols,” in
Annual international cryptology conference. Springer, 2005, pp. 293–308.
[57] W. J. Okello, Q. Liu, F. A. Siddiqui, and C. Zhang, “A survey of the current state of
lightweight cryptography for the internet of things,” in 2017 International Conference
on Computer, Information and Telecommunication Systems (CITS). IEEE, 2017, pp.
292–296.
[58] “Cybersecurity | nist,” https://www.nist.gov/cybersecurity, (Accessed on 02/07/2022).
References 91
[130] T. Akishita and H. Hiwatari, “Very compact hardware implementations of the blockci-
pher clefia,” in International Workshop on Selected Areas in Cryptography. Springer,
2011, pp. 278–292.
[131] C. Tezcan, “The improbable differential attack: Cryptanalysis of reduced round clefia,”
in International Conference on Cryptology in India. Springer, 2010, pp. 197–209.
[132] J. Hosseinzadeh and M. Hosseinzadeh, “A comprehensive survey on evaluation of
lightweight symmetric ciphers: hardware and software implementation,” Advances in
Computer Science: an International Journal, vol. 5, no. 4, pp. 31–41, 2016.
[133] K. Shibutani, T. Isobe, H. Hiwatari, A. Mitsuda, T. Akishita, and T. Shirai, “Piccolo: an
ultra-lightweight blockcipher,” in International Workshop on Cryptographic Hardware
and Embedded Systems. Springer, 2011, pp. 342–357.
[134] S. K. Ojha, N. Kumar, K. Jain et al., “Twis–a lightweight block cipher,” in International
Conference on Information Systems Security. Springer, 2009, pp. 280–291.
[135] B. Su, W. Wu, L. Zhang, and Y. Li, “Full-round differential attack on twis block
cipher,” in International Workshop on Information Security Applications. Springer,
2010, pp. 234–242.
[136] S. S. M. AlDabbagh, I. F. T. Al Shaikhli, and M. A. Alahmad, “Hisec: A new
lightweight block cipher algorithm,” in Proceedings of the 7th International Confer-
ence on Security of Information and Networks, 2014, pp. 151–156.
[137] X. Lai and J. Massey, “A proposal for a new block encryption standard. advantages in
cryptology-eurocrypt90 proceedings,” 1991.
[138] O. Tigli, “Area efficient asic implementation of idea (international data encryption
standard),” Best design for ASIC implementation of IDEA, GMU, 2003.
[139] S. Mukherjee and B. Sahoo, “A survey on hardware implementation of idea cryp-
tosystem,” Information Security Journal: A Global Perspective, vol. 20, no. 4-5, pp.
210–218, 2011.
[140] D. Hong, J. Sung, S. Hong, J. Lim, S. Lee, B.-S. Koo, C. Lee, D. Chang, J. Lee,
K. Jeong et al., “Hight: A new block cipher suitable for low-resource device,” in Inter-
national Workshop on Cryptographic Hardware and Embedded Systems. Springer,
2006, pp. 46–59.
[141] Y.-I. Lim, J.-H. Lee, Y. You, and K.-R. Cho, “Implementation of hight cryptic circuit
for rfid tag,” IEICE Electronics Express, vol. 6, no. 4, pp. 180–186, 2009.
[142] J. John, “Best-1: a light weight block cipher,” IOSR Journal of Computer Engineering
(IOSRJCE), vol. 16, no. 2, pp. 91–95, 2014.
[143] D. Hong, J.-K. Lee, D.-C. Kim, D. Kwon, K. H. Ryu, and D.-G. Lee, “Lea: A 128-bit
block cipher for fast encryption on common processors,” in International Workshop
on Information Security Applications. Springer, 2013, pp. 3–27.
References 97
[144] D. Lee, D.-C. Kim, D. Kwon, and H. Kim, “Efficient hardware implementation of
the lightweight block encryption algorithm lea,” Sensors, vol. 14, no. 1, pp. 975–994,
2014.
[145] N. Courtois, G. V. Bard, and D. A. Wagner, “Algebraic and slide attacks on keeloq.”
IACR Cryptology ePrint Archive, vol. 2007, pp. 62–62, 2007.
[146] A. Bogdanov, “Linear slide attacks on the keeloq block cipher,” in International
Conference on Information Security and Cryptology. Springer, 2007, pp. 66–80.
[147] C. De Canniere, O. Dunkelman, and M. Knežević, “Katan and ktantan—a family of
small and efficient hardware-oriented block ciphers,” in International Workshop on
Cryptographic Hardware and Embedded Systems. Springer, 2009, pp. 272–288.
[148] S. Das, “Halka: A lightweight, software friendly block cipher using ultra-lightweight
8-bit s-box.” IACR Cryptology ePrint Archive, vol. 2014, p. 110, 2014.
[149] D. Engels, X. Fan, G. Gong, H. Hu, and E. M. Smith, “Hummingbird: ultra-lightweight
cryptography for resource-constrained devices,” in International Conference on Fi-
nancial Cryptography and Data Security. Springer, 2010, pp. 3–18.
[150] M.-J. O. Saarinen, “Cryptanalysis of hummingbird-1,” in International Workshop on
Fast Software Encryption. Springer, 2011, pp. 328–341.
[151] D. Engels, M.-J. O. Saarinen, P. Schweitzer, and E. M. Smith, “The hummingbird-2
lightweight authenticated encryption algorithm,” in International Workshop on Radio
Frequency Identification: Security and Privacy Issues. Springer, 2011, pp. 19–31.
[152] D. Dinu, A. Biryukov, J. Großschädl, D. Khovratovich, Y. Le Corre, and L. Perrin,
“Felics–fair evaluation of lightweight cryptographic systems,” in NIST Workshop on
Lightweight Cryptography, vol. 128, 2015.
[153] D. Dinu, Y. Le Corre, D. Khovratovich, L. Perrin, J. Großschädl, and A. Biryukov,
“Triathlon of lightweight block ciphers for the internet of things,” Journal of Crypto-
graphic Engineering, vol. 9, no. 3, pp. 283–302, 2019.
[154] E. Biham and A. Shamir, “Differential cryptanalysis of des-like cryptosystems,” Jour-
nal of CRYPTOLOGY, vol. 4, no. 1, pp. 3–72, 1991.
[155] M. Matsui, “Linear cryptanalysis method for des cipher,” in Workshop on the Theory
and Application of of Cryptographic Techniques. Springer, 1993, pp. 386–397.
[156] “Differential fault analysis - wikipedia,” https://en.wikipedia.org/wiki/Differential_
fault_analysis, (Accessed on 10/31/2020).
[157] J. Breier, X. Hou, and Y. Liu, “Fault attacks made easy: differential fault analysis
automation on assembly code,” IACR Transactions on Cryptographic Hardware and
Embedded Systems, pp. 96–122, 2018.
[158] A. Bogdanov, D. Khovratovich, and C. Rechberger, “Biclique cryptanalysis of the full
aes,” in International Conference on the Theory and Application of Cryptology and
Information Security. Springer, 2011, pp. 344–371.
98 References
[159] F. Zhang, Y. Zhang, H. Jiang, X. Zhu, S. Bhasin, X. Zhao, Z. Liu, D. Gu, and K. Ren,
“Persistent fault attack in practice,” IACR Transactions on Cryptographic Hardware
and Embedded Systems, pp. 172–195, 2020.
[160] K. Keerthi, I. Roy, C. Rebeiro, A. Hazra, and S. Bhunia, “Feds: Comprehensive fault
attack exploitability detection for software implementations of block ciphers,” IACR
Transactions on Cryptographic Hardware and Embedded Systems, pp. 272–299, 2020.
[161] S. Bhasin, J. Breier, X. Hou, D. Jap, R. Poussier, and S. M. Sim, “Sitm: See-in-the-
middle side-channel assisted middle round differential cryptanalysis on spn block
ciphers,” IACR Transactions on Cryptographic Hardware and Embedded Systems, pp.
95–122, 2020.
[162] K. Jeong, Y. Lee, J. Sung, and S. Hong, “Improved differential fault analysis on
present-80/128,” International Journal of Computer Mathematics, vol. 90, no. 12, pp.
2553–2563, 2013.
[163] C. Blondeau and K. Nyberg, “Links between truncated differential and multidimen-
sional linear properties of block ciphers and underlying attack complexities,” in Annual
International Conference on the Theory and Applications of Cryptographic Techniques.
Springer, 2014, pp. 165–182.
[164] O. Özen, K. Varıcı, C. Tezcan, and Ç. Kocair, “Lightweight block ciphers revisited:
Cryptanalysis of reduced round present and hight,” in Australasian Conference on
Information Security and Privacy. Springer, 2009, pp. 90–107.
[165] M. Renauld and F.-X. Standaert, “Algebraic side-channel attacks,” in International
Conference on Information Security and Cryptology. Springer, 2009, pp. 393–410.
[166] L. Yang, M. Wang, and S. Qiao, “Side channel cube attack on present,” in International
Conference on Cryptology and Network Security. Springer, 2009, pp. 379–391.
[167] B. Zhu, X. Dong, and H. Yu, “Milp-based differential attack on round-reduced gift,”
in Cryptographers’ Track at the RSA Conference. Springer, 2019, pp. 372–390.
[168] Y. Sasaki, “Integer linear programming for three-subset meet-in-the-middle attacks:
Application to gift,” in International Workshop on Security. Springer, 2018, pp.
227–243.
[169] M. Cao and W. Zhang, “Related-key differential cryptanalysis of the reduced-round
block cipher gift,” IEEE Access, vol. 7, pp. 175 769–175 778, 2019.
[170] B. Zhao, X. Dong, W. Meier, K. Jia, and G. Wang, “Generalized related-key rectangle
attacks on block ciphers with linear key schedule: applications to skinny and gift,”
Designs, Codes and Cryptography, pp. 1–24, 2020.
[171] L. Dalmasso, F. Bruguier, P. Benoit, and L. Torres, “Evaluation of spn-based
lightweight crypto-ciphers,” IEEE Access, vol. 7, pp. 10 559–10 567, 2019.
[172] P. Zhang and W. Zhang, “Differential cryptanalysis on block cipher skinny with milp
program,” Security and Communication Networks, vol. 2018, 2018.
References 99
[173] J. Ge, Y. Xu, R. Liu, E. Si, N. Shang, and A. Wang, “Power attack and protected im-
plementation on lightweight block cipher skinny,” in 2018 13th Asia Joint Conference
on Information Security (AsiaJCIS). IEEE, 2018, pp. 69–74.
[174] B. Nallathambi and K. Palanivel, “Fault diagnosis architecture for skinny family of
block ciphers,” Microprocessors and Microsystems, vol. 77, p. 103202, 2020.
[175] J. H. Park, “Security analysis of mcrypton proper to low-cost ubiquitous computing
devices and applications,” International Journal of Communication Systems, vol. 22,
no. 8, pp. 959–969, 2009.
[176] Y. Sun, M. Wang, S. Jiang, and Q. Sun, “Differential cryptanalysis of reduced-round
iceberg,” in International Conference on Cryptology in Africa. Springer, 2012, pp.
155–171.
[177] C. Blondeau and B. Gérard, “Differential cryptanalysis of puffin and puffin2,” in
ECRYPT Workshop on Lightweight Cryptography. Citeseer, 2011, p. 1.
[178] G. Zhao, B. Sun, C. Li, and J. Su, “Truncated differential cryptanalysis of prince,”
Security and Communication Networks, vol. 8, no. 16, pp. 2875–2887, 2015.
[179] Y. Lee, K. Jeong, C. Lee, J. Sung, and S. Hong, “Related-key cryptanalysis on the
full printcipher suitable for ic-printing,” International Journal of Distributed Sensor
Networks, vol. 10, no. 1, p. 389476, 2014.
[180] Z. Ahmadian, M. Salmasizadeh, and M. R. Aref, “Biclique cryptanalysis of the
full-round klein block cipher,” IET Information Security, vol. 9, no. 5, pp. 294–301,
2015.
[181] J.-P. Aumasson, M. Naya-Plasencia, and M.-J. O. Saarinen, “Practical attack on
8 rounds of the lightweight block cipher klein,” in International Conference on
Cryptology in India. Springer, 2011, pp. 134–145.
[182] M. Gruber and B. Selmke, “Differential fault attacks on klein,” in International
Workshop on Constructive Side-Channel Analysis and Secure Design. Springer, 2019,
pp. 80–95.
[183] G. Zhao, R. Li, L. Cheng, C. Li, and B. Sun, “Differential fault analysis on led using
super-sbox,” IET Information Security, vol. 9, no. 4, pp. 209–218, 2014.
[184] E. Yarrkov, “Cryptanalysis of xxtea.” IACR Cryptology ePrint Archive, vol. 2010, p.
254, 2010.
[185] H. Tupsamudre, S. Bisht, and D. Mukhopadhyay, “Differential fault analysis on the
families of simon and speck ciphers,” in 2014 Workshop on Fault Diagnosis and
Tolerance in Cryptography. IEEE, 2014, pp. 40–48.
[186] A. Bay, J. Nakahara, and S. Vaudenay, “Cryptanalysis of reduced-round mibs block
cipher,” in International Conference on Cryptology and Network Security. Springer,
2010, pp. 1–19.
100 References
[187] Y. Wang, W. Wu, X. Yu, and L. Zhang, “Security on lblock against biclique cryptanal-
ysis,” in International Workshop on Information Security Applications. Springer,
2012, pp. 1–14.
[188] H. Soleimany, “Self-similarity cryptanalysis of the block cipher itubee,” IET Informa-
tion Security, vol. 9, no. 3, pp. 179–184, 2014.
[189] T. Isobe, “A single-key attack on the full gost block cipher,” in International Workshop
on Fast Software Encryption. Springer, 2011, pp. 290–305.
[190] N. T. Courtois, “An improved differential attack on full gost,” in The new codebreakers.
Springer, 2016, pp. 282–303.
[191] S. A. Azimi, Z. Ahmadian, J. Mohajeri, and M. R. Aref, “Impossible differential
cryptanalysis of piccolo lightweight block cipher,” in 2014 11th International ISC
Conference on Information Security and Cryptology. IEEE, 2014, pp. 89–94.
[192] J. Song, K. Lee, and H. Lee, “Biclique cryptanalysis on lightweight block cipher:
Hight and piccolo,” International Journal of Computer Mathematics, vol. 90, no. 12,
pp. 2564–2580, 2013.
[193] J. Huang, S. Vaudenay, and X. Lai, “On the key schedule of lightweight block ciphers,”
in International Conference on Cryptology in India. Springer, 2014, pp. 124–142.
[194] R. Beaulieu, S. Treatman-Clark, D. Shors, B. Weeks, J. Smith, and L. Wingers, “The
simon and speck lightweight block ciphers,” in 2015 52nd ACM/EDAC/IEEE Design
Automation Conference (DAC). IEEE, 2015, pp. 1–6.
[195] B. Koo, D. Hong, and D. Kwon, “Related-key attack on the full hight,” in International
Conference on Information Security and Cryptology. Springer, 2010, pp. 49–67.
[196] A. Bogdanov, “Attacks on the keeloq block cipher and authentication systems,” in 3rd
Conference on RFID Security, vol. 2007. Citeseer, 2007.
[197] B. Zhu and G. Gong, “Multidimensional meet-in-the-middle attack and its applications
to katan32/48/64,” Cryptography and Communications, vol. 6, no. 4, pp. 313–333,
2014.
[198] M.-J. O. Saarinen, “Related-key attacks against full hummingbird-2,” in International
Workshop on Fast Software Encryption. Springer, 2013, pp. 467–482.
[199] Cryptographic Technology Guideline (Lightweight Cryptography), Mar 2017. [Online].
Available: https://www.cryptrec.go.jp/report/cryptrec-gl-2003-2016en.pdf
[200] Z. Hua, J. Li, Y. Chen, and S. Yi, “Design and application of an s-box using complete
latin square,” Nonlinear Dynamics, vol. 104, no. 1, pp. 807–825, 2021.
[201] L. Yi, X. Tong, Z. Wang, M. Zhang, H. Zhu, and J. Liu, “A novel block encryption
algorithm based on chaotic s-box for wireless sensor network,” IEEE Access, vol. 7,
pp. 53 079–53 090, 2019.
References 101
[202] Z. Hua, Z. Zhu, Y. Chen, and Y. Li, “Color image encryption using orthogonal latin
squares and a new 2d chaotic system,” Nonlinear Dynamics, vol. 104, no. 4, pp.
4505–4522, 2021.
[203]
[204] L. De Meyer and S. Vaudenay, “Des s-box generator,” Cryptologia, vol. 41, no. 2, pp.
153–171, 2017.
[205] W. Zhang, Z. Bao, V. Rijmen, and M. Liu, “A new classification of 4-bit optimal
s-boxes and its application to present, rectangle and spongent,” in International
Workshop on Fast Software Encryption. Springer, 2015, pp. 494–515.
[206] M.-J. O. Saarinen, “Cryptographic analysis of all 4× 4-bit s-boxes,” in International
Workshop on Selected Areas in Cryptography. Springer, 2011, pp. 118–133.
[207] S. Dey and R. Ghosh, “4, 8, 32, 64 bit substitution box generation using irreducible or
reducible polynomials over galois field gf (p q) for smart applications,” in Security in
Smart Cities: Models, Applications, and Challenges. Springer, 2019, pp. 279–295.
[208] A. Bogdanov, M. Knežević, G. Leander, D. Toz, K. Varıcı, and I. Verbauwhede,
“Spongent: A lightweight hash function,” in International workshop on cryptographic
hardware and embedded systems. Springer, 2011, pp. 312–325.
[209] J. Daemen and V. Rijmen, “Aes proposal: Rijndael,” 1999.
[210] Z. Hua, B. Zhou, and Y. Zhou, “Sine chaotification model for enhancing chaos and
its hardware implementation,” IEEE Transactions on Industrial Electronics, vol. 66,
no. 2, pp. 1273–1284, 2018.
[211] B. M. Alshammari, R. Guesmi, T. Guesmi, H. Alsaif, and A. Alzamil, “Implementing
a symmetric lightweight cryptosystem in highly constrained iot devices by using a
chaotic s-box,” Symmetry, vol. 13, no. 1, p. 129, 2021.
[212] A. Prathiba and V. Bhaaskaran, “Lightweight s-box architecture for secure internet of
things,” Information, vol. 9, no. 1, p. 13, 2018.
[213] “Verilog,” Dec 2021. [Online]. Available: https://en.wikipedia.org/wiki/Verilog
[214] H. Gross, E. Wenger, C. Dobraunig, and C. Ehrenhöfer, “Suit up!–made-to-measure
hardware implementations of ascon,” in 2015 Euromicro Conference on Digital System
Design. IEEE, 2015, pp. 645–652.
[215] C. Dobraunig, M. Eichlseder, F. Mendel, and M. Schläffer, “Ascon v1. 2 submission
to nist,” NIST Round, vol. 2, 2019.
[216] D. Šijačić, A. B. Kidmose, B. Yang, S. Banik, B. Bilgin, A. Bogdanov, and I. Ver-
bauwhede, “Hold your breath, primates are lightweight,” in International Conference
on Selected Areas in Cryptography. Springer, 2016, pp. 197–216.
[217] S. Picek, L. Mariot, B. Yang, D. Jakobovic, and N. Mentens, “Design of s-boxes
defined with cellular automata rules,” in Proceedings of the Computing Frontiers
Conference, 2017, pp. 409–414.
102 References
[218] V. K. Wei and K. Yang, “On the generalized hamming weights of product codes,”
IEEE transactions on information theory, vol. 39, no. 5, pp. 1709–1713, 1993.
[219] D. Wagner, “The boomerang attack,” in International Workshop on Fast Software
Encryption. Springer, 1999, pp. 156–170.
[220] C. Cid, T. Huang, T. Peyrin, Y. Sasaki, and L. Song, “Boomerang connectivity table:
a new cryptanalysis tool,” in Annual International Conference on the Theory and
Applications of Cryptographic Techniques. Springer, 2018, pp. 683–714.
[221] L. Song, X. Qin, and L. Hu, “Boomerang connectivity table revisited. application to
skinny and aes,” IACR Transactions on Symmetric Cryptology, pp. 118–141, 2019.
[222] H. Boukerrou, P. Huynh, V. Lallemand, B. Mandal, and M. Minier, “On the feistel
counterpart of the boomerang connectivity table,” IACR Transactions on Symmetric
Cryptology, vol. 2020, no. 1, pp. 331–362, 2020.
[223] H. Feistel, “Cryptography and computer privacy,” Scientific american, vol. 228, no. 5,
pp. 15–23, 1973.
[224] H. Williams, A. Webster, and S. Tavares, “On the design of s-boxes,” in Advances in
Cryptology—CRYPTO’85 Proceedings, vol. 218, 1986, pp. 523–534.
[225] S. Picek, L. Batina, D. Jakobović, B. Ege, and M. Golub, “S-box, SET, Match: A
Toolbox for S-box Analysis,” in 8th IFIP International Workshop on Information
Security Theory and Practice (WISTP), ser. Information Security Theory and Practice.
Securing the Internet of Things, D. Naccache and D. Sauveron, Eds., vol. LNCS-8501.
Heraklion, Crete, Greece: Springer, Jun. 2014, pp. 140–149, part 5: Short Papers.
[Online]. Available: https://hal.inria.fr/hal-01400936
Appendix A
AUM: C Code
aum.c
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include "Key_Gen.c"
#include "transpose.c"
#include "addRoundKey.c"
#include "s_Box.c"
#include "feed_input.c"
void Key_Gen();
104 AUM: C Code
void transpose();
void addRoundKey(int);
void s_Box();
void feed_input();
int main()
{
unsigned int i, round = 1;
printf("\n*********************************");
printf("\n Key Generation ");
printf("\n*********************************");
Key_Gen();
while(round<=16)
{
printf("\n\nRound: %d", round);
printf("\n*********************************");
printf("\n Permutation ");
printf("\n*********************************");
transpose();
printf("\n*********************************");
printf("\n addRoundKey ");
printf("\n*********************************");
addRoundKey(round-1);
printf("\n*********************************");
printf("\n Substitution ");
printf("\n*********************************");
s_Box();
105
feed_input();
round++;
}
getch();
return 0;
}
Dec_to_Binary.c
while (n > 0)
{
106 AUM: C Code
binaryNum[i] = n % 2;
n = n / 2;
i++;
}
if (k == 1)
five_bit[q] = 1;
else
five_bit[q] = 0;
}
Key_Dec_to_Binary.c
while (n > 0)
{
binaryNum[i] = n % 2;
107
n = n / 2;
i++;
}
Key_Gen.c
#include "Key_Dec_to_Binary.c"
void Key_Gen()
{
108 AUM: C Code
k = 0;
transpose.c
unsigned int i, j;
if (j == 16)
j = 0;
}
}//32-bit Permutation/Transpose - End
addRoundKey.c
//AddRoundKey - Start
addKey_out[i] = trans[i]^sub_key[r][i];
}
}
//AddRoundKey - End
s_Box.c
#include "Dec_to_Binary.c"
void s_Box()
{
unsigned int i, j, k, n, r, c[4], dec, s_val;
int l;
s_out[0] = addKey_out[31];
s_out[31] = addKey_out[0];
r = addKey_out[i];
112 AUM: C Code
dec = 0;
for (l = 3; l >= 0; l--)
dec += (int)pow(2, l) * c[3 - l + 1];
s_val = sBox[r][dec];
printf("\n S-Box output: %d ", s_val);
Dec_to_Binary(s_val);
}
bits_size = 1;
}//Substitution (S-Box) - End
feed_input.c
void feed_input()
{
unsigned int i;
module input_all(
input clk,
input rst,
input [31:0] p,
input [79:0] tk,
input [31:0] orgKey,
input readIn,
output [31:0] out
);
wire [5:0] keyNumber;
wire [31:0] subKey;
wire [31:0] subkey;
wire rotationDone ;
wire rotationDone1;
wire rotationDone2;
wire [31:0] trans;
reg [31:0] trans1;
wire [31:0]transExor;
.trans(trans));
sBox sBox_1(.clk(clk),.rst(rst),.rotationDone(rotationDone),
.transExor(transExor),.subkey(subkey));
keygen keygen_1(.clk(clk),.rst(rst),.orgKey(orgKey),.tk(tk),
.readIn(readIn),.keyNumber(keyNumber),.rotationDone(rotationDone),.subKey(subKey));
controlunit cu_1(.clk(clk),.rst(rst),.readIn(readIn),.rotationDone(rotationDone),
.keyNumber(keyNumber),.rotationDone1(rotationDone1),.rotationDone2(rotationDone2));
endmodule
module input_all_2(
input clk,
input rst,
input [31:0] p,
input [79:0] tk,
input [31:0] orgKey,
input readIn,
output [31:0] out
);
tranpose trans_p(.p(p),.subkey(subkey),.rotationDone2(rotationDone2),
.trans(trans));
sBox sBox_1(.clk(clk),.rst(rst),.rotationDone(rotationDone),
.transExor(transExor),.subkey(subkey));
controlunit cu_1(.clk(clk),.rst(rst),.readIn(readIn),
.rotationDone(rotationDone),.rotationDone1(rotationDone1),
.rotationDone2(rotationDone2),.keyNumber(keyNumber));
assign out=rotationDone?subkey:out;
endmodule
116 AUM: Verilog Implementation
module controlunit(clk,rst,readIn,rotationDone,keyNumber,rotationDone1,
rotationDone2);
input clk,rst,readIn;
output reg rotationDone;
output reg rotationDone1;
end
end
always @(posedge rst, posedge clk) begin
if (rst == 1’b1) begin
keyNumber <= 6’d0;
end
else begin
if(readIn == 1’b1 && rotationDone == 1’b0) begin
if (keyNumber <= 15) begin
keyNumber <= keyNumber +1;
end
117
end
end
end
always @(posedge clk)begin
rotationDone1<=rotationDone;
end
endmodule
end
else begin
if ( keyNumber == 16 ) begin
rotationDone <= 1’b1;
end
else if (readIn == 1’b1 )begin
end
end
always @(posedge rst, posedge clk) begin
if (rst == 1’b1) begin
keyNumber <= 6’d0;
end
else begin
if(readIn == 1’b1 && rotationDone == 1’b0) begin
if (keyNumber <= 15) begin
keyNumber <= keyNumber +1;
end
end
end
end
always @(posedge clk)begin
rotationDone1<=rotationDone;
end
end
end
endmodule
keygen.v
‘timescale 1ns / 1ps
module keygen(clk,rst,orgKey,tk,readIn,subKey,keyNumber,rotationDone);
input clk,rst;
input [31:0] orgKey;
input [79:0]tk;
input readIn;
input [5:0] keyNumber;
output reg [31:0] subKey;
input rotationDone;
wire [4:0]tkReg[15:0];
assign tkReg[0]=tk[4:0];
assign tkReg[1]=tk[9:5];
assign tkReg[2]=tk[14:10];
assign tkReg[3]=tk[19:15];
assign tkReg[4]=tk[24:20];
assign tkReg[5]=tk[29:25];
assign tkReg[6]=tk[34:30];
assign tkReg[7]=tk[39:35];
assign tkReg[8]=tk[44:40];
assign tkReg[9]=tk[49:45];
assign tkReg[10]=tk[54:50];
assign tkReg[11]=tk[59:55];
assign tkReg[12]=tk[64:60];
assign tkReg[13]=tk[69:65];
120 AUM: Verilog Implementation
assign tkReg[14]=tk[74:70];
assign tkReg[15]=tk[79:75];
always @(posedge clk, posedge rst) begin
if(rst == 1’b1) begin
// keyNumber <= 5’d0;
// rotationDone <= 1’b0;
subKey <= orgKey;
end
/* else if(rotationDone == 1’b1 && keyNumber <= 15) begin
rotationDone <= 1’b0;
end*/
else begin
if(readIn == 1’b1 && rotationDone == 1’b0) begin
// rotationDone<=1’b1;
case(tkReg[keyNumber])
5’d1:begin subKey<={subKey[30:0], subKey[31]}; end
5’d2:begin subKey<={subKey[29:0], subKey[31:30]}; end
5’d3:begin subKey<={subKey[28:0], subKey[31:29]}; end
5’d4:begin subKey<={subKey[27:0], subKey[31:28]}; end
5’d5:begin subKey<={subKey[26:0], subKey[31:27]}; end
5’d6:begin subKey<={subKey[25:0], subKey[31:26]}; end
5’d7:begin subKey<={subKey[24:0], subKey[31:25]}; end
5’d8:begin subKey<={subKey[23:0], subKey[31:24]}; end
5’d9:begin subKey<={subKey[22:0], subKey[31:23]}; end
5’d10:begin subKey<={subKey[21:0], subKey[31:22]}; end
5’d11:begin subKey<={subKey[20:0], subKey[31:21]}; end
5’d12:begin subKey<={subKey[19:0], subKey[31:20]}; end
5’d13:begin subKey<={subKey[18:0], subKey[31:19]}; end
5’d14:begin subKey<={subKey[17:0], subKey[31:18]}; end
5’d15:begin subKey<={subKey[16:0], subKey[31:17]}; end
//5’d16:begin subKey<={subKey[15:0], subKey[31:16]}; end
default:begin subKey<={subKey[15:0], subKey[31:16]}; end
/* 5’d7:begin subKey<=32’d2714459411; end
5’d12:begin subKey<=32’d3050387996; end
5’d9:begin subKey<=32’d2725525867; end
121
transpose.v
‘timescale 1ns / 1ps
module tranpose(p,subkey,rotationDone2, trans);
input [31:0] subkey, p;
input rotationDone2;
output [31:0] trans;
assign trans=rotationDone2?{subkey[13],subkey[3],subkey[1],subkey[31],
subkey[21],subkey[9],subkey[27],subkey[5],
subkey[17],subkey[23],subkey[11],subkey[7],
subkey[29],subkey[19],subkey[25],subkey[15],
subkey[12],subkey[2],subkey[0],subkey[30],
122 AUM: Verilog Implementation
subkey[20],subkey[8],subkey[26],subkey[4],
subkey[16],subkey[22],subkey[10],subkey[6],
subkey[28],subkey[18],subkey[24],subkey[14]}:
{p[13],p[3],p[1],p[31],
p[21],p[9],p[27],p[5],
p[17],p[23],p[11],p[7],
p[29],p[19],p[25],p[15],
p[12],p[2],p[0],p[30],
p[20],p[8],p[26],p[4],
p[16],p[22],p[10],p[6],
p[28],p[18],p[24],p[14]};
endmodule
keyselect.v
‘timescale 1ns / 1ps
module keySelect(clk,rst,rotationDone,readIn,subKey,tk,keyNumber); //
input clk,rst,readIn;
input [79:0] tk;
input rotationDone;
//output reg rotationDone;
output reg [31:0] subKey;
input [5:0] keyNumber;
wire [4:0]tkReg[15:0];
assign tkReg[0]=tk[4:0];
assign tkReg[1]=tk[9:5];
assign tkReg[2]=tk[14:10];
assign tkReg[3]=tk[19:15];
assign tkReg[4]=tk[24:20];
assign tkReg[5]=tk[29:25];
assign tkReg[6]=tk[34:30];
assign tkReg[7]=tk[39:35];
assign tkReg[8]=tk[44:40];
assign tkReg[9]=tk[49:45];
123
assign tkReg[10]=tk[54:50];
assign tkReg[11]=tk[59:55];
assign tkReg[12]=tk[64:60];
assign tkReg[13]=tk[69:65];
assign tkReg[14]=tk[74:70];
assign tkReg[15]=tk[79:75];
always @(posedge clk, posedge rst) begin
if(rst == 1’b1) begin
// keyNumber <= 5’d0;
// rotationDone <= 1’b0;
subKey <= 32’d0;
end
/* else if(rotationDone == 1’b1 && keyNumber <= 15) begin
rotationDone <= 1’b0;
end*/
else begin
if(readIn == 1’b1 && rotationDone == 1’b0) begin
// rotationDone<=1’b1;
case(tkReg[keyNumber])
5’d7:begin subKey<=32’d2714459411; end
5’d12:begin subKey<=32’d3050387996; end
5’d9:begin subKey<=32’d2725525867; end
5’d14:begin subKey<=32’d240838813; end
5’d3:begin subKey<=32’d1926710504; end
5’d5:begin subKey<=32’d1525193998; end
5’d11:begin subKey<=32’d1156084439; end
5’d8:begin subKey<=32’d3899840324; end
5’d2:begin subKey<=32’d2714459411; end
5’d13:begin subKey<=32’d1805808697; end
5’d4:begin subKey<=32’d3123135382; end
5’d10:begin subKey<=32’d2634963688; end
5’d15:begin subKey<=32’d762596999; end
5’d16:begin subKey<=32’d1317481844; end
5’d1:begin subKey<=32’d2634963688; end
5’d6:begin subKey<=32’d1133951527; end
124 AUM: Verilog Implementation
endcase
/* if (keyNumber <= 15) begin
keyNumber <= keyNumber +1;
// rotationDone <= 1’b1;
end*/
end
end
end
endmodule
addRound.v
‘timescale 1ns / 1ps
module addround(trans1, subKey, transExor);
input [31:0] trans1, subKey;
output [31:0] transExor;
assign transExor = (trans1 ^ subKey) ;
endmodule
sBox.v
‘timescale 1ns / 1ps
module sBox(clk,rst,rotationDone,transExor,subkey );
input clk,rst,rotationDone;
input [31:0] transExor;
output [31:0] subkey;
wire [4:0] a1,a2,a3,a4,a5,a6;
case_st m1(.clk(clk),.rst(rst),.exorDone(rotationDone),
.in(transExor[30:26]),.out(a1));
case_st m2(.clk(clk),.rst(rst),.exorDone(rotationDone),
.in(transExor[25:21]),.out(a2));
125
case_st m3(.clk(clk),.rst(rst),.exorDone(rotationDone),
.in(transExor[20:16]),.out(a3));
case_st m4(.clk(clk),.rst(rst),.exorDone(rotationDone),
.in(transExor[15:11]),.out(a4));
case_st m5(.clk(clk),.rst(rst),.exorDone(rotationDone),
.in(transExor[10:6]),.out(a5));
case_st m6(.clk(clk),.rst(rst),.exorDone(rotationDone),
.in(transExor[5:1]),.out(a6));
assign subkey=
rotationDone?{transExor[0],a1,a2,a3,a4,a5,a6,transExor[31]}:subkey;
endmodule
module case_st(
input clk,rst,exorDone,
input [4:0]in,
output [4:0]out);
wire [4:0] inSet;
reg [4:0] out1;
assign inSet ={in[0],in[1],in[2],in[3],in[4]};
assign out = {out1[0],out1[1],out1[2],out1[3],out1[4]};
always @(rst,in,inSet)begin
if (rst==1’b1)begin
out1 <= 5’d0;
end
else begin
case(inSet)
5’d0:begin out1<=5’d10; end
5’d1:begin out1<=5’d3; end
5’d2:begin out1<=5’d11; end
5’d3:begin out1<=5’d22; end
5’d4:begin out1<=5’d17; end
126 AUM: Verilog Implementation