You are on page 1of 44

LIGHTWEIGHT CRYPTOGRAPHY

ALGORITHMS FOR IoT DEVICES


Minor Project Report

Submitted in Partial Fulfillment of the


Requirements for the Degree of

BACHELOR OF TECHNOLOGY
IN

ELECTRONICS AND COMMUNICATION ENGINEERING

By
Salonee Aggarwal(20bec107)
Pranjal Yadav (20bec095)

Department of Electronics and Communication Engineering,


Institute of Technology,
Nirma University,
Ahmedabad 382 481
CERTIFICATE

This is to certify that the Minor Project Report entitled lightweight cryptography algorithms for
IoT devices submitted by Ms Salonee Aggarwal(20bec095) towards the partial fulfillment of the
requirements for the award of degree in Bachelor of Technology in the field of Electronics &
Communication Engineering of Nirma University is the record of work carried out by her under
our supervision and guidance. The work submitted has in our opinion reached a level required
for being accepted for examination. The results embodied in this minor project work to the best
of our knowledge have not been submitted to any other University or Institution for award of
any degree or diploma.

Manisha Upadhyay Head of Department


(Guide) Department of Electronics &
Department of Electronics & Communication Engineering,
Communication Engineering, Institute of Technology,
Institute of Technology, Nirma University,
Nirma University, Ahmedabad 382 481
Ahmedabad 382 481

Date:2-12-2023
CERTIFICATE
This is to certify that the Minor Project Report entitled Lightweight cryptography algorithms for
IoT devices submitted by Pranjal Yadav (20bec095) towards the partial fulfillment of the
requirements for the award of degree in Bachelor of Technology in the field of Electronics &
Communication Engineering of Nirma University is the record of work carried out by her under
our supervision and guidance. The work submitted has in our opinion reached a level required
for being accepted for examination. The results embodied in this minor project work to the best
of our knowledge have not been submitted to any other University or Institution for award of
any degree or diploma.

Manisha Upadhyay Head of Department


(Guide) Department of Electronics &
Department of Electronics & Communication Engineering,
Communication Engineering, Institute of Technology,
Institute of Technology, Nirma University,
Nirma University, Ahmedabad 382 481
Ahmedabad 382 481

Date:2-12-2023
Undertaking for Originality of the Work

We, Salonee Aggarwal, Pranjal Yadav Roll No/s. 20bec107, 20bec095 give undertaking that the
Minor Project entitled Lightweight cryptography algorithms for IoT submitted by us, towards
the partial fulfillment of the requirements for the degree of Bachelor of Technology in
Electronics and Communication of Nirma University, Ahmedabad 382 481, is the original work
carried out by us and We give assurance that no attempt of plagiarism has been made.We
understand that in the event of any similarity found subsequently with any other published work
or any project report elsewhere; it will result in severe disciplinary action.

Signature of the Student

Date: 2-12-2023

Place:Ahmedabad

Endorsed by: Manisha Upadhyay

(Signature of the Guide)


Acknowledgement
We extend our sincere appreciation to our mentor, Manisha Upadhyay, for her invaluable
guidance, unwavering support, and expert insights that have been instrumental in the successful
completion of our minor project. Her mentorship has been a source of inspiration throughout the
journey, and we are grateful for the knowledge and skills she shared with us.

The synergy of our teamwork significantly contributed to the depth and quality of our research
on lightweight cryptography for IoT devices.

We also acknowledge the Electronics and Communication department for providing the
necessary resources and a conducive environment for the successful execution of our minor
project.

This report reflects the combined efforts, enthusiasm, and commitment of all those involved. We
are thankful for the opportunity to explore and contribute to the field of lightweight cryptography
for IoT devices.

(Salonee Aggarwal ,
Pranjal Yadav)
Abstract
In the rapidly evolving landscape of Internet of Things (IoT), security is paramount to safeguard
sensitive data and ensure the integrity of communication. This minor project report explores
various lightweight cryptography algorithms tailored for IoT devices. The algorithms covered in
this study include RSA, AES, Simon, Speck, Present, HIGHT, Caesar, and Klein.

The research delves into the intricacies of each algorithm, assessing their suitability for
resource-constrained IoT environments. Key aspects such as algorithmic efficiency, power
consumption, and computational complexity are thoroughly examined. The report presents a
comparative analysis of these lightweight cryptography algorithms, shedding light on their
strengths and limitations in the context of IoT applications.

The study also encompasses practical implementations and performance evaluations, providing
insights into the real-world applicability of each algorithm. Furthermore, considerations for
algorithm selection based on specific IoT use cases are discussed, offering practical guidelines
for developers and implementers.

This comprehensive exploration aims to contribute to the understanding of lightweight


