LightWeight FirstStage
LightWeight FirstStage
INTRODUCTION
1.1 INTRODUCTION
To address these challenges, lightweight block ciphers have been developed. These ciphers
are designed to offer a balance between security and efficiency, making them ideal for
environments with constrained resources. However, despite their efficiency, lightweight
ciphers are often more vulnerable to cryptanalysis than their heavyweight counterparts due to
their simplified structures.
The evaluation of a cipher's security is a critical step in determining its robustness against
various cryptographic attacks, such as differential or linear cryptanalysis. Traditional security
evaluations often rely on mathematical analysis and manual inspection, but these methods
can be time-consuming and sometimes overlook subtle vulnerabilities.
Recently, machine learning (ML) techniques have been applied to the field of cryptography
to automate and enhance the evaluation process. By training classifiers on various cipher
features, such as the behavior of the S-boxes (substitution boxes) and other cryptographic
components, machine learning models can effectively predict a cipher’s resistance to specific
attack vectors. The idea is to leverage the power of machine learning to identify patterns that
indicate weaknesses in the cipher’s design, helping researchers and cryptographers to assess
its security more efficiently. One of the most critical components in block ciphers is the S-
box, which is responsible for performing non-linear substitutions. The design of an S-box
significantly impacts the cipher’s security against attacks. In lightweight ciphers, the S-box
must not only provide strong security properties but also be computationally efficient. The
1
active S-box concept refers to an S-box that actively adapts or evolves based on specific
conditions or inputs, such as the key or message characteristics. Active S-boxes can introduce
dynamic behavior into the cipher, potentially increasing its resistance to cryptanalysis. By
incorporating active S-boxes into lightweight block ciphers, cryptographers aim to increase
the difficulty of reverse-engineering or predicting the cipher's behavior. Evaluating the
security of ciphers that incorporate active S-boxes through machine learning techniques
provides a novel approach to analyzing how well these dynamic components hold up against
various cryptanalytic strategies.
The design of lightweight block ciphers typically involves simplifying the components of
conventional ciphers to reduce their computational complexity and memory requirements.
These ciphers often use smaller block sizes, such as 64 bits or even 32 bits, compared to the
larger block sizes used in standard ciphers like AES. By reducing the block size, lightweight
ciphers can minimize memory usage, making them more efficient for small devices with
limited storage capabilities. Additionally, lightweight block ciphers generally employ smaller
key sizes than their more heavyweight counterparts, which helps to further reduce both the
time and space complexity. This reduction in key size, however, does not necessarily
compromise the security of the cipher, as it is balanced by using efficient cryptographic
operations that remain secure despite their simplicity.
One of the critical components of any block cipher is the S-box, which is responsible for
introducing non-linearity into the encryption process. In lightweight block ciphers, the S-box
2
design plays a significant role in maintaining the cipher’s resistance to cryptanalytic attacks,
such as differential and linear cryptanalysis. Lightweight ciphers often rely on smaller,
simpler S-boxes that are optimized for the hardware or software platform on which the cipher
will be implemented. These S-boxes must strike a delicate balance between providing strong
security properties and being computationally efficient. To maintain security while
minimizing resource usage, lightweight ciphers frequently incorporate S-boxes that are less
complex than those used in more resource-heavy ciphers but still offer sufficient resistance to
attacks. The combination of these efficient S-boxes and other cryptographic components
ensures that lightweight block ciphers can still provide a reasonable level of security, even
with the reduced complexity. Another feature of lightweight block ciphers is the use of fewer
rounds of encryption than traditional ciphers. For example, while AES uses between 10 and
14 rounds depending on the key size, lightweight block ciphers typically use between 6 and 8
rounds. This reduction in rounds helps to cut down on the computational resources required,
which is crucial for environments where efficiency is paramount. However, this reduction in
the number of rounds must be carefully considered to ensure that the cipher still achieves
adequate diffusion and confusion, which are essential for thwarting cryptanalytic attacks. The
design of permutation layers and mixing functions within the cipher’s structure helps to
increase the diffusion of the plaintext over the ciphertext, making it more difficult for
attackers to predict or reverse the encryption process.
The applications of lightweight block ciphers are vast, particularly in the context of emerging
technologies like IoT, smart homes, and wearable devices. These devices often operate in
environments where both security and energy efficiency are critical, such as in battery-
powered sensors or low-cost devices that need to run for long periods without recharging.
Lightweight block ciphers are ideal for these scenarios, as they provide secure encryption
without draining the device’s limited battery power or requiring significant processing
capabilities. For instance, in IoT networks, where a large number of interconnected devices
may communicate with one another, lightweight block ciphers are used to ensure that data
exchanged between these devices remains secure, even when the devices themselves are
resource-constrained.
In addition to IoT applications, lightweight block ciphers are also widely used in areas such
as RFID (Radio Frequency Identification), smart cards, and wireless sensor networks. RFID
systems, which are commonly used in applications such as inventory management and access
control, rely on lightweight block ciphers to encrypt data transmitted between tags and
3
readers. These systems often operate in environments where power and memory are limited,
so using lightweight ciphers ensures that encryption can occur without overwhelming the
system’s capabilities. Similarly, smart cards, which are used in financial transactions and
identity verification, need to provide strong security while operating within strict hardware
constraints. Lightweight block ciphers offer the necessary security for these devices while
being efficient enough to run on low-power hardware. The development of lightweight block
ciphers requires careful attention to the trade-offs between security and efficiency. While it is
essential that these ciphers remain computationally efficient, they must also resist a wide
range of potential attacks. Cryptanalysts often test ciphers for vulnerabilities such as
differential and linear cryptanalysis, which exploit patterns in the cipher’s structure to recover
the key or predict the plaintext from the ciphertext. Lightweight block ciphers must therefore
incorporate sufficient randomness and non-linearity to prevent these types of attacks. At the
same time, the design of these ciphers must consider the specific hardware or software
platforms they will be deployed on, as optimizing them for specific architectures can lead to
significant performance improvements.
Machine learning classifiers are algorithms used to categorize data into different classes or
labels based on input features. These classifiers are a fundamental tool in the field of machine
learning, enabling systems to make decisions or predictions based on past data. They have
applications across a wide range of domains, from image and speech recognition to spam
filtering and medical diagnosis. The goal of a machine learning classifier is to learn from a
set of training data, where each example is associated with a known label, and then apply this
4
knowledge to classify new, unseen data. The process involves learning patterns from the data
through various statistical methods and algorithms, enabling the model to generalize and
make accurate predictions.
The process of building a machine learning classifier typically begins with data
preprocessing, where raw data is cleaned, normalized, and transformed into a format that can
be used by the algorithm. This step may involve handling missing values, removing noise,
and scaling features to ensure that the input data is consistent and suitable for the learning
process. Once the data is prepared, the classifier is trained using a labeled dataset, meaning
each instance in the training set has a corresponding label that defines its class. During the
training phase, the algorithm analyzes the features of the data to identify patterns that
distinguish different classes from one another. This is achieved by applying a mathematical
model to the data, such as decision trees, support vector machines, or neural networks, which
iteratively adjusts its internal parameters to improve its ability to classify new data accurately.
There are several types of machine learning classifiers, each with its own strengths,
weaknesses, and ideal use cases. Decision tree classifiers are one of the simplest and most
interpretable types of classifiers, where the model builds a tree-like structure to make
decisions based on feature values. These classifiers are particularly useful in situations where
interpretability and clarity of decision-making are important. However, decision trees can be
prone to overfitting, especially when the tree becomes too complex. To address this issue,
techniques like pruning and ensemble methods, such as Random Forests, are often used.
Random Forests combine multiple decision trees to improve classification accuracy and
robustness.
Another widely used machine learning classifier is the support vector machine (SVM), which
seeks to find the optimal hyperplane that separates different classes in a high-dimensional
feature space. SVMs are known for their ability to handle both linear and non-linear
classification problems and are particularly effective in scenarios where the classes are not
linearly separable. The kernel trick is a key feature of SVMs, allowing them to efficiently
handle non-linear separations by mapping the input data into higher-dimensional spaces.
SVMs are known for their strong generalization ability, making them effective even with
small amounts of data.
K-nearest neighbors (K-NN) is another simple and intuitive classifier that makes predictions
based on the majority class of the nearest data points in the feature space. K-NN is a non-
parametric method, meaning it does not assume any underlying distribution of the data. It is
easy to implement and effective in many scenarios, but its computational cost increases as the
5
size of the dataset grows, particularly when making predictions for new data points. This is
because K-NN requires calculating the distance between the query point and all other data
points in the training set.
Naive Bayes classifiers are based on the application of Bayes' theorem, which calculates the
probability of a data point belonging to a particular class, given the observed feature values.
Despite its simplicity and the "naive" assumption that features are independent, Naive Bayes
classifiers often perform surprisingly well, particularly in text classification tasks such as
spam filtering and sentiment analysis. The model’s efficiency and speed make it a popular
choice for large datasets, and it can handle both binary and multi-class classification
problems.
Neural networks are a more advanced class of machine learning models inspired by the
structure and function of the human brain. These models consist of layers of interconnected
nodes (neurons), where each node processes input data and passes the result through an
activation function. Neural networks can model complex, non-linear relationships between
features and classes, making them highly effective for tasks such as image recognition,
natural language processing, and speech recognition. When used as classifiers, neural
networks can learn from vast amounts of data and extract intricate patterns that might be
difficult for simpler models to capture. However, neural networks require large amounts of
data for training, and their performance depends heavily on the choice of architecture and
hyperparameters.
The training of machine learning classifiers involves a critical phase known as model
evaluation, where the classifier’s performance is assessed using various metrics. Common
evaluation metrics include accuracy, precision, recall, and F1-score, which provide different
perspectives on how well the model is performing in terms of classification. Cross-validation
is often used to ensure that the model generalizes well to unseen data by splitting the dataset
into multiple subsets and training the model on different combinations of these subsets. This
helps to prevent overfitting and ensures that the model’s performance is not biased by the
specific data it was trained on.
Another important consideration in classifier design is overfitting, which occurs when the
model learns to fit the training data too closely, capturing noise and outliers rather than
generalizable patterns. Overfitting reduces the model's ability to perform well on new, unseen
data. To address overfitting, various techniques can be applied, including regularization
methods such as L2 regularization (also known as Ridge regression) and L1 regularization
(Lasso), which penalize the complexity of the model. In addition, ensemble methods like
6
Boosting and Bagging combine multiple models to improve classification accuracy and
reduce variance.
In real-world applications, machine learning classifiers are often used in a wide range of
industries. In healthcare, for instance, classifiers are used for diagnosing diseases based on
medical images or patient data. Finance relies on machine learning classifiers for fraud
detection, credit scoring, and algorithmic trading. In marketing, classifiers help businesses
segment customers based on purchasing behavior, while in cybersecurity, classifiers are
applied to detect anomalies and identify potential security threats. Additionally, autonomous
vehicles use classifiers to interpret sensor data, such as images and radar signals, to make
driving decisions in real-time.
As machine learning continues to evolve, new types of classifiers and techniques are being
developed to address the challenges posed by increasingly complex data. One notable
advancement is the use of deep learning techniques, which involve training multi-layered
neural networks to automatically learn features from raw data, eliminating the need for
manual feature engineering. These models have shown remarkable success in fields such as
image recognition, natural language understanding, and even game playing. However, deep
learning models also require substantial computational resources and large labeled datasets,
making them more suited for tasks where such resources are available.
1.1.3 Cryptographic Algorithms
Cryptographic algorithms are fundamental to securing data in an increasingly digital world,
ensuring privacy, integrity, authentication, and non-repudiation in communication systems.
At their core, cryptographic algorithms are mathematical functions designed to encode and
decode information, making it unreadable to unauthorized users while allowing authorized
users to retrieve the original message. These algorithms are used in a variety of applications,
including secure messaging, online banking, digital signatures, and even securing network
protocols such as HTTPS and VPNs. By applying cryptographic techniques, sensitive data
can be protected from eavesdropping, tampering, and impersonation, which are essential in
maintaining the confidentiality and trustworthiness of digital interactions.
The two primary types of cryptographic algorithms are symmetric-key cryptography and
asymmetric-key cryptography. Symmetric-key cryptography, also known as private-key
cryptography, uses the same key for both encryption and decryption. The key must be kept
secret, as anyone who possesses the key can decrypt the encrypted data. This method is
computationally efficient and is widely used for encrypting large volumes of data. Some of
the most well-known symmetric-key algorithms include AES (Advanced Encryption
7
Standard), DES (Data Encryption Standard), and RC4. AES is particularly popular today due
to its strength and efficiency, and it is used in everything from securing internet traffic to
protecting files on disk. Despite the efficiency of symmetric-key cryptography, the challenge
lies in the secure distribution of the key itself, as sharing a secret key over insecure channels
could lead to interception by malicious actors.
Asymmetric-key cryptography, also called public-key cryptography, addresses the limitations
of symmetric-key cryptography by using a pair of keys: a public key and a private key. The
public key is used for encryption, while the private key is used for decryption. This method
eliminates the need for securely exchanging a secret key, as the public key can be freely
shared. However, the security of the system relies heavily on the computational difficulty of
deriving the private key from the public key. The most well-known asymmetric-key
algorithm is RSA (Rivest-Shamir-Adleman), which is widely used for secure
communications, digital signatures, and data encryption. RSA relies on the fact that factoring
large composite numbers is computationally infeasible, providing the foundation for its
security. Other notable asymmetric algorithms include Elliptic Curve Cryptography (ECC),
which offers stronger security per bit than RSA and is increasingly being adopted for mobile
devices and IoT applications due to its efficiency in resource-constrained environments.
In addition to the primary encryption algorithms, cryptographic hashing is another crucial
component of modern cryptography. A hash function takes an input of any size and produces
a fixed-size output, which is often referred to as a hash value or checksum. Hash functions
are designed to be one-way functions, meaning they can easily generate the hash value from
the input but cannot be reversed to retrieve the original input. Hash functions are commonly
used in digital signatures, message integrity checks, and password storage. SHA (Secure
Hash Algorithm) is one of the most widely used hashing algorithms, with variants like SHA-
256 and SHA-512 being particularly popular due to their strong collision resistance. Hashing
is essential for ensuring data integrity, as any change in the input data will result in a
completely different hash value, making it easy to detect any tampering or corruption of the
data.
Digital signatures are another important application of cryptographic algorithms. A digital
signature provides a means of verifying both the authenticity and integrity of a message or
document. By using a combination of hashing and asymmetric encryption, a digital signature
allows the recipient to confirm that the message was sent by the claimed sender (authenticity)
and that it has not been altered in transit (integrity). In practice, the sender hashes the
message, then encrypts the hash value with their private key to create the digital signature.
8
The recipient can then decrypt the signature using the sender's public key, recompute the hash
of the message, and compare it to the decrypted value to verify the signature. This process
ensures that no one can impersonate the sender and that the message has not been tampered
with during transmission.
Cryptographic algorithms are also critical to securing network protocols, such as SSL/TLS
(Secure Sockets Layer/Transport Layer Security), which provide secure communication over
the internet. SSL/TLS protocols rely on a combination of asymmetric-key cryptography for
key exchange and symmetric-key cryptography for encrypting the communication once the
connection is established. The protocol ensures that data transmitted between clients and
servers is confidential and protected from eavesdropping, while also verifying the identity of
the communicating parties to prevent man-in-the-middle attacks. As cyberattacks grow in
sophistication, cryptographic algorithms are continuously being improved to withstand
emerging threats, with modern cryptographic systems utilizing techniques such as forward
secrecy to ensure that even if long-term keys are compromised, past communications remain
secure.
In addition to these widely used cryptographic techniques, key exchange algorithms such as
Diffie-Hellman are essential for securely sharing cryptographic keys over an insecure
channel. Diffie-Hellman allows two parties to establish a shared secret key without directly
transmitting it, relying on the computational difficulty of discrete logarithms. This shared
secret key can then be used for symmetric-key encryption, ensuring secure communication.
In recent years, more advanced methods such as Elliptic Curve Diffie-Hellman (ECDH) have
been developed to provide stronger security with smaller key sizes, making them particularly
suitable for mobile and IoT devices.
Despite their importance, cryptographic algorithms are not impervious to attack. Over the
years, numerous cryptographic algorithms have been broken or weakened due to advances in
computing power, mathematical research, and algorithmic techniques. For instance, DES
(Data Encryption Standard), once a widely used symmetric encryption algorithm, was
eventually deemed insecure due to its relatively small key size of 56 bits. As computational
power increased, brute-force attacks became feasible, leading to the adoption of more secure
algorithms like AES, which uses key sizes of 128, 192, or 256 bits. Similarly, RSA's security
is tied to the size of the key, and advances in number factorization techniques and quantum
computing research have led to the development of quantum-resistant algorithms to prepare
for the future of cryptography in the age of quantum computers.
9
Modern cryptographic research is actively exploring new algorithms that can resist these
emerging threats. For example, post-quantum cryptography aims to develop algorithms that
remain secure even in the presence of quantum computers, which are capable of solving
certain mathematical problems exponentially faster than classical computers. Cryptographic
algorithms based on lattice-based cryptography and hash-based signatures are some of the
leading candidates for this new generation of secure algorithms. These new algorithms will
play a crucial role in securing digital systems in the future, ensuring that cryptographic
systems remain robust and secure as computing technologies evolve.
1.1.4 Active S-Box’s:
Active S-boxes are an advanced concept in modern cryptography, primarily used in the
design of cryptographic algorithms to enhance security and resist cryptanalytic attacks. The
S-box, or substitution box, is a fundamental component of many block ciphers, providing the
non-linearity that is essential for the strength of encryption algorithms. In a typical
cryptographic design, the S-box is a fixed table or function that maps input values to output
values, ensuring confusion within the cipher and making it difficult for attackers to discern
any patterns. However, the concept of active S-boxes introduces the ability for the
substitution process to vary dynamically, depending on certain conditions or inputs, adding
an extra layer of complexity and security to the cipher.
One of the primary advantages of active S-boxes is their adaptability. While traditional S-
boxes are static and do not change during the encryption or decryption process, active S-
boxes are designed to alter their behavior during the encryption process, based on specific
conditions such as the key, round number, or other inputs. This dynamic nature increases the
difficulty of attacking the cipher using methods like differential cryptanalysis or linear
cryptanalysis, which often rely on identifying patterns or exploiting predictable behaviors
within the S-box. By making the substitution process change in response to varying factors,
active S-boxes introduce an element of unpredictability that strengthens the overall resistance
of the cipher.
The mechanism behind active S-boxes can take various forms. One common approach is the
use of a key-dependent S-box, where the substitution table is modified by the encryption key.
This means that different keys would result in different S-boxes, making it significantly more
challenging for attackers to use precomputed tables or exploit known weaknesses in the S-
box design. Additionally, the input values to the S-box can also influence its behavior,
creating a context-sensitive S-box that adapts based on both the key and the data being
10
processed. This further enhances security by introducing additional dependencies that can
obscure any potential attack vectors.
Active S-boxes also find use in the context of ciphers with multiple rounds, where the
substitution step can be modified round by round to introduce further variability. For
instance, the S-box might not be the same in every round of encryption, or its structure could
change based on intermediate results from previous rounds. This round-dependent variation
can effectively thwart attacks that rely on consistency across rounds, such as those used in
differential cryptanalysis, which aims to exploit consistent patterns in data transformations
across multiple rounds of encryption. By varying the S-box between rounds, active S-boxes
make it far more difficult for attackers to predict or reverse the encryption process.
In some designs, active S-boxes are used in combination with other cryptographic techniques,
such as mixing layers, to increase diffusion and confusion. Mixing layers are operations that
combine the outputs of the S-box in ways that further obscure the relationship between the
plaintext and the ciphertext. When combined with active S-boxes, these mixing layers help to
spread the influence of the input data over a wide range of the output, making it harder for
attackers to reverse-engineer the cipher through known plaintext or chosen plaintext attacks.
The overall effect is a more complex cryptographic structure that is harder to analyze and
break. One challenge in the use of active S-boxes is the computational overhead they can
introduce. Traditional S-boxes are relatively efficient to implement, especially in hardware,
because they are fixed and require fewer operations during encryption and decryption. Active
S-boxes, on the other hand, require more sophisticated mechanisms, such as the recalculation
of the substitution table or the introduction of extra steps to handle dynamic changes in the S-
box. This can lead to performance trade-offs, particularly in environments with strict resource
constraints, such as embedded systems or mobile devices. However, despite this overhead,
the added security benefits of active S-boxes often justify the trade-off in scenarios where
high security is paramount.
In addition to improving resistance against differential and linear cryptanalysis, active S-
boxes can also enhance the cipher’s resilience to related-key attacks, which attempt to exploit
relationships between different encryption keys to derive the secret key or compromise the
cipher. In traditional block ciphers, where the S-box remains static across multiple encryption
instances, related-key attacks can sometimes exploit the similarities between the keys. By
introducing variability in the S-box based on key-dependent changes, active S-boxes make it
more difficult for attackers to use these relationships to break the cipher.
11
Active S-boxes have also been explored in stream ciphers, where the goal is to encrypt data
bit by bit or byte by byte, rather than in fixed-size blocks. Stream ciphers are typically used in
applications where low latency and high-speed encryption are critical, such as in secure
communications and wireless systems. By incorporating active S-boxes into the design of
stream ciphers, cryptographers can enhance their security while maintaining performance. In
these cases, the substitution process might be influenced by both the current state of the
cipher and external inputs, adding additional layers of complexity that protect the encrypted
data from a variety of attack methods.
In recent years, research has focused on developing more efficient methods for implementing
active S-boxes, particularly in hardware environments where space, power, and processing
capabilities are often limited. Hardware implementations of cryptographic algorithms must be
optimized for low power consumption and high speed, which presents challenges when using
active S-boxes. Techniques such as using compact lookup tables or implementing the
dynamic substitution process with finite field operations have been explored to balance the
benefits of active S-boxes with the constraints of hardware platforms.
The development of active S-boxes is also influenced by the ongoing trend of quantum
computing and its potential to break many classical cryptographic systems. Quantum
computers are expected to be able to solve problems like integer factorization and discrete
logarithms far more efficiently than classical computers, posing a significant threat to widely-
used cryptographic algorithms like RSA and ECC. Active S-boxes, with their dynamic
nature, might offer a more promising route for post-quantum cryptography, providing a level
of complexity that is difficult to model with quantum algorithms. As quantum computing
advances, the need for cryptographic techniques like active S-boxes that resist quantum
attacks will become even more critical.
1.2 OBJECTIVE
Network security standards and measures are enforced to protect both the data-in-transit
and data-at-rest.
The goal of security mechanisms is to resist the data from unauthorized accessing and
attacks thwart hacking.
12
A data-driven, generalizable approach to evaluate block cipher security using simple
machine learning classifiers rather than deep learning.
This work aims to integrate machine learning classifiers into the cryptographic
evaluation process, providing an innovative method to assess the effectiveness of
lightweight block ciphers. Traditional cryptanalysis methods, such as differential and
linear cryptanalysis, require a deep understanding of the cipher’s structure and are often
computationally intensive. By applying machine learning classifiers, the work explores a
more efficient and automated approach to detect vulnerabilities or weaknesses in the
cipher without requiring exhaustive manual analysis.
Additionally, the study focuses on the use of active S-boxes, a dynamic cryptographic
mechanism that adapts based on certain factors such as the key, round number, or data.
Active S-boxes are incorporated into the cipher design to enhance security and increase
the complexity of cryptanalytic attacks. The research investigates how the incorporation
of active S-boxes can improve the resistance of lightweight block ciphers to various
cryptanalytic techniques and, in turn, how machine learning classifiers can be employed
to evaluate their robustness effectively.
The scope of this work encompasses the evaluation of the security of lightweight
block ciphers, focusing on integrating machine learning classifiers and active S-boxes as key
components of the analysis. Lightweight block ciphers, which are specifically designed to
operate efficiently on resource-constrained devices, are gaining importance in modern
cryptography due to the growing demand for secure communication in environments with
limited computational power, memory, and bandwidth, such as IoT devices, embedded
systems, and low-power mobile applications. This work aims to evaluate the resilience of
these ciphers against common cryptographic attacks, including differential and linear
cryptanalysis, by leveraging machine learning techniques and enhanced S-box designs.
Machine learning classifiers are employed to assess the security of the cipher, offering a
potentially automated and scalable way to identify vulnerabilities or weaknesses without the
need for traditional exhaustive cryptanalysis. By training classifiers on data generated from
cipher executions, this work intends to explore the ability of machine learning models, such
as decision trees, support vector machines, or neural networks, to detect weaknesses in the
13
cipher’s design or its implementation. These classifiers will be tested and evaluated to
determine how well they can differentiate between secure and insecure cipher structures,
highlighting patterns or features that indicate susceptibility to cryptanalytic attacks.
The use of active S-boxes introduces another layer of complexity and security into the
cipher's design. Active S-boxes are dynamic substitution functions that vary based on the
encryption key, round numbers, or other factors during the encryption process. Their
inclusion aims to increase the cipher’s resistance to attacks by introducing non-linearity that
adapts during encryption, making it harder for cryptanalysts to exploit weaknesses. The study
explores how machine learning classifiers can effectively evaluate the security impact of
incorporating such active components, examining whether they enhance the cipher’s
robustness or introduce new vulnerabilities.
Challenges
Several challenges arise in the execution of this work, stemming from both the cryptographic
domain and the machine learning techniques used in the evaluation process. Some of the key
challenges include:
1. Designing Lightweight Ciphers for Machine Learning Analysis: Developing
lightweight block ciphers that are both efficient in terms of computation and memory
usage, while also being secure enough for rigorous machine learning evaluation, is a
delicate balance. Lightweight ciphers are inherently designed to be fast and compact,
but this often means they rely on simplified cryptographic structures that may be more
vulnerable to certain types of attacks. The challenge is to create cipher designs that
provide a meaningful dataset for machine learning analysis without sacrificing their
lightweight nature.
2. Data Generation and Quality: Machine learning classifiers rely heavily on high-
quality training data. For effective evaluation of lightweight ciphers, vast amounts of
ciphertexts and corresponding known plaintexts must be generated. Generating this
data requires robust and efficient methods for cipher implementation. Additionally,
ensuring that the dataset reflects various cryptographic weaknesses or vulnerabilities
is crucial. Inaccurate or unrepresentative data could lead to misleading conclusions
about the cipher’s security.
3. Machine Learning Model Selection: Choosing the appropriate machine learning
classifier and fine-tuning its parameters is another significant challenge. There are
numerous types of machine learning models, each with its own advantages and
14
limitations in terms of security evaluation. For instance, decision trees might offer
interpretability but may struggle with complex non-linear relationships, while neural
networks may excel at recognizing such patterns but are more computationally
intensive. Finding the most effective model for evaluating the specific characteristics
of lightweight block ciphers, and determining how well it generalizes across different
cipher designs, is an ongoing challenge.
4. Evaluating Cipher Resistance to Cryptanalysis: Assessing the security of
lightweight ciphers against traditional cryptanalysis methods, such as differential and
linear cryptanalysis, is a complex task. These cryptographic techniques rely on
analyzing how differences in input affect the output of the cipher. Introducing active
S-boxes adds further complexity because it changes the behavior of the cipher
depending on the encryption context. Evaluating how well machine learning
classifiers can detect vulnerabilities in the presence of these dynamic components
presents an added layer of difficulty.
5. Computational Overhead: While lightweight ciphers are designed to be
computationally efficient, introducing machine learning analysis could impose
additional computational overhead. Training and testing machine learning models on
large datasets generated by multiple rounds of encryption can be resource-intensive,
especially when the models are complex, such as deep neural networks.
6. Security of Active S-Boxes: The integration of active S-boxes into lightweight
ciphers introduces new possibilities for enhancing security, but it also raises questions
regarding their potential weaknesses. Although active S-boxes increase non-linearity,
which is crucial for thwarting many types of attacks, they could also introduce new
vulnerabilities if not carefully designed. Ensuring that active S-boxes do not create
exploitable patterns is a critical challenge. Moreover, understanding how the dynamic
behavior of active S-boxes influences the overall strength of the cipher against
advanced attacks requires thorough testing and evaluation.
15
1. Differential Cryptanalysis: Differential cryptanalysis is one of the most effective
attack strategies for evaluating block ciphers. It examines the propagation of
differences in the plaintext through the cipher’s structure and tries to find correlations
between the differences in input and output. Differential cryptanalysis is particularly
useful for assessing the strength of the S-boxes within a cipher, as these play a critical
role in non-linearity. Lightweight block ciphers are often more vulnerable to this type
of attack due to their relatively simple and compact structure.
3. Brute Force Attacks: In some cases, particularly where a cipher uses short key
lengths, brute-force attacks are a viable evaluation technique. This method involves
trying every possible key combination to decrypt the ciphertext, making it effective
against ciphers with smaller key spaces but ineffective against strong encryption
standards like AES.
4. Key Recovery and Related-Key Attacks: Key recovery attacks focus on recovering
the encryption key by analyzing the behavior of the cipher under different conditions,
such as slight modifications to the key (related-key attacks). These methods are often
used to evaluate whether a cipher’s key schedule or its key-dependent operations
introduce vulnerabilities.
16
approach that can adapt to the evolving landscape of cryptographic threats and lightweight
cipher designs.
• The main objective of this proposed work is to provide an interesting application
model offered as service based data protection.
• The proposed machine learning-based method evaluates block cipher security based
on the number of active S-boxes, a metric used to measure resistance against
differential or linear cryptanalysis
• This could be possible with the strong cryptographic schemes with strong key
generation mechanism.
• The application service, constructed in this work consists of three different
cryptographic algorithms with optimized key generations.
Chapter 1 provides a formal introduction and overview of the project. Chapter 2 reviews
relevant literature. Chapter 3 details the methodology of the existing system.
17
CHAPTER 2
LITERATURE REVIEW
A literature survey is an essential part of any research work, as it provides an overview of the
existing body of knowledge related to the topic, helps identify gaps in the current research,
and outlines the methodologies and approaches used by other researchers. In the context of
evaluating the security of lightweight block ciphers using machine learning classifiers and
active S-boxes, the literature survey focuses on several key areas: lightweight cryptography,
cryptanalysis techniques, machine learning applications in cryptography, and the use of
dynamic cryptographic components like active S-boxes. The following overview outlines the
current state of research in these areas, with a focus on how they relate to the proposed
system.
Lightweight block ciphers have gained significant attention in recent years due to the
growing demand for cryptographic algorithms that can operate efficiently in resource-
constrained environments such as IoT devices, mobile applications, and embedded systems.
These devices have limited processing power, memory, and battery life, making traditional
cryptographic algorithms like AES unsuitable for many use cases. As a result, lightweight
block ciphers are designed to be compact and efficient while still offering strong security
guarantees.
Several lightweight block cipher designs have been proposed in the literature, such as
Present, Klein, Sparx, and Midori. These ciphers are designed to balance security and
performance, typically by using small block sizes (e.g., 64 bits) and smaller key lengths (e.g.,
80 bits). The majority of the research on lightweight ciphers focuses on optimizing the
balance between efficiency and security, with an emphasis on minimizing the number of
rounds, operations, and memory usage. Present, for instance, is one of the most widely
studied lightweight ciphers, praised for its simplicity and speed but also analyzed for
potential vulnerabilities, particularly to differential and linear cryptanalysis.
18
In the context of lightweight ciphers, a significant area of research is understanding the trade-
offs between the strength of the cipher and the limited resources available on devices. Many
researchers have used traditional cryptanalysis techniques, such as differential and linear
cryptanalysis, to assess the security of these lightweight designs. However, as the field of
cryptography evolves, there is a growing interest in using machine learning techniques to
automate and enhance the evaluation of these ciphers, as discussed in the following section.
Differential Cryptanalysis: This is one of the most common methods used to evaluate
lightweight block ciphers. Researchers have used differential cryptanalysis to assess
the resistance of lightweight ciphers to attacks that involve analyzing how differences
in plaintext propagate through the cipher. Some lightweight ciphers have been found
vulnerable to differential cryptanalysis if their S-boxes or other components lack
sufficient non-linearity.
Brute Force and Exhaustive Search: Brute-force attacks, where all possible keys are
tried to decrypt the ciphertext, are a basic evaluation tool but are often not practical
for strong ciphers with large key sizes. Lightweight ciphers, however, often employ
smaller key sizes, making them more susceptible to brute force attacks.
Despite the widespread use of these traditional methods, they are not always efficient or
scalable when dealing with large sets of ciphers or complex cipher designs. As cryptanalytic
19
techniques become more advanced, the need for automated and scalable approaches, such as
machine learning-based analysis, has become increasingly important. This brings us to the
next section, where machine learning techniques have been applied to cryptanalysis.
Machine learning (ML) has recently emerged as a powerful tool for cryptanalysis, offering
the potential to automate and accelerate the process of identifying weaknesses in
cryptographic algorithms. Unlike traditional cryptanalysis methods that rely heavily on
human insight and manual testing, machine learning algorithms can be trained on large
datasets to automatically recognize patterns in the cipher’s behavior, identify vulnerabilities,
and even recover encryption keys.
In the context of lightweight block ciphers, machine learning has been used in several ways:
Key Recovery: Researchers have trained machine learning models, especially deep
neural networks (DNNs) and support vector machines (SVMs), to recover
cryptographic keys. These models analyze ciphertext and associated plaintext pairs to
identify statistical patterns that can be used to determine the encryption key. Machine
learning-based key recovery attacks have shown promise in attacking lightweight
ciphers, where traditional techniques may not be as effective.
20
Efficient Attacks: Machine learning has also been used to find more efficient
cryptanalytic attacks. Rather than relying on exhaustive search or brute-force
techniques, machine learning models can identify weak areas in a cipher’s design
much more quickly, helping researchers focus their efforts on specific areas of the
cipher that are more susceptible to attack.
Active S-boxes represent a dynamic approach to improving the security of block ciphers.
Unlike static S-boxes, which map input values to output values in a fixed way, active S-boxes
change based on parameters such as the encryption key, the round number, or intermediate
results. This dynamic behavior increases the complexity of the cipher and makes it more
resistant to traditional cryptanalytic techniques, such as differential and linear cryptanalysis.
In the literature, several cryptographic algorithms have been proposed that incorporate active
S-boxes or dynamic substitution functions:
Dynamic S-boxes in AES Variants: Some research has proposed modifying the S-
box in AES (Advanced Encryption Standard) to make it dynamic based on key
information or round numbers. These modifications aim to increase the cipher’s
resistance to attacks that rely on analyzing the S-box's behavior.
S-box Mutation: Active S-boxes that mutate between rounds or based on data-
dependent transformations can significantly increase the difficulty of cryptanalysis.
The research shows that incorporating mutation or dynamic adjustments into the
cipher can thwart differential and linear cryptanalysis, as it disrupts the static behavior
that these attacks rely on.
21
While active S-boxes hold promise for enhancing cipher security, they introduce new
challenges in terms of implementation and analysis. For instance, the dynamic nature of
active S-boxes complicates the evaluation of the cipher’s resistance to attacks. Furthermore,
the effect of these dynamic components on overall cipher performance and efficiency needs
to be carefully evaluated, especially in lightweight ciphers designed for resource-constrained
devices.
The paper focuses on differential attacks, which are commonly used in cryptanalysis to break
encryption algorithms by analyzing the differences between pairs of inputs and their
corresponding outputs. The security margin refers to the difference between the attack's
success rate and the cryptographic system's resistance to such attacks. The paper introduces
new searching strategies for differential attacks, which are aimed at improving the
effectiveness of these attacks by better analyzing the security margins of cryptographic
algorithms
Advantages:
The new statistical analysis methods allow for a more accurate evaluation of how
resistant a cryptographic algorithm is to differential attacks, providing a better
understanding of its security margin
Disadvantages:
22
The paper's focus on differential attacks might overlook other forms of attacks or
vulnerabilities that could also pose a risk to cryptographic systems.
Paper2: A closer look at the security of block ciphers against differential cryptanalysis
The central concept of the paper revolves around understanding how block ciphers perform in
the context of differential cryptanalysis, a type of attack where cryptanalysts attempt to
exploit differences in plaintext pairs to detect weaknesses in the cipher. Differential
cryptanalysis analyzes how differences in input plaintexts can affect the difference in the
corresponding ciphertexts. The aim of the paper is to evaluate and improve the security of
block ciphers against such attacks by scrutinizing their differential characteristics
Advantages
The paper offers a thorough and detailed analysis of how well block ciphers resist
differential cryptanalysis. This is valuable for cryptographers and designers aiming to
create more secure encryption algorithms.
By focusing on real-world block ciphers, the authors provide practical insights into
how specific ciphers can be improved or modified to enhance their resistance to
differential cryptanalysis
Disadvantage
23
Author: N. Mouha, Q. Wang, D. Gu, and B. Preneel
The primary concept of the paper is to apply mixed-integer linear programming (MILP) to
differential and linear cryptanalysis. In classical cryptanalysis, differential and linear attacks
focus on identifying patterns or relationships between input and output differences
(differential) or linear approximations (linear) to break the cipher. The authors introduce
MILP as a tool to model and solve these attacks, allowing for a more systematic and
potentially more efficient search for exploitable weaknesses in cryptographic algorithms
Advantages
Using MILP provides an efficient and systematic way to search for potential weak
points in cryptographic algorithms. The approach can handle large and complex
problems that might be challenging for traditional methods of cryptanalysis.
The MILP approach provides a unified framework for both differential and linear
cryptanalysis, making it easier to model and analyze cryptographic systems using a
single mathematical tool
Disadvantage
Paper 4: Accelerating the search of differential and linear characteristics with the SAT
method
The primary concept behind this paper is to use SAT solvers to accelerate the search for
differential and linear characteristics that are useful in cryptanalysis. In cryptography,
differential cryptanalysis and linear cryptanalysis are techniques used to study how specific
changes in the input (plaintext) affect the output (ciphertext) under a particular encryption
24
function. The search for these characteristics typically involves evaluating many possible
input-output relationships, which can be computationally intensive.
Advantages
The use of SAT solvers significantly speeds up the search for differential and linear
characteristics, which are crucial for breaking cryptographic ciphers. This acceleration
can lead to faster cryptanalysis and potentially expose weaknesses more quickly..
SAT solvers are optimized for searching large spaces, making them particularly well-
suited for the complex problems inherent in cryptanalysis. This method reduces the
time complexity compared to brute-force or less optimized search methods
Disadvantage
While SAT solvers can be efficient, they can also become computationally expensive,
especially for very large and complex problems. As the size of the cipher or the
number of variables increases, the SAT solver may still face significant challenges in
terms of time and resources.
The effectiveness of this approach depends heavily on the performance of the SAT
solver. If the solver is inefficient or unable to handle the problem size, the approach
may not yield faster results compared to traditional methods.
Paper 5: Applying neural networks for simpli ed data encryption standard (SDES)
cipher system cryptanalysis
The central concept of the paper is to apply neural networks (NNs), a class of machine
learning algorithms, to the cryptanalysis of the SDES cipher. The authors focus on using NNs
to learn patterns in the encryption system and to predict or reverse the encryption process
without needing to rely on traditional cryptanalytic techniques (e.g., brute-force or
differential analysis). By training neural networks on input-output pairs (plaintext-ciphertext),
the system attempts to infer the secret key or break the encryption.
25
Advantages
Disadvantage
Neural networks are prone to overfitting, especially when the model is trained on
limited data or is too complex for the given problem. If the network overfits to the
training data, it may fail to generalize to new, unseen ciphertexts or plaintexts.
The main concept behind the paper is the use of deep neural networks (DNNs) to perform
cryptanalysis on DES encryption. Rather than relying on conventional methods like brute
force or cryptanalytic techniques such as differential or linear cryptanalysis, the authors
propose using a deep learning approach to predict or recover the secret key used in DES
encryption. The DNN is trained on input-output pairs, specifically plaintext-ciphertext pairs,
with the goal of learning the complex mappings between them. Once trained, the DNN could
then be used to break DES encryption, either by directly predicting the secret key or by
decrypting the ciphertext.
Advantages
26
Deep neural networks, once trained, can process large datasets very quickly, making
the cryptanalysis process more efficient
DNNs excel at recognizing complex, non-linear patterns in large datasets. This ability
allows them to learn the intricate relationships between plaintext and ciphertext in
DES, which might be difficult for traditional cryptanalysis methods to detect.
Disadvantage
Author: M. M. Alani
The concept behind this paper is to apply neural networks (NNs) to perform cryptanalysis on
DES and Triple-DES (3DES). DES is an older symmetric-key block cipher, and 3DES is an
enhancement that applies DES three times to improve security. Neural networks are machine
learning models capable of recognizing patterns in data. In this context, the neural network is
trained to learn the relationship between plaintext and ciphertext without needing to know the
internal structure of the cipher
Advantages
1. Neural networks can process large datasets quickly once trained. This means that
cryptanalysis can potentially be done faster than using traditional brute-force methods
or exhaustive searches.
27
2. The neural network approach does not require explicit knowledge of the cipher's
internal structure. It learns the mapping from the data itself, making it adaptable to
different ciphers or encryption schemes beyond DES and Triple-DES
Disadvantage
Paper 8: Neural cryptanalysis: Metrics, method ology, and applications in CPS ciphers
Advantages
1. Once trained, neural networks can process large datasets quickly, offering a potential
speed advantage over traditional cryptanalysis techniques (such as brute force or
differential analysis).
28
2. The neural network-based cryptanalysis approach is adaptable to a wide range of
encryption algorithms, including not only traditional ciphers but also CPS ciphers,
which may incorporate unique features and security requirements
Disadvantage
Paper 9: Analysis of lightweight block cipher FeW on the basis of neural network
The concept of this paper is to use neural networks (NNs) to analyze and potentially break the
FeW cipher, which is a lightweight block cipher. Lightweight ciphers are designed to have
minimal hardware and software requirements, making them suitable for low-power devices,
but this can also make them vulnerable to attacks. The authors aim to investigate whether
machine learning, particularly neural networks, can be used to uncover vulnerabilities or
weaknesses in FeW by learning patterns in the cipher's behavior. Neural networks are applied
to cryptanalysis to analyze how well the FeW cipher can resist this form of attack, comparing
its robustness to traditional cryptanalysis methods.)
Advantages
Neural networks excel at processing and analyzing large datasets. Once trained, the
network can quickly process new ciphertexts and either predict corresponding
plaintexts or recover the encryption key, which can be faster than traditional methods
that require exhaustive search techniques
Disadvantage
29
could be a limiting factor, especially when working in environments with limited
computational resources (e.g., IoT devices).
Paper 10: Neural net work based analysis of lightweight block cipher PRESENT
concept
The primary concept explored in the paper is using neural networks for cryptanalysis of the
PRESENT cipher. The PRESENT cipher is designed to be computationally efficient, making
it well-suited for use in devices with limited computational resources, but this also opens the
possibility of potential vulnerabilities. The authors investigate how machine learning,
particularly neural networks, can be leveraged to analyze this cipher. By training the neural
network to recognize patterns in the relationship between plaintext and ciphertext, the goal is
to determine whether the network can successfully break the cipher or recover the encryption
key
Advantages
Neural networks can model non-linear relationships between plaintext and ciphertext,
making them capable of learning complex patterns in encryption processes. This
enables the network to break the cipher even without explicitly knowing the
underlying cryptographic functions.
Neural networks trained on the PRESENT cipher may also be adaptable to other
lightweight ciphers
Disadvantage
30
Paper11: Neural Cryptanalysis of Classical Ciphers
The authors apply neural networks to classical ciphers, where the network is trained to learn
the cryptographic transformations. By feeding known ciphertexts and corresponding
plaintexts, the neural network attempts to model the cipher's structure and reverse-engineer
the encryption function.
Advantages
This method can scale to handle large volumes of encrypted data and can potentially
detect the encryption method for a broad range of algorithms, reducing the time and
effort required for traditional cryptanalysis.
By focusing on statistical features and not the specifics of the encryption algorithm
itself, this approach is adaptable to a variety of encryption schemes.
Disadvantages
For the machine learning model to work effectively, a significant amount of labeled
ciphertext (paired with the corresponding encryption method) is needed for training.
In cases where the ciphertext does not exhibit clear or distinctive statistical patterns,
or where similar encryption algorithms are used (such as ciphers that use similar
padding or block modes), the model may struggle to differentiate between algorithms
accurately.
31
plausible plaintexts from ciphertexts, while the discriminator tries to distinguish between real
and generated plaintexts.
Advantages
Disadvantages
1. The adversarial process can often lead to instability, where either the generator or
discriminator fails to improve effectively. This can make training time-consuming and
potentially less reliable, especially when applied to real-world ciphers that might have
complex structures.
2. While the approach works well for certain types of ciphers, its generalization across
all cipher classes is not guaranteed.
Paper 13: Using Machine Learning Technologies for Carrying Out Statistical Analysis
of Block Ciphers
Author: A. Perov
The paper utilizes machine learning to analyze block ciphers by first extracting statistical
features from the ciphertexts. This can include looking for patterns, correlations, or biases in
the output that could reveal information about the cipher structure or key. These features are
then used to train machine learning models (such as classifiers or regressors) to distinguish
between different cipher properties or predict key-related information
Advantages
32
Machine learning, especially deep learning, can uncover subtle and non-obvious
patterns in ciphertexts that might go unnoticed using traditional statistical methods.
Disadvantages
1. If the dataset is too small or not representative of all possible ciphertext variations, the
model may not generalize well to new ciphers or cipher variations.
2. Machine learning models, especially deep learning models, can often function as
"black boxes," meaning they can provide accurate results but don't easily explain how
they arrived at those results.
The authors propose an approach where the first step is to extract distinctive features from the
ciphertext. These features could include statistical properties like entropy, correlation,
distribution of byte values, or patterns in the ciphertext structure that are characteristic of
different encryption algorithms. This step is essential for distinguishing between different
types of ciphers based on their output patterns.
Advantages
This approach automates the process of determining the encryption algorithm used,
which is useful in scenarios where the algorithm is unknown or where multiple
algorithms could be in use. This capability can significantly streamline cryptanalysis
efforts, saving time and effort compared to manual identification.
Disadvantages
The ability of the method to correctly identify the encryption algorithm relies on the
quality and completeness of the ciphertext. In cases where the ciphertext is partially
corrupted, truncated, or lacks sufficient structure (for example, ciphertexts with
33
padding schemes or ciphertexts that have been further processed), the features
extracted may be unreliable, leading to incorrect algorithm identification.
Once the features are extracted, the authors use machine learning algorithms, such as decision
trees, support vector machines (SVM), or neural networks, to build a classification model.
This model is trained on labeled datasets (ciphertexts along with known encryption methods)
to learn how different encryption algorithms map to specific patterns in ciphertext. After
training, the model can classify previously unseen ciphertext and identify the encryption
method used.
Advantages
This method can scale to handle large volumes of encrypted data and can potentially
detect the encryption method for a broad range of algorithms, reducing the time and
effort required for traditional cryptanalysis.
By focusing on statistical features and not the specifics of the encryption algorithm
itself, this approach is adaptable to a variety of encryption schemes
Disadvantages
1. For the machine learning model to work effectively, a significant amount of labeled
ciphertext (paired with the corresponding encryption method) is needed for training.
2. In cases where the ciphertext does not exhibit clear or distinctive statistical patterns,
or where similar encryption algorithms are used (such as ciphers that use similar
padding or block modes), the model may struggle to differentiate between algorithms
accurately.
The authors use deep learning models, specifically convolutional neural networks (CNNs) or
other neural architectures, to automatically extract features from the ciphertext. These models
are capable of learning hierarchical patterns in data, which is useful for identifying complex
34
and subtle statistical characteristics in ciphertexts that may indicate which encryption
algorithm was used. This eliminates the need for manually selecting and engineering features
Advantages
Deep learning techniques, particularly CNNs, can automatically learn the most
relevant features from ciphertexts without requiring expert intervention or manual
feature engineering.
Deep learning models, due to their multi-layered structure, are excellent at detecting
complex and non-linear relationships in the data.
Disadvantages
Deep learning models typically require large amounts of labeled training data to
perform well.
Training deep learning models, particularly CNNs, requires significant computational
resources, including powerful GPUs and considerable training time.
After extracting features, the authors apply clustering techniques (such as K-means or
hierarchical clustering) to group similar ciphertexts together based on their extracted features.
The assumption is that ciphertexts encrypted using the same cryptographic algorithm will
exhibit similar statistical properties and therefore cluster together. Once the clusters are
formed, each group can be associated with a specific cryptographic algorithm, helping to
identify the encryption scheme used for unknown ciphertexts.
Advantages
35
2. Clustering techniques can handle large datasets efficiently, which is beneficial when
analyzing vast amounts of ciphertext.
Disadvantages
After extracting the ASCII code statistics (such as frequency distributions, entropy, or
other byte-level characteristics), the next step is to use these features for classification.
Typically, machine learning techniques (such as decision trees, support vector
machines, or neural networks) are employed to classify ciphertext based on the
statistical properties of the ASCII codes. The model is trained using known examples
of ciphertexts encrypted with various cryptographic algorithms, allowing it to
generalize and predict the encryption method for new, unknown ciphertexts
Advantages
Disadvantages
If the attacker has access to a significant amount of ciphertext encrypted with the
same algorithm, the ASCII statistical patterns may become less effective due to
potential attacks exploiting known weaknesses in the ciphertext structure.
36
Paper 19: Finding the Differential Characteristics of Block Ciphers with Neural
Networks
The authors utilize neural networks to model and identify differential characteristics in block
ciphers. The neural network is trained to learn how specific differences in plaintext affect the
corresponding differences in ciphertext across various rounds of the cipher. Essentially, the
network attempts to find patterns in how the cipher behaves when given specific inputs with
known differences, which is critical in attacks like differential cryptanalysis.
Advantages
The neural network can potentially uncover subtle differential characteristics of block
ciphers that would be challenging or time-consuming for a human analyst to identify
manually.
The same architecture could be adapted and retrained for various cipher algorithms,
making the approach more flexible and scalable.
Disadvantages
1. The effectiveness of neural networks heavily relies on the quality and quantity of
training data.
2. This lack of transparency can limit trust in the results and hinder the identification of
precise cryptographic vulnerabilities.
The authors focus on applying machine learning models, such as deep neural networks and
decision trees, to recognize and exploit patterns in cryptographic algorithms. Specifically,
they aim to identify weaknesses in the cipher's structure, such as the relationship between
input and output bits, and leverage this knowledge to perform cryptanalysis. This could
involve learning correlations in the ciphertext that are not easily discernible through
traditional analysis.
37
Advantages
1. Machine learning models can quickly process large datasets of ciphertext, identify
patterns, and generate hypotheses about weaknesses or possible key structures.
Disadvantages
38
CHAPTER 3
SYSTEM DESIGN
39
3.2 Modular Description
The main modules are
3.2.1 Image matrix generation
in this module first select image from different source, then the image will be
categorized. The data will be image or text, the text data converted into image format and
then processed. The width and height of image is checked and resize the image if the size of
image exceeds the system required image size. In visual cryptography the images are handled
like black and white pixels. The selected images are categorized into two types carrier image
and secret image. The images are first histogram based classifies and then the images are
converted into black and white pixel using binarization.
In the binarization process, the binary feature value of a pixel can be determined by a simple
threshold function f with a set threshold. To obtain an approximate appearance probability for
binary values 0 and 1, the median value m of pixels in the same block is an obvious selection
as the threshold. Hence, for each block, the extraction function of pixel (x, y) of n is defined
as follows:
40
The stabilization process is used to balance the number of black and white pixels of an
extracted feature image in each block.
The first major enhancement of the proposed methodology is the use of DWT for feature
extraction from the ciphertexts, intermediate states, and plaintext-ciphertext pairs. By
applying DWT to the cipher data, we can capture a range of features that represent both the
low-level and high-level characteristics of the cryptographic process. Once the lightweight
cipher is executed, the resulting ciphertext will undergo DWT transformation. The
decomposition will break the ciphertext into its low-frequency and high-frequency
components. The low-frequency components typically represent the global features of the
ciphertext, while the high-frequency components capture more detailed and local
characteristics. In ciphers with active S-boxes, the S-box substitution will vary between
rounds based on key-dependent or round-dependent transformations. DWT can be applied to
each intermediate state to extract both fine-grained and global characteristics of the cipher.
These features can help in understanding how the active S-boxes contribute to the overall
cipher security, especially in terms of resistance to differential and linear cryptanalysis. The
DWT method will enrich the feature set used to train machine learning models by introducing
additional features such as wavelet coefficients at different scales. These enriched features
will capture hidden patterns in the data, which can improve the accuracy of the machine
learning classifiers in identifying potential weaknesses or vulnerabilities in the cipher.
After extracting features using DWT, the next step is to train machine learning classifiers
using these enriched features. The goal is to leverage the additional frequency-domain
information provided by DWT to improve the performance of the classifiers and enhance the
accuracy of the cipher's security evaluation. The features obtained from DWT will be used as
inputs for the machine learning models. In addition to individual classifiers, a hybrid model
approach may be explored where multiple machine learning techniques are combined. For
example, an ensemble model that combines the outputs of several classifiers (such as SVMs,
41
decision trees, and neural networks) can be used to improve classification robustness and
accuracy. The different models may capture different aspects of the data, with DWT. The
performance of the classifiers will be evaluated using various metrics such as accuracy,
precision, recall, F1-score, and area under the curve (AUC). Cross-validation will be
employed to ensure that the models generalize well to unseen cipher designs, and the impact
of DWT-enhanced features on the performance of the models will be compared against
traditional feature sets (without DWT).
To obtain the key stream for encrypting an image, the real-valued chaotic sequence
must be converted into an integer sequence. The general process to get the key stream is
shown in Fig. 3. Thus the HCLS must perform at least WH/4 iterations to obtain a key stream
with enough length for encryption. However, the high complexity of the hyperchaotic system
imposes a tradeoff between security and efficiency in a cryptosystem. By introducing a key
schedule method to post-process the key stream, a W × H key matrix can be quickly obtained,
Similar to most CBC based diffusion algorithms, an initial vector is required in the proposed
encryption algorithm to start diffusion. However, the initial vector for the vectorized
diffusion process is longer than that for existing algorithms, consequently increasing the
storage and transmission costs. As the LM can rapidly produce many random numbers from
few initial values, we use it to generate the required initial vector as follows:
Step 1: Input z(1), then iterate the LM pre3 times to overcome the transient effect.
Step 3: Continue to iterate the LM W times and fill new state values into V.
Step 4: Transform real-valued sequence V into the initial vector IV1 consisting of integer
numbers by IV1 = floor(V × 1015) mod 256
The original color image is first mixed with the image obtained from the social media
(flicker) by using the flicker ID (flk_ID). Mixing of an image with other image is called
42
image masking. Two hash functions h1 (z) and h2(x, y, z) have been used to create the
flk_ID. These hash functions depend upon the features of the original image. By doing this
first complexity is being applied to the encryption algorithm that makes it more robust against
widespread attacks. After getting the masked image, logistic map is used to shuffle the image
to get the encrypted image. To shuffle the masked image using logistic map, image
subdivision & permutation and pixel shuffling is applied. On this shuffled image hyper chaos
are applied. Image permutation makes the original image prediction little bit confusing
The authenticated user, who has verified with the cloud server generates the Secret Index
from the λ-vectors and sends request to the cloud server by sending the Secret Index to
retrieve the encrypted image. Upon receiving the user’s request, cloud server sends the
λvalues and the encrypted image to the user. After getting the λ-values and encrypted image
from the cloud server, user performs the process of decryption. It consists of two steps: Key
Decryption and Image Decryption. In Key Decryption When user receives the λ-values it will
perform some calculation to generate the key. Key decryption will be done using the λ-
vectors and λ-values from the server by using the following formula, and create the matrix A.
In Image Decryption Decryption will be done by using the keys as in matrix A. Decryption
process is to perform all the operations in reverse.
3.3 Conclusion
In this work, we proposed an innovative approach to evaluating the security of
lightweight block ciphers by integrating Discrete Wavelet Transform (DWT) for feature
extraction and machine learning classifiers for security analysis. The use of DWT enhances
the cipher analysis by capturing both high- and low-frequency components of the encrypted
data, providing a more detailed and comprehensive feature set compared to traditional
methods. By incorporating DWT, subtle cryptographic weaknesses that might otherwise go
unnoticed in the time domain can be detected, significantly improving the accuracy of the
security evaluation. However, while the proposed methodology significantly enhances the
evaluation process, it also opens up avenues for future research. This includes exploring
different wavelet transforms, refining feature extraction methods, improving classifier
43
performance with more diverse datasets, and expanding the range of lightweight ciphers
covered by the analysis. Additionally, new attack vectors and the constant evolution of
cryptanalysis techniques will continue to push the boundaries of security, making it
imperative to continuously adapt and improve evaluation methods. In conclusion, the
integration of DWT and machine learning classifiers provides a powerful tool for security
assessment, offering a more thorough, accurate, and scalable evaluation of lightweight block
ciphers. This approach paves the way for stronger cryptographic standards and improved
resilience against attacks in the era of resource-constrained devices and next-generation
cryptography.
44
REFERENCES
[1] J. Chen, J. Teh, Z. Liu, C. Su, A. Samsudin, and Y. Xiang, ``Towards accurate statistical
analysis of security margins: New searching strategies for differential attacks,'' IEEE Trans.
Comput., vol. 66, no. 10, pp. 1763_1777, Oct. 2017.
[2] N. Mouha, Q. Wang, D. Gu, and B. Preneel, ``Differential and linear cryptanalysis using
mixed-integer linear programming,'' in Information Security and Cryptology. Berlin,
Germany: Springer, 2012, pp. 57_76.
[3] R. Ankele and S. Kölbl, ``Mind the gap_A closer look at the security of block ciphers
against differential cryptanalysis,'' in Selected Areas in Cryptography. Cham, Switzerland:
Springer, 2019, pp. 163_190.
[4] L. Sun, W. Wang, and M. Wang, ``Accelerating the search of differential and linear
characteristics with the SAT method,'' IACR Trans. Symmetric Cryptol., vol. 12, pp. 269_315,
Mar. 2021.
[5] K. Alallayah, M. Amin, W. AbdElwahed, and A. Alhamamii, ``Applying neural networks
for simpli_ed data encryption standard (SDES) cipher system cryptanalysis,'' Int. Arab J. Inf.
Technol., vol. 9, no. 2, pp. 163_169, 2012.
[6] A. Mundra, S. Mundra, J. S. Srivastava, and P. Gupta, ``Optimized deep neural network
for cryptanalysis of DES,'' J. Intell. Fuzzy Syst., vol. 38, no. 5, pp. 5921_5931, May 2020.
[7] M. M. Alani, ``Neuro-cryptanalysis of DES and triple-DES,'' in Neural Information
Processing. Berlin, Germany: Springer, 2012, pp. 637_646.
[8] Y. Xiao, Q. Hao, and D. D. Yao, ``Neural cryptanalysis: Metrics, methodology, and
applications in CPS ciphers,'' in Proc. IEEE Conf. Dependable Secure Comput. (DSC), Nov.
2019, pp. 1_8.
[9] A. Jain and G. Mishra, ``Analysis of lightweight block cipher FeW on the basis of neural
network,'' in Harmony Search Nature Inspired Optimization Algorithms. Singapore: Springer,
Aug. 2018, pp. 1041_1047.
[10] G. Mishra, S. V. S. S. N. V. G. K. Murthy, and S. K. Pal, ``Neural network based
analysis of lightweight block cipher PRESENT,'' in Harmony Search and Nature Inspired
Optimization Algorithms. Singapore: Springer, Aug. 2018, pp. 969_978.
[11] R. Focardi and F. L. Luccio, ``Neural cryptanalysis of classical ciphers,'' in Proc. ICTCS,
2018, pp. 104_115.
45
[12] A. N. Gomez, S. Huang, I. Zhang, B. M. Li, M. Osama, and L. Kaiser, ``Unsupervised
cipher cracking using discrete GANs,'' 2018, arXiv:1801.04883. [Online]. Available:
[Link]
[13] A. Perov, ``Using machine learning technologies for carrying out statistical analysis of
block ciphers,'' in Proc. Int. Multi-Conf. Eng., Comput. Inf. Sci. (SIBIRCON), Oct. 2019, pp.
853_856.
[14] C. Tan and Q. Ji, ``An approach to identifying cryptographic algorithm from ciphertext,''
in Proc. 8th IEEE Int. Conf. Commun. Softw. Netw. (ICCSN), Jun. 2016, pp. 19_23.
[15] K. V. Pradeepthi, V. Tiwari, and A. Saxena, ``Machine learning approach for analysing
encrypted data,'' in Proc. 10th Int. Conf. Adv. Comput. (ICoAC), Dec. 2018, pp. 70_73.
[16] S. Pamidiparthi and S. Velampalli, ``Cryptographic algorithm identi_- cation using deep
learning techniques,'' in Evolution in Computational Intelligence. Singapore: Springer, Sep.
2020, pp. 785_793.
[17] V. Tiwari, K. V. Pradeepthi, and A. Saxena, Identi_cation of Cryptographic Algorithms
Using Clustering Techniques, K. S. Raju, A. Govardhan, B. P. Rani, R. Sridevi, and M. R.
Murty, Eds. Singapore: Springer, 2020.
[18] W. Zhang,Y. Zhao, and S. Fan, ``Cryptosystem identi_cation scheme based on ASCII
code statistics,'' Secur. Commun. Netw., vol. 2020, pp. 1_10, Dec. 2020.
[19] R. Alshammari and A. N. Zincir-Heywood, ``Machine learning based encrypted traf_c
classi_cation: Identifying SSH and Skype,'' in Proc. IEEE Symp. Comput. Intell. Secur.
Defense Appl., Jul. 2009, pp. 1_8.
[20] A. M. B. Albassal and A.-M.-A. Wahdan, ``Neural network based cryptanalysis of a
feistel type block cipher,'' in Proc. Int. Conf. Electr., Electron. Comput. Eng., Sep. 2004, pp.
231_237.
[21] A. G. Bafghi, R. Safabakhsh, and B. Sadeghiyan, ``Finding the differential
characteristics of block ciphers with neural networks,'' Inf. Sci., vol. 178, no. 15, pp.
3118_3132, Aug. 2008.
[22] A. Gohr, ``Improving attacks on round-reduced speck32/64 using deep learning,'' in
Advances in Cryptology. Cham, Switzerland: Springer, 2019, pp. 150_179.
[23] A. Benamira, D. Gerault, T. Peyrin, and Q. Q. Tan, ``A deeper look at machine learning-
based cryptanalysis,'' in Advances in Cryptology (Lecture Notes in Computer Science).
Cham, Switzerland: Springer, 2021, pp. 805_835.
46
[24] M. F. Idris, J. S. Teh, J. L. S. Yan, and W.-Z. Yeoh, ``A deep learning approach for
active S-box prediction of lightweight generalized feistel block ciphers,'' IEEE Access, vol. 9,
pp. 104205_104216, 2021.
[25] A. Baksi, J. Breier, Y. Chen, and X. Dong, ``Machine learning assisted differential
distinguishers for lightweight ciphers (extended version),'' Cryptol. ePrint Arch., Tech. Rep.
2020/571, Dec. 2020. [Online]. Available: [Link]
[26] J. So, ``Deep learning-based cryptanalysis of lightweight block ciphers,'' Secur.
Commun. Netw., vol. 2020, pp. 1_11, Jul. 2020.
[27] L. R. Knudsen, ``Truncated and higher order differentials,'' in Fast Soft- ware
Encryption. Berlin, Germany: Springer, 1995, pp. 196_211.
[28] T. Suzaki and K. Minematsu, ``Improving the generalized feistel,'' in Fast Software
Encryption. Berlin, Germany: Springer, 2010, pp. 19_39.
47