cryptography in the IoT domain, providing valuable insights for researchers, developers, and
security practitioners. The findings presented herein seek to inform the ongoing discourse on
securing IoT ecosystems and lay a foundation for future advancements in lightweight
cryptographic solutions.
INDEX
CERTIFICATE 2
CERTIFICATE 3
Undertaking for Originality of the Work 4
Acknowledgement 5
Abstract 6
INDEX 7
Introduction 10
Prologue 10
Motivation 10
Objectives 11
Problem Statement 12
Approach 13
SCOPE 14
ALGORITHMS STUDIED 15
AES(Advanced Encryption Standard) 15
Features of AES (Advanced Encryption Standard) 15
AES Encryption Process: 16
AES Decryption Process: 18
RSA (Rivest–Shamir–Adleman) Algorithm 19
RSA Key Generation: 19
RSA Encryption: 20
RSA Decryption: 20
SIMON 21
Key Features of SIMON Cipher: 21
WORKING 22
Key Generation: 22
Encryption Process: 22
Decryption Process: 23
Round Function: 23
SPECK 24
Key Features of SPECK Cipher: 24
Key Generation: 24
Key Expansion: 25
Encryption Process: 25
Decryption Process: 26
Round Function: 26
PRESENT 27
Key Features of PRESENT Cipher: 28
ALGORITHM 28
Encryption Process: 30
Block Splitting: 30
Round Function: 30
Key Mixing: 31
Swap and Repeat: 31
Final Round: 31
Decryption Process: 31
Block Splitting: 31
Round Function (in Reverse Order): 31
Key Mixing: 31
Swap and Repeat (in Reverse Order): 31
Final Round: 31
S-Box (Substitution Box): 32
Permutation Layer: 32
CAESER 33
Key Features of the Caesar Cipher: 33
Encryption Process: 33
Example: Plaintext: HELLO Encryption: KHOOR 34
Decryption Process: 34
Security Considerations: 34
KLEIN 35
ALGORITHM 35
Components of KLEIN Cipher: 36
Encryption Process: 36
Decryption Process: 37
TWINE 38
Encryption Process 38
Decryption Process: 40
COMPARISION 41
CONCLUSION 41
Literature Review 42
1st paper: 42
2nd paper: 42
3rd paper: 43
References 44
Introduction
Prologue
The proliferation of Internet of Things (IoT) devices has ushered in a new era of connectivity,
transforming the way we interact with the digital landscape. As these interconnected devices
permeate our homes, cities, and industries, the need for robust security measures to safeguard
sensitive data and ensure communication integrity has become an urgent priority. This project
delves into the domain of lightweight cryptography, a critical facet in addressing the security
challenges inherent in resource-constrained IoT environments.

Motivation
The motivation behind undertaking this project stems from the unique challenges posed by the
IoT landscape. Traditional cryptographic algorithms, designed for more powerful computing
environments, often prove impractical for the lightweight, low-power devices characteristic of
IoT ecosystems. The intrinsic constraints of these devices demand cryptographic solutions that
strike a delicate balance between security and resource efficiency.

The objectives of this project are multifaceted. Firstly, it seeks to explore and analyze a spectrum
of lightweight cryptographic algorithms tailored for IoT applications. By scrutinizing algorithms
such as RSA, AES, Simon, Speck, Present, HIGHT, Caesar, and Klein, the project aims to
discern their suitability in mitigating the security threats prevalent in IoT networks.

Secondly, the project endeavors to provide practical insights through the implementation and
evaluation of these cryptographic algorithms. Real-world performance metrics, including
algorithmic efficiency, power consumption, and computational complexity, will be assessed to
inform the selection of algorithms based on specific IoT use cases.

The overarching goal is to contribute to the evolving discourse on securing IoT ecosystems. By
offering a nuanced understanding of the strengths and limitations of lightweight cryptographic
algorithms, this project aspires to equip researchers, developers, and security practitioners with
the knowledge needed to fortify IoT environments against emerging cyber threats. Through
practical exploration and technical analysis, this project aims to be a valuable resource in
navigating the intricate landscape of IoT security.
Objectives
1. Algorithmic Exploration:
Investigate and analyze a range of lightweight cryptographic algorithms, including RSA, AES,
Simon, Speck, Present, HIGHT, Caesar, and Klein, with a focus on their applicability in IoT
environments.

2. Performance Evaluation:
Implement and evaluate the selected cryptographic algorithms, considering key performance
metrics such as algorithmic efficiency, power consumption, and computational complexity.

3. Comparative Analysis:
Conduct a comparative analysis of the cryptographic algorithms to identify their strengths and
limitations in the context of IoT applications. This analysis will serve as a foundation for
informed decision-making.

4. Real-World Applicability:
Explore the practical implications of implementing these algorithms in real-world IoT scenarios.
Assess their feasibility, adaptability, and performance under varying conditions.

5. Insights for Developers:


Provide practical insights and guidelines for developers and implementers in selecting
appropriate cryptographic algorithms based on specific use cases within IoT ecosystems.

6. Contribution to Security Discourse:


Contribute to the ongoing discourse on securing IoT ecosystems by presenting a nuanced
understanding of lightweight cryptographic solutions. This involves identifying potential
challenges and proposing solutions to enhance the overall security posture of IoT networks.

7. Foundation for Future Research:


Lay a foundation for future research and advancements in the field of lightweight cryptography
for IoT. Identify areas that require further exploration and refinement to address emerging
security threats in the evolving landscape.

8. Knowledge Dissemination:
Disseminate the findings and insights gained from the project through documentation and
presentation, aiming to contribute valuable knowledge to the academic and practitioner
communities involved in IoT security.
Problem Statement
The rapid proliferation of Internet of Things (IoT) devices has led to an unprecedented level of
connectivity, creating a vast network of interconnected sensors, actuators, and smart devices.
While this interconnectivity brings about transformative possibilities, it also introduces a myriad
of security challenges. Traditional cryptographic algorithms, designed for more powerful
computing environments, often prove to be impractical for the lightweight, resource-constrained
nature of many IoT devices.
The problem at hand is the inadequacy of existing cryptographic solutions to meet the specific
security requirements of IoT ecosystems. The challenges include:

1. Resource Constraints:

Many IoT devices operate with limited computational resources, including processing power,
memory, and energy. Traditional cryptographic algorithms, optimized for more robust systems,
often exceed the resource constraints of these devices.
2. Security Vulnerabilities:
The diversity of IoT applications introduces a range of security vulnerabilities, including
potential attacks on communication channels, unauthorized access to devices, and data integrity
breaches. Adapting existing cryptographic solutions to mitigate these threats in a
resource-efficient manner remains a critical challenge.
3. Real-World Applicability:
Despite a multitude of cryptographic algorithms available, the practical implementation and
performance in real-world IoT scenarios remain largely unexplored. The lack of understanding
regarding the applicability of these algorithms in diverse IoT use cases poses a significant
challenge.

4. Algorithm Selection Dilemma:


Developers and implementers face a dilemma in selecting appropriate cryptographic algorithms
for their IoT applications. The lack of clear guidelines and insights into the trade-offs between
security and resource efficiency hinders the effective deployment of secure IoT solutions.

5. Dynamic Threat Landscape:


The evolving threat landscape introduces new attack vectors and strategies. Cryptographic
solutions need to adapt to these dynamic threats, requiring constant evaluation and refinement to
ensure the resilience of IoT ecosystems.
Approach
Our approach to addressing the pressing challenges in securing Internet of Things (IoT)
ecosystems through lightweight cryptography is anchored in a systematic and thorough
exploration of cryptographic algorithms tailored for resource-constrained environments. The
following page outlines the key steps and methodologies undertaken in this project to contribute
meaningful insights to the field of IoT security.

Algorithm Selection and Rationale:


The first phase of our approach involved a meticulous selection of cryptographic algorithms,
considering their relevance and adaptability to IoT environments. The chosen algorithms—RSA,
AES, Simon, Speck, Present, HIGHT, Caesar, and Klein—were selected based on their
prominence in cryptographic literature and their potential applicability to the unique constraints
of IoT devices.

Literature Review:
A comprehensive literature review was conducted to establish a foundational understanding of
the cryptographic algorithms chosen for this study. This review encompassed existing research,
implementations, and performance evaluations, providing valuable insights into the strengths and
weaknesses of each algorithm in the context of IoT security.

Implementation and Simulation:


To bridge the gap between theory and practical applicability, we implemented the selected
cryptographic algorithms in a simulated IoT environment. The simulation aimed to replicate the
resource constraints characteristic of IoT devices, providing a controlled yet realistic setting for
assessing algorithmic behavior and performance.

Performance Evaluation Metrics:


Our approach included a rigorous performance evaluation based on key metrics crucial for IoT
applications. Algorithmic efficiency, power consumption, and computational complexity were
systematically assessed under various scenarios, allowing us to discern the trade-offs between
security and resource efficiency inherent in each algorithm.
Comparative Analysis:
A significant aspect of our approach involved conducting a comparative analysis of the
cryptographic algorithms. This analysis considered the nuanced differences in their performance,
enabling us to highlight their relative strengths and limitations. Through this comparative lens,
we aimed to provide a clear understanding of the practical implications of employing each
algorithm in diverse IoT use cases.

Real-World Applicability:
To ensure the relevance of our findings, we assessed the real-world applicability of the
cryptographic algorithms across different IoT use cases. This pragmatic exploration considered
scenarios such as smart homes, industrial IoT, and healthcare applications, shedding light on how
these algorithms perform in varied and dynamic environments

SCOPE
The scope of this project encompasses a thorough examination of lightweight cryptography
algorithms tailored for Internet of Things (IoT) environments. The focus includes the analysis of
selected cryptographic algorithms such as RSA, AES, Simon, Speck, Present, HIGHT, Caesar,
and Klein, evaluating their performance metrics in terms of algorithmic efficiency, power
consumption, and computational complexity. Practical implementations within a simulated IoT
environment further contribute to a comparative analysis, highlighting the relative strengths and
limitations of each algorithm. Real-world applicability testing across diverse IoT use cases and
the formulation of guidelines for developers form integral components, ensuring the project's
relevance to practical implementations. The documentation, dissemination, and feedback
mechanism facilitate knowledge sharing within academic and practitioner communities, while
recommendations for future research underscore the project's contribution to the evolving
landscape of lightweight cryptography for IoT security.
ALGORITHMS STUDIED

AES(Advanced Encryption Standard)


AES, or Advanced Encryption Standard, is a symmetric encryption algorithm widely adopted for
securing sensitive information and communications. It was established by the National Institute
of Standards and Technology (NIST) as a replacement for the aging Data Encryption Standard
(DES). AES operates on fixed-size data blocks, commonly 128 bits, and supports key lengths of
128, 192, or 256 bits. The algorithm employs a series of substitution, permutation, and mixing
operations in multiple rounds to provide a high level of security.

Features of AES (Advanced Encryption Standard)


1. Symmetric-Key Encryption:
AES operates on a symmetric-key encryption model, utilizing a single secret key for both
the encryption and decryption processes. This simplicity in key management contributes
to its practicality and efficiency.
2. Block Cipher Structure:
AES employs a block cipher structure, processing fixed-size data blocks (commonly 128
bits) during each encryption and decryption operation. This structured approach enhances
its adaptability and compatibility across different systems.

3. Variable Key Lengths:


AES supports variable key lengths, offering options of 128, 192, or 256 bits. This
flexibility allows users to choose the level of security based on their specific
requirements and the sensitivity of the data being protected.

4. Rounds of Operations:
The algorithm performs a series of substitution, permutation, and mixing operations in
multiple rounds. The number of rounds is determined by the key length: 10 rounds for
128-bit keys, 12 rounds for 192-bit keys, and 14 rounds for 256-bit keys. This iterative
process contributes to AES's robust resistance against various cryptographic attacks.

AES Encryption Process:


1.Key Expansion:
The process begins with the expansion of the initial secret key using a key expansion algorithm.
This generates a key schedule, providing distinct round keys for each encryption round.
2.Initial Round (AddRoundKey):
The plaintext is divided into blocks, typically 128 bits. In the initial round, each block undergoes
a bitwise XOR operation with the corresponding round key.
3.Rounds (SubBytes, ShiftRows, MixColumns, AddRoundKey):
The subsequent rounds (9, 11, or 13 rounds depending on the key length) involve a sequence of
four operations:
- SubBytes: Byte substitution using a fixed substitution table (S-box).

- ShiftRows: Shifting rows of the state matrix to introduce diffusion.


- MixColumns: Column-wise mixing of the state matrix to provide additional diffusion.

- AddRoundKey: Bitwise XOR with the round key.

4.Final Round (SubBytes, ShiftRows, AddRoundKey):


The final round omits the MixColumns operation, consisting of SubBytes, ShiftRows,
and AddRoundKey operations.
5.Cipher Text:
The output of the final round represents the ciphertext, which is the encrypted form of the
original plaintext.
AES Decryption Process:
1. Key Expansion:
Similar to encryption, the decryption process begins with key expansion to generate the key
schedule.
2. Initial Round (AddRoundKey):
The ciphertext undergoes an initial round where each block is XORed with the round key.
3. Rounds (InvShiftRows, InvSubBytes, InvMixColumns, AddRoundKey):
In each round (inverse operations), the following steps are performed:
- InvShiftRows: Reverse the row shifts applied during encryption.
- InvSubBytes: Reverse the byte substitution using the inverse S-box.
- InvMixColumns: Reverse the column mixing operation.
- AddRoundKey: XOR with the round key.
4.Final Round (InvShiftRows, InvSubBytes, AddRoundKey):
The final round excludes the InvMixColumns operation, consisting of InvShiftRows,
InvSubBytes, and AddRoundKey.
5. Decrypted Text:
The output of the final round represents the decrypted plaintext, matching the original input.
RSA (Rivest–Shamir–Adleman) Algorithm
The RSA algorithm is a widely-used public-key cryptosystem that enables secure
communication and digital signatures. Its key operations involve key generation, encryption, and
decryption, each with distinct steps.

RSA Key Generation:


● Select Two Large Prime Numbers:Begin by selecting two large prime numbers, p and q,
as they form the foundation for the RSA keys.
● Compute n and ϕ(n): Calculate n=pq and ϕ(n)=(p−1)(q−1).
● Choose Public Exponent (e): Select a public exponent (e) such that 1<e<ϕ(n) and e is
coprime with ϕ(n).
● Compute Private Exponent (d): Determine the private exponent (d) as the modular
multiplicative inverse of e modulo ϕ(n). In other words, de≡1modϕ(n).
● Public Key (e,n) and Private Key (d,n): The public key consists of e and n, while the
private key comprises d and n.

RSA Encryption:
● Convert Message to Number: Represent the plaintext message as an integer m such that
0≤m<n.
● Compute Ciphertext (c): Calculate the ciphertext c using the public key (e,n) with the
formula c≡m mod n.

RSA Decryption:
● Recover Message (m): Decrypt the ciphertext c using the private key(d,n) with the
formula m≡c mod n.
● Convert Number to Message: Convert the decrypted integer m back to the original
plaintext message.
SIMON
SIMON is a family of lightweight block ciphers designed for use in constrained environments,
particularly in the context of the Internet of Things (IoT) devices. It was introduced by the
National Security Agency (NSA) in 2013 and is known for its simplicity, efficiency, and
suitability for hardware implementation. The SIMON family includes different versions with
varying block sizes and key lengths, such as SIMON32/64, SIMON48/96, SIMON64/128,
SIMON96/96, and SIMON128/128.

Fig. One Round Of SIMON Fig. Feistel network structure

Key Features of SIMON Cipher:

1. Block Size and Key Length: SIMON supports different combinations of block sizes and
key lengths to cater to diverse application requirements. For example, SIMON32/64 has a
block size of 32 bits and a key length of 64 bits, while SIMON128/128 has a block size
of 128 bits and a key length of 128 bits.
2. Feistel Network Structure: SIMON employs a Feistel network structure, where the
input block is divided into two halves, and a round function is applied to one half using
the key. The resulting output is then XORed with the other half, forming the basis of the
encryption process.
3. Round Function: The core of SIMON's design is its round function, which typically
involves bitwise operations such as XOR, AND, OR, and cyclic rotations (shifts). The
simplicity of the round function contributes to the efficiency of the algorithm.
4. Key Expansion:SIMON uses a key expansion process to generate round keys from the
original key. The key schedule is designed to provide cryptographic security while
minimizing the overhead associated with key setup.

WORKING
The working of the SIMON cipher involves key generation, key expansion, and the
encryption/decryption process. Let's go through each step in detail:

Key Generation:
​ Input Key:
● The process starts with the input of the original key, which is typically of size
equal to the desired key length for the specific version of SIMON (e.g., 64 bits for
SIMON32/64).
​ Round Keys Initialization:
● Initialize an array to store the round keys. The number of round keys needed is
determined by the specific SIMON version and the number of rounds in the
encryption/decryption process.
​ Key Expansion:
● Perform the key expansion process to generate the round keys. The key expansion
involves applying a series of bitwise operations, such as XOR, AND, OR, and
cyclic rotations (shifts), to the original key.

Encryption Process:
The encryption process in SIMON is based on a Feistel network structure, where the input block
is divided into two halves, and a round function is applied iteratively.
​ Input Block Splitting:
● Split the plaintext block into two halves, usually referred to as the left half (L) and
the right half (R).
​ Round Function Application:
● Apply the round function to the right half (R) using the current round key. The
round function typically involves bitwise operations, and the specifics vary
between SIMON versions.
​ XOR Operation:
● XOR the result of the round function with the left half (L).
​ Swap and Repeat:
● Swap the left and right halves and repeat the process for the specified number of
rounds.
​ Final Round:
● The final round may have variations in the operations performed, and it may not
involve swapping. The output of the final round represents the ciphertext.

Decryption Process:
The decryption process in SIMON is similar to encryption but involves using the round keys in
reverse order.
​ Input Block Splitting:
● Split the ciphertext block into two halves, referred to as the left half (L) and the
right half (R).
​ Round Function Application (in Reverse Order):
● Apply the round function to the right half (R) using the current round key in
reverse order. This involves using the last round key for the first round of
decryption and so on.
​ XOR Operation:
● XOR the result of the round function with the left half (L).
​ Swap and Repeat (in Reverse Order):
● Swap the left and right halves and repeat the process for the specified number of
rounds in reverse order.
​ Final Round:
● The final round may have variations in the operations performed. The output of
the final round represents the decrypted plaintext.

Round Function:
The round function is a crucial component of SIMON's design. It typically involves operations
like XOR, AND, OR, and cyclic rotations (shifts). The specifics depend on the SIMON version
and are carefully designed to balance simplicity, efficiency, and security.
SPECK
Speck has been optimized for performance in software implementations, while its sister
algorithm, Simon, has been optimized for hardware implementations. Speck is an add–rotate–xor
(ARX) cipher.
Speck supports a variety of block and key sizes. A block is always two words, but the words may
be 16, 24, 32, 48 or 64 bits in size. The corresponding key is 2, 3 or 4 words. The round function
consists of two rotations, adding the right word to the left word, xoring the key into the left word,
then xoring the left word into the right word.

Key Features of SPECK Cipher:


​ Block Size and Key Length:
● SPECK supports different combinations of block sizes and key lengths to
accommodate various application requirements. For instance, SPECK32/64 has a
block size of 32 bits and a key length of 64 bits, while SPECK64/128 has a block
size of 64 bits and a key length of 128 bits.
​ Feistel Network Structure:
● Similar to SIMON, SPECK employs a Feistel network structure. The input block
is divided into two halves, and a series of rounds are applied to these halves using
a round function. The simplicity of the Feistel structure contributes to the
efficiency of the algorithm.
​ Round Function:
● The round function in SPECK involves basic bitwise operations such as XOR,
AND, OR, and cyclic rotations (shifts). The simplicity of the round function
allows for a lightweight implementation, making it suitable for
resource-constrained devices.
​ Key Expansion:
● SPECK uses a key expansion process to generate round keys from the original
key. The key schedule is designed to provide cryptographic security while
minimizing the computational overhead associated with key setup.

Key Generation:
​ Input Key:
● The process begins with the input of the original key, which is typically of a size
equal to the desired key length for the specific version of SPECK (e.g., 64 bits for
SPECK32/64).
​ Round Keys Initialization:
● Initialize an array to store the round keys. The number of round keys needed is
determined by the specific SPECK version and the number of rounds in the
encryption/decryption process.

​ Key Expansion:
● Perform the key expansion process to generate the round keys. The key expansion
involves applying a series of bitwise operations, such as XOR, AND, OR, and
cyclic rotations (shifts), to the original key. The details of the key expansion
process depend on the specific SPECK version.

Encryption Process:
The encryption process in SPECK is based on a Feistel network structure, where the input block
is divided into two halves, and a round function is applied iteratively.

​ Input Block Splitting:


● Split the plaintext block into two halves, usually referred to as the left half (L) and
the right half (R).
​ Round Function Application:
● Apply the round function to the right half (R) using the current round key. The
round function typically involves basic bitwise operations, such as XOR, AND,
OR, and cyclic rotations (shifts), and the specifics vary between SPECK versions.
​ XOR Operation:
● XOR the result of the round function with the left half (L).
​ Swap and Repeat:
● Swap the left and right halves and repeat the process for the specified number of
rounds.
​ Final Round:
● The final round may have variations in the operations performed. The output of
the final round represents the ciphertext.

Decryption Process:
The decryption process in SPECK is similar to encryption but involves using the round keys in
reverse order.

​ Input Block Splitting:


● Split the ciphertext block into two halves, referred to as the left half (L) and the
right half (R).
​ Round Function Application (in Reverse Order):
● Apply the round function to the right half (R) using the current round key in
reverse order. This involves using the last round key for the first round of
decryption and so on.
​ XOR Operation:
● XOR the result of the round function with the left half (L).
​ Swap and Repeat (in Reverse Order):
● Swap the left and right halves and repeat the process for the specified number of
rounds in reverse order.
​ Final Round:
● The final round may have variations in the operations performed. The output of
the final round represents the decrypted plaintext.

Round Function:
The round function is a crucial component of SPECK's design. It involves basic bitwise
operations, such as XOR, AND, OR, and cyclic rotations (shifts). The specifics of the operations
depend on the SPECK version and are designed to strike a balance between simplicity,
efficiency, and security


PRESENT
Present is an example of an SP-network and consists of 31 rounds. The block length is 64 bits
and two key lengths of 80 and 128 bits are supported. Given the applications we have in mind,
we recommend the version with 80-bit keys. This is more than adequate security for the
low-security applications typically required in tag-based deployments, but just as importantly,
this matches the design goals of hardware-oriented stream ciphers in the eSTREAM project and
allows us to make a fairer comparison. The security claims and performance attributes of the
128-bit version are provided in an appendix.

Each of the 31 rounds consists of an xor operation to introduce a round key Ki for 1 ≤ i ≤ 32,
where K32 is used for post-whitening, a linear bitwise permutation and a non-linear substitution
layer. The non-linear layer uses a single 4-bit S-box S which is applied 16 times in parallel in
each round. The cipher is described in pseudo-code in Figure 1, and each stage is now specified
in turn. The design rationale are given in Section 4 and throughout we number bits from zero
with bit zero on the right of a block or word.
Key Features of PRESENT Cipher:
​ Block Size and Key Length:
● PRESENT has a fixed block size of 64 bits and supports key lengths of 80 or 128
bits. The choice of key length provides flexibility in adapting to different security
requirements.
​ Substitution-Permutation Network (SPN) Structure:
● PRESENT employs a Substitution-Permutation Network (SPN) structure, which
is a common design choice for modern block ciphers. The SPN structure involves
the repeated application of a substitution layer followed by a permutation layer.
​ Round Function:
● The round function in PRESENT consists of a substitution-permutation network.
The substitution layer involves the application of a simple S-box (substitution
box), and the permutation layer involves bitwise permutations.
​ S-Box Design:
● The S-box used in PRESENT is carefully designed to provide resistance against
linear and differential cryptanalysis. The S-box is a crucial component of the
round function, contributing to the overall security of the cipher.
​ Key Schedule:
● PRESENT employs a key schedule to generate round keys from the original key.
The key schedule is designed to ensure that changes in the key significantly affect
the cipher's behavior.
​ Efficient Hardware Implementation:
● One of the design goals of PRESENT is to be efficient in hardware
implementations. The simplicity of its structure and operations makes it suitable
for integration into hardware components with limited resources.
​ Cryptographic Strength:
● PRESENT has undergone extensive cryptanalysis, including resistance testing
against various attacks such as differential and linear cryptanalysis. The design
choices aim to provide a balance between simplicity and cryptographic strength.

ALGORITHM

addRoundKey
Given round key Ki = κi 63 . . . κi 0 for 1 ≤ i ≤ 32 and current state b63 . . . b0, addRoundKey
consists of the operation for 0 ≤ j ≤ 63, bj → bj ⊕ κi j .
sBoxlayer.
The S-box used in present is a 4-bit to 4-bit S-box S : F42 → F42 . The action of this box in
hexadecimal notation is given by the following table.

For sBoxLayer the current state b63 . . . b0 is considered as sixteen 4-bit words w15 . . .w0
where wi = b4∗i+3||b4∗i+2||b4∗i+1||b4∗i for 0 ≤ i ≤ 15 and the output nibble S[wi] provides the
updated state values in the obvious way.

pLayer.
The bit permutation used in present is given by the following table. Bit i of state is moved to bit
position P(i).

The key schedule.


Present can take keys of either 80 or 128 bits. However we focus on the version with 80-bit keys.
The user-supplied key is stored in a key register K and represented as k79k78 . . . k0. At round i
the 64-bit round key Ki = κ63κ62 . . . κ0 consists of the 64 leftmost bits of the current contents of
register K. Thus at round i we have that: Ki = κ63κ62 . . . κ0 = k79k78 . . . k16. After extracting
the round key Ki, the key register K = k79k78 . . . k0 is updated as follows.
1. [k79k78 . . . k1k0] = [k18k17 . . . k20k19]
2. [k79k78k77k76] = S[k79k78k77k76]
3. [k19k18k17k16k15] = [k19k18k17k16k15] ⊕ round_counter

Thus, the key register is rotated by 61 bit positions to the left, the left-most four bits are passed
through the present S-box, and the round_counter value i is exclusive-ored with bits
k19k18k17k16k15 of K with the least significant bit of round_counter on the right. The key
schedule for 128-bit keys is presented in an appendix.

Encryption Process:

Block Splitting:
● The plaintext block is divided into two halves, usually referred to as the left half
(L) and the right half (R).

Round Function:
● The round function in PRESENT consists of a substitution-permutation network
(SPN).
● Substitution Layer: The right half (R) undergoes substitution using a
carefully designed S-box (substitution box).
● Permutation Layer: The result is then subjected to a permutation involving
bitwise operations.
Key Mixing:
● The round key is XORed with the left half (L), introducing key material into the
encryption process.

Swap and Repeat:


● The left and right halves are swapped, and the process is repeated for the specified
number of rounds.

Final Round:
● The final round may have variations in the operations performed. The output of
the final round represents the ciphertext.

Decryption Process:
The decryption process in PRESENT is the reverse of the encryption process. It involves using
the round keys in reverse order.

Block Splitting:
● The ciphertext block is divided into two halves, referred to as the left half (L) and
the right half (R).

Round Function (in Reverse Order):


● The round function is applied to the right half (R) using the current round key in
reverse order. This involves using the last round key for the first round of
decryption and so on.

Key Mixing:
● The round key is XORed with the left half (L), introducing key material into the
decryption process.

Swap and Repeat (in Reverse Order):


● The left and right halves are swapped, and the process is repeated for the specified
number of rounds in reverse order.

Final Round:
● The final round may have variations in the operations performed. The output of
the final round represents the decrypted plaintext.
S-Box (Substitution Box):
● The S-box used in PRESENT is a crucial component of the round function.
● It is a substitution table that takes an input and produces an output based on a
predetermined mapping.
● The design of the S-box is critical for providing resistance against linear and differential
cryptanalysis.
● The S-box is carefully crafted to ensure that changes in the input bits significantly affect
the output.

Permutation Layer:
● The permutation layer involves bitwise operations that rearrange the bits of the data.
● It adds confusion to the data and contributes to the overall security of the cipher.
CAESER
The Caesar Cipher is one of the simplest and oldest encryption techniques, dating back to ancient
Rome. It belongs to the category of substitution ciphers, where each letter in the plaintext is
replaced by a letter with a fixed number of positions down the alphabet.

Key Features of the Caesar Cipher:


​ Shift Operation:
● The Caesar Cipher operates by shifting each letter in the plaintext by a fixed
number of positions (known as the "shift" or "key") down the alphabet.
​ Alphabetic Wrap-around:
● If the shift extends beyond the end of the alphabet, it wraps around to the
beginning. For example, with a shift of 3, 'X' would be encrypted as 'A'.
​ Key Space:
● The key space of the Caesar Cipher is relatively small, as there are only 25
possible shifts (excluding the shift of 0, which results in the original plaintext).
​ Symmetric Encryption:
● The Caesar Cipher is a symmetric key algorithm, meaning the same key is used
for both encryption and decryption. The decryption process involves shifting
letters in the opposite direction.

Encryption Process:
​ Choose a Shift Value:
○ The sender and receiver must agree on a specific shift value.
​ Shift Each Letter:
○ Each letter in the plaintext is shifted by the agreed-upon number of positions
down the alphabet. The shift is applied consistently to each letter.
​ Alphanumeric Characters:
○ Non-alphabetic characters (digits, punctuation, spaces) remain unchanged during
encryption.
​ Ciphertext:
○ The resulting sequence of shifted letters forms the ciphertext.

Example: Plaintext: HELLO Encryption: KHOOR

Decryption Process:
​ Use the Reverse Shift:
● The receiver knows the agreed-upon shift value and applies the reverse shift to
each letter in the ciphertext.
​ Alphanumeric Characters:
● Non-alphabetic characters remain unchanged during decryption.
​ Decrypted Message:
● The resulting sequence of shifted letters forms the decrypted plaintext.

Security Considerations:
The Caesar Cipher is highly vulnerable to brute-force attacks due to its small key space.
Automated methods can try all possible shifts until the correct plaintext is obtained. It is
primarily considered a historical and educational cipher, and its use in modern contexts for
serious security purposes is discouraged.
KLEIN
KLEIN is a lightweight block cipher designed for resource-constrained environments,
particularly suitable for applications in the Internet of Things (IoT). It was introduced by
researchers at the Orange Labs in France in 2011. KLEIN is characterized by its simplicity,
efficiency, and resistance to various cryptographic attacks.

Fig: The key scheduling of 64-bit key length of KLEIN-64

ALGORITHM
Components of KLEIN Cipher:
​ Block Size and Key Length:
● KLEIN has a fixed block size of 64 bits and supports key lengths of either 80 or
128 bits. This means that the plaintext and ciphertext blocks are both 64 bits in
length.
​ Feistel Network Structure:
● KLEIN employs a Feistel network structure, where the 64-bit block is divided
into two halves, left (L) and right (R). The Feistel network iterates through a
series of rounds, with the round function applied to the right half in each iteration.
​ Round Function:
● The round function of KLEIN consists of key mixing, substitution, and
permutation operations:
● Key Mixing: The round key is XORed with the right half of the block.
● Substitution: The substituted value is obtained by passing the XOR result
through a carefully designed S-box.
● Permutation: The bits of the substituted value undergo a permutation
operation.
​ S-Box Design:
● The S-box in KLEIN is a crucial component of the round function. It replaces bit
patterns in the right half with different bit patterns using a predefined lookup
table. The design of the S-box is crucial for resistance against linear and
differential cryptanalysis.
​ Key Schedule:
● KLEIN employs a key schedule to generate round keys from the original key. The
key schedule is designed to ensure that changes in the key significantly affect the
behavior of the cipher. The round keys are derived from the original key and are
used in each round of the encryption and decryption processes.
​ Substitution-Permutation Network (SPN):
● The overall structure of KLEIN is based on the SPN design paradigm. In an SPN,
the block undergoes multiple rounds of substitution and permutation operations.
The choice of the number of rounds contributes to the overall security of the
cipher.

Encryption Process:
​ Divide Block:
● The 64-bit plaintext block is divided into left (L) and right (R) halves.
​ Key Mixing, Substitution, Permutation (Rounds):
● Iteratively apply the round function for the specified number of rounds.
● For each round, XOR the right half with the round key, pass it through the
S-box, and apply a permutation.
● The left and right halves are swapped at the end of each round.
​ Final Round:
● The final round may have variations in the operations performed.
​ Generate Ciphertext:
● The final output after the last round represents the ciphertext.

Decryption Process:
​ Inverse Permutation, Substitution, Key Mixing (Rounds):
● Apply the inverse operations of the final round and the preceding rounds in
reverse order.
​ Inverse Divide Block:
● The final result after the last round represents the decrypted plaintext.
TWINE
TWINE cipher is a generalized Feistel structure algorithm, which can be applied to Internet of
things terminals with limited computing resources because of its good performance. Since it was
proposed, it has been widely studied by academia and industry. This paper analyses the
permutation law of TWINE cipher, and proposes a differential fault attack method with its
differential property. By selecting 33 th ,34 th and 35 th rounds for the nibble differential fault
attack, the original 80-bit key can be recovered from 24 nibble fault ciphertext, with the
computational complexity and data complexity of 2 10.47 and 2 10.58 , respectively. The results
show this method has great advantages over other public literatures about the cryptanalysis of
TWINE cipher.

Encryption Process
The TWINE cipher has a packet length of 64 bits, an initial key length of 80 bits, and an iteration
number of 36 rounds. The TWINE cipher adopts a variant of the generalized Feistel structure, as
shown in Fig. 1.

The round function F is defined as:


The data is divided into 16 parts, each containing 4 bits. The round function includes of a
nonlinear transformation and a linear permutation layer (the last round has no permutation). The
nonlinear transformation is eight identical 4-bit S boxes, and the round displacement is a
nibble-based position displacement. The transformation S(x) of S box is shown in the Table I
below, and the definition of round displacement P(h) is shown in Table II.

TABLE I. S Box Substitution of TWINE Cipher

TABLE II. Permutation Layer of TWINE Cipher

TWINE's key scheme uses an initial 80-bit key K as input, and outputs 80-bit data (k0 || k1 || ⋯ ||
k19 ), in which k1, k3, k4, k6, k13, k14, k15, k16 as 32-bit round key, totally 36 rounds. In
addition, the key update scheme for TWINE cipher in every round is:

where, CONHr represents the constant high value data of the rth round; CONLr represents the
constant low value data of the rth round. The values of the round constant are shown in Table III.
TABLE III. Round Constant of TWINE Cipher

In addition, it can be seen from that the original 80-bit key can be restored if the 32-bit key for
three consecutive rounds is known.

Decryption Process:
​ Inverse Permutation, Substitution, Key Mixing, Inverse Linear Transformation
(Rounds):
● Apply the inverse operations of the final round and the preceding rounds in
reverse order.
​ Inverse Divide Block:
● The final result after the last round represents the decrypted plaintext.
COMPARISION

Cipher Key size Encryption Decryption


Time Time
SIMON 128 3µs 1µs
SPECK 128 2µs 2µs
TWINE 128 3µs 3µs
PRESENT 128 14µs 11µs
CAESER 128 1µs 1µs
KLEIN 128 2ms 2ms

CONCLUSION

● Based on the fact that both security requirements and performance of lightweight block
ciphers should take into careful consideration in Industrial Wireless Sensor Networks,we
studied several recent top performing lightweight ciphers. Some software-oriented
performance metrics are used to measure the performance of these ciphers from different
aspects.
● Through the analysis and comparison of experimental data results, it is obvious that the
cipher SPECK shows good competitiveness in various aspects, such as the least memory
occupation, the highest throughput, the best comprehensive metric, and a better security.
● Thus, the balance between security and performance has to be paid attention to when a
system is designed to achieve the expected results.
● Thus, to select a suitable cryptographic algorithm optimized to the factory environment,
there is a need to better understand the resources of dedicated platforms and the
algorithmic requirement. Nice trade-off between security and performance will help to
put forward good solutions to actual applications.
Literature Review

1st paper:
The paper titled "Lightweight Cryptographic Algorithms for Guessing Attack Protection in
Complex Internet of Things Applications" proposes the use of lightweight cryptographic
algorithms as a solution to protect IoT devices from guessing attacks. The paper discusses the
importance of IoT security and the challenges posed by the large number of devices on a network
and the anonymous or uncontrolled Internet structure. The authors review the literature on
cryptography algorithms and machine learning-based neural network algorithms used to solve
security issues in IoT. The paper then presents three distinct algorithms - AES, RSA, and MD5 -
and evaluates their performance using cloud resources. The authors conclude that lightweight
cryptographic algorithms can provide effective security for IoT devices while minimizing
resource usage. The paper also includes information on data availability, conflicts of interest, and
acknowledgments.

2nd paper:
Securing the Internet of Things
The research paper discusses the proliferation and complexities of the Internet of Things (IoT),
its integration with sensors and devices, and the potential security and privacy concerns related
to data integrity and authenticity. The paper proposes a lightweight encryption algorithm named
Secure IoT (SIT) to address the security challenges associated with IoT devices. It describes the
architecture of SIT as a 64-bit block cipher that requires a 64-bit key for data encryption. The
algorithm is a blend of feistel and a uniform substitution-permutation network, offering
substantial security in just five encryption rounds. The hardware implementation of the algorithm
is tested on an 8-bit micro-controller to compare code size, memory utilization, and
encryption/decryption execution cycles with other benchmark encryption algorithms. [ 1 ]

The Proliferation and Complexity of IoT


The paper highlights the rapid growth of IoT, connecting billions of devices, and the significant
amount of data generated, raising data security concerns. The authors emphasize the limitations
of conventional encryption algorithms for IoT due to their complexity and energy consumption.
The integration of IoT with various industries, including health care, logistics, and transportation,
is discussed, along with their potential benefits and security challenges. [ 2 ]

Security and Privacy Concerns in IoT


Security and privacy concerns in IoT are detailed, including the vulnerability of IoT devices to
security threats, the risk of information leakage, and the potential for attacks. The paper
discusses encryption as a means to minimize data integrity threats and highlights the need for a
lightweight encryption algorithm to ensure data security without compromising the performance
of energy-constrained IoT devices. [ 2 ]

Evaluation of the SIT Algorithm


The proposed algorithm, SIT, is evaluated based on key sensitivity, execution time, memory
utilization, image histogram, and correlation of the image. The results demonstrate the
algorithm's ability to achieve substantial security while consuming minimal resources. The paper
also provides a detailed analysis of existing lightweight cryptography algorithms and their
relevance to IoT security. [ 1 ]

Conclusion and Real-world Usability


The research concludes by emphasizing the importance of adequate security measures for IoT to
build users' confidence and encourage the adoption of IoT technology. The usability of SIT in
real-world IoT environments is demonstrated through its implementation on hardware platforms,
showcasing its low execution time and memory utilization. Overall, the research paper offers a
comprehensive analysis of IoT's growth, security challenges, and the development of a
lightweight encryption algorithm to address these challenges. [ 1 ]

3rd paper:
The document discusses the development of a lightweight block cipher called LBC-IoT for
securing IoT devices with limited resources. The goal of the proposed algorithm is to provide a
practical and secure cipher for low-resource applications. LBC-IoT achieves this by
incorporating security and simplicity into its design. It uses a compact 4-bit S-box for confusion
and a permutation process for diffusion. The algorithm has an 80-bit key length to prevent
exhaustive key searches and is immune to different types of attacks. LBC-IoT has a small
software footprint and can be implemented in both hardware and software. The hardware
implementation results of LBC-IoT are promising, with the smallest ever area of 548 GE.
Overall, LBC-IoT is a suitable solution for securing IoT devices with limited resources.
References
https://www.nec.com/en/global/rd/tg/code/symenc/twine.html
https://jwcn-eurasipjournals.springeropen.com/articles/10.1186/s13638-018-1121-6
https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
https://github.com/Angtrim/opencl-ciphers/blob/master/src/hight_ctr/hight_cipher.c

You might also like