Assign Cse406 Autumn23
Assign Cse406 Autumn23
Feistel ciphers, like the one used by DES, split data into two parts and subject each half to a
number of rounds of substitution and permutation operations.
DES employs sixteen distinct keys, one for every encryption cycle. Bits are moved and selected
in a complex process to create these special keys from the main key.
Feistel Network
Block ciphers are cryptographic techniques that use a Feistel Network structure to generate
encrypted and decrypted data blocks of a set length. A well-known example of a block cipher is
DES, which encrypts and decrypts 64-bit data blocks with a 56-bit key by means of a Feistel
Network.
Eight unique boxes in DES known as "S-boxes" convert 6-bit inputs into 4-bit outputs. The input
bits determine which entry to use in each S-box, which is similar to a small table with 64 entries.
To retrieve a value from an S-box, follow these steps:
● Examine the first six bits of the input to determine which S-box is correct.
● Divide the remaining six bits into two groups: the middle four bits, or inner bits, and the
first and last bit, or outer bits.
● To determine the row and column in the S-box, use the outer and inner portions,
respectively.
● To determine the output, look at the value where the row and column converge.
Strengths of DES
Before AES took its place, the Data Encryption Standard, or DES, was a popular symmetric-key
block cipher for communication and data security. A few of DES's advantages are:
● Since this algorithm only needs to perform simple operations like joining, splitting, and
XORing data, it can be easily implemented on both computers and devices.
● Because it can use any number of rounds and any kind of round function, it can be
tailored to meet a variety of needs.
● Because it can withstand sophisticated attacks like differential and linear cryptanalysis,
this algorithm is robust and safe.
Vulnerabilities of DES
After a thorough analysis, the Data Encryption Standard (DES) revealed a number of flaws and
vulnerabilities:
● The 56-bit key length of DES left it open to brute-force attacks, where hackers
systematically attempt every conceivable key combination. This susceptibility was
demonstrated in 1999 when researchers successfully cracked a DES key within a day
using a specialized machine.
● Differential cryptanalysis, a method exploiting statistical patterns in encryption, posed an
additional threat to DES. Although pre-release modifications were introduced to mitigate
this risk, they unintentionally reduced the key size, further heightening DES's
vulnerability to various attacks.
● Linear cryptanalysis, discovered in 1990, uncovered yet another weakness in DES.
While demanding a substantial amount of known data, this technique compromised the
algorithm's security.
● In 1997, an exhaustive search attack highlighted a critical vulnerability in DES. This
attack involved a systematic evaluation of all possible key combinations by a computer,
effectively breaching the encryption and underscoring the imperative for a more secure
standard.
Uses of DES
AES has largely replaced Data Encryption Standard (DES), despite the fact that DES is still
regarded as important and influential in the history of cryptography. Many ciphers, including
Triple DES, DES-X, and LOKI89, were inspired by the symmetric-key block cipher DES, which
helped to shape contemporary cryptanalysis techniques and standards.
Some applications still use DES even though it is no longer regarded as secure:
● Random Number Generation: By encrypting a fixed plaintext with a variable key, or the
other way around, DES can be used to produce pseudorandom numbers. This method
makes use of the encryption process's intrinsic randomness.
● Low Security Needs: DES may be adequate in situations where a lower level of
encryption is appropriate, such as in testing grounds, classroom settings, or legacy
systems where it may not be practical or economical to upgrade encryption standards.
● Triple DES: Triple DES is a better option for circumstances requiring increased security.
In comparison to the original DES algorithm, this variant significantly increases overall
security and complexity by employing DES three times sequentially with three different
keys.
AES
Introduction
Advanced Encryption Standard, or AES, is a widely used technique for encrypting
communications and data while utilizing the same key for both encryption and decryption.
The AES protocol was adopted by the US government in 2001 and was created by Belgian
cryptographers Joan Daemen and Vincent Rijmen. Three key sizes are supported by the AES
encryption standard: 128 bits, 192 bits, and 256 bits.
Fig: A flow chart illustrating the AES encryption process, highlighting
the different number of rounds based on key size.
Substitution-Permutation Networks (SPNs)
SPNs function as building blocks for a variety of contemporary encryption techniques, including
AES. They function by constantly switching out and rearranging components in a way that
makes it difficult to break. Because of this intricacy, attackers find it challenging to decipher the
original message. Typically, S-boxes have matching input and output block sizes, commonly 4
or 8 bits. P-boxes aid in distributing the original message's bits, which makes it more difficult to
decipher.
P-boxes always work with the same amount of data, whereas SPNs use different keys each
time they repeat the substitution and mixing steps. This approach enhances security against
various attacks, including differential cryptanalysis. SPNs strike a balance between security and
efficiency, utilizing S-boxes and P-boxes to resist cryptanalysis while allowing for efficient
hardware and software implementations. However, the security of an SPN can be compromised
if its S-boxes or key scheduling algorithm exhibit weaknesses.
1. SubBytes: SubBytes is an AES step in which a special box known as an S-box is used
to replace each data byte with a new one. For every possible 8-bit input, the S-box is a
fixed 8x8 permutation matrix that contains replacement values. Its design incorporates
low correlation, a large avalanche effect, and high nonlinearity as cryptographic features.
For decryption, the S-box can be inverted and remains constant across all rounds and
bytes. In AES, SubBytes searches the unique S-box for the new byte that should replace
each byte in the state matrix. The outcome is a new state matrix in which the S-box is
used to replace each byte.
2. ShiftRows: To strengthen the encryption, the AES ShiftRows step shuffles the bytes in
each row of the data. All rows are moved left by a given number of bytes, with the
exception of the first row, which remains unchanged. This facilitates information
dissemination and increases the difficulty of code cracking by attackers.
3. MixColumns: The AES MixColumns function combines the bytes in each data column
by means of a unique mathematical process known as "linear mixing." This contributes
to the information being further jumbled and strengthening the encryption. Each column
is viewed as a four-term polynomial and multiplied by a constant polynomial inside a
finite field in order to improve the vertical mixing of bytes. The goal of creating a mixing
matrix is to increase the transformation's non-linearity while reducing linear
dependencies. With this predetermined mixing matrix, each column goes through matrix
multiplication.
4. AddRoundKey: Every AES round, an XOR operation is used to combine the data (state
matrix) with a unique round key. The primary encryption key is expanded to create this
round key. Because it changes with each round, the round key adds complexity and is
essential for security. The round key and the state are both the same size (128 bits).
When the data is decrypted, the round keys are arranged in reverse order. Here, the
round key matrix and the state matrix are subjected to a byte-wise XOR operation.
Like a conveyor belt, the AES "engine" repeatedly puts the data through the four processes
listed above. Interpreting the data gets more challenging the more times it is run through. To
further improve security, data is passed through the "engine" multiple times for stronger keys
(larger sizes). While it is not necessary for security in the final round, the MixColumns step is
important for blending the data. As a result, it is left out to increase efficiency.
A secure cipher relies on two essential characteristics: confusion and diffusion, both
accomplished through the substitution-permutation network (SPN) integral to the AES algorithm.
Confusion introduces an intricate and unclear connection between plaintext, ciphertext, and the
encryption key. Even minor alterations to the plaintext or key lead to significantly different
ciphertexts. AES attains confusion by employing S-boxes, executing non-linear byte
substitution. Diffusion disperses the impact of each plaintext and key bit across numerous
ciphertext bits, thwarting attackers from discerning patterns. AES achieves diffusion using P-
boxes, orchestrating byte permutation based on specific patterns. The compounding effects of
multiple rounds of S-boxes and P-boxes in AES make it exceptionally difficult for attackers to
analyze and compromise the cipher.
Implementation Details
1. No Pre-Computation: It entails putting AES into practice without doing any pre-
computation, which means that the S-box and other operations are computed during
encryption. Here, the smallest code size is obtained at the expense of slower
performance. This implementation works well in settings where code storage space is at
a premium.
2. Partial Pre-Computation: Some implementations choose for partial pre-computation,
pre-calculating some steps and computing others, such as the S-box, on the fly. In this
case, code size and performance enhancement are balanced. Performance is better
than when there is no pre-computation, and the code size is moderate. It works well in
settings where code storage takes up a moderate amount of room.
3. Full Pre-Computation: AES must first construct all of the necessary tools, such as the
S-box, before it can begin encryption. We refer to this as "full pre-computation."
Significant performance gains are achieved during encryption because tables are pre-
computed for effective lookup. However, the larger code size as a result of storing
precomputed tables is the trade-off. Since table look-ups are necessary for operations, it
provides the best performance. It works well in settings where there is plenty of room to
store code.
AES-NI
Since the Westmere processors, Intel has incorporated a feature known as AES-NI, which
significantly accelerates encryption. This feature is far more efficient because it makes use of
unique instructions created for AES encryption.
● Using three functions and XORing with the round key, aesenc implements a single
round of AES.
● The final iteration of AES is implemented by aesenclast without the MixColumns phase.
● The aeskeygenassist instruction, which facilitates AES key generation, is also present
in Intel processors. It produces round keys for every round in the key expansion
algorithm.
The AES states' 128-byte registers are used to call aesenc and aesenclast. The full AES
encryption process is finished by running aesenc nine times and aesenclast once.
When utilizing these instructions as opposed to implementing AES without them, Intel claims a
notable speedup of up to fourteen times. There is no need for external instructions because the
operations are carried out inside the processor. Similar instructions have been implemented in
other processor architectures, such as AMD's Bulldozer.
Strengths of AES
Among AES's advantages are:
● Conveniently, AES uses the same key to encrypt and decrypt data quickly and
effectively.
● Longer key lengths (128, 192, or 256 bits) make AES even more secure since they are
more difficult to crack.
● AES is acknowledged for its dependability and adherence to governmental regulations
as an algorithm that has been approved by the FIPS.
● Because AES is compatible with both software and hardware, it can be easily adjusted
to a wide range of environments and platforms.
Vulnerabilities of AES
Although widely used and thought to be secure, the AES encryption algorithm has some
drawbacks:
1. In a brute force attack, each and every possibility is explored until the secret key is
discovered. However, because it takes a lot of time and resources to break longer keys,
this is only practical for very short keys.
2. Side-channel attacks take advantage of the encryption or decryption device's physical
characteristics, including timing, electromagnetic radiation, power consumption, etc.
These attacks have the ability to disclose information about the plaintext or secret key
even when they do not directly target the algorithm.
3. The "biclique attack" is a method of attacking AES that makes use of the structure of the
algorithm to facilitate key cracking. Nevertheless, there isn't much of an advantage to
this attack, and it's not very practical.
These flaws indicate that AES has certain restrictions and issues that need to be resolved rather
than indicating that it is unstable or insecure. Among the potential defenses are:
● Employing larger key sizes—192 or 256 bits, for example—which increase the difficulty
of biclique and brute force attacks.
● Employing secure hardware and software implementations—such as masking,
randomization, constant-time execution, etc.—that stop or lessen side-channel attacks.
● Employing secure modes of operation, such as CBC, CTR, GCM, etc. that improves
AES security.
Uses of AES
AES, a widely adopted encryption algorithm, serves to safeguard electronic data from
unauthorized tampering or access. Its applications include:
● Government and Military Usage: AES is used by the US government to safeguard top-
secret data, and other governments are beginning to use it as well to protect classified
information.
● Cloud Storage and Computing: Major cloud service providers like Google Cloud
Platform, Microsoft Azure, and Amazon Web Services rely on AES to encrypt data
stored or processed in the cloud, ensuring the security of customer information.
● Wireless Communication and Networking: Various wireless protocols, including Wi-Fi
Protected Access (WPA) and WPA2, leverage AES to encrypt data transmitted or
received over the air, enhancing the security of wireless network connections.
● Financial Transactions and E-commerce: AES plays a pivotal role in securing
financial transactions and personal information on payment systems and online
platforms. Notable entities such as Visa, Mastercard, and PayPal use AES for online
payment security.
● Cryptographic Libraries and Tools: Implementations of AES are prevalent in
cryptographic libraries and tools across diverse programming languages and platforms.
Popular examples include OpenSSL, Crypto++, and PyCrypto, supporting AES
encryption and decryption.
Key Length DES is known as a short With key sizes ranging from
symmetric-key block cipher 128 to 256 bits, AES is an
because of its 56-bit fixed key adaptable encryption
size. algorithm that allows you to
customize its level of security
to meet your specific
requirements.
Conclusion
This study examines DES and AES, two significant encryption techniques that have had a
significant impact on information security. For many years, DES served as the primary
encryption tool. However, in 2001, AES took its place because of its increased security and
larger key sizes.
AES is a major advancement in encryption that was spearheaded by Joan Daemen and Vincent
Rijmen, two Belgian cryptographers. The Substitution-Permutation Networks (SPNs) that are
implemented using AddRoundKey, MixColumns, SubBytes, and ShiftRows demonstrate their
effectiveness and robustness. Because AES can be made small and fast or large and powerful,
it can be used on a wide range of platforms and devices.
The incorporation of AES-NI instructions into contemporary processors enhances its
performance and guarantees its continued relevance in modern computing. Even when hackers
employ sophisticated tactics, AES is a potent encryption tool that effectively safeguards data.
Financial transactions, cloud storage, and communication can all be secured with it.
Although both DES and AES have had a lasting influence on cryptography, AES is still the
recommended option for modern applications because of its strong defense against a variety of
security risks. In today's ever-changing digital world, cryptographic algorithms such as AES are
essential for protecting sensitive data and are a reflection of continuous efforts to improve global
security.
References
Jharbade, N. K., & Shrivastava, R. K. (n.d.). Network based Security model using Symmetric
Key Cryptography (AES 256– Rijndael Algorithm) with Public. . . ResearchGate.
https://www.researchgate.net/publication/268015338_Network_based_Security_m
odel_using_Symmetric_Key_Cryptography_AES_256-
_Rijndael_Algorithm_with_Public_Key_Exchange_Protocol_Diffie-
Hellman_Key_Exchange_Protocol
Bhat, N., Sridhar, V., & Nn, S. (2012, May 1). FPGA IMPLEMENTATIONS OF ADVANCED
ENCRYPTION STANDARD: A SURVEY. ResearchGate.
https://www.researchgate.net/publication/333894566_FPGA_IMPLEMENTATIONS
_OF_ADVANCED_ENCRYPTION_STANDARD_A_SURVEY
Abu-Faraj, M., Al-Hyari, A., & Alqadi, Z. (2022, March 24). A Complex Matrix Private Key to
Enhance the Security Level of Image Cryptography. Symmetry.
https://doi.org/10.3390/sym14040664
Ahmad, K. (2022, June 20). What Is AES-256 Encryption? How Does It Work? MUO.
https://www.makeuseof.com/what-is-aes-256-encryption-how-does-it-work/
Hougen, A. (2021, May 26). What Is AES Encryption & How Does It Work in 2023? [256-bit
vs 128-bit]. Cloudwards. https://www.cloudwards.net/what-is-aes/
Security, P. (2023, May 8). What Is AES Encryption? - Panda Security. Panda Security
Mediacenter. https://www.pandasecurity.com/en/mediacenter/what-is-aes-
encryption/
Loshin, P., & Cobb, M. (2021, August 20). Data Encryption Standard (DES). Security.
https://www.techtarget.com/searchsecurity/definition/Data-Encryption-Standard
Publications | CSRC. (n.d.). http://csrc.nist.gov/publications
Jena, B. K. (2023, February 9). What Is AES Encryption and How Does It Work?
Simplilearn.com. https://www.simplilearn.com/tutorials/cryptography-tutorial/aes-
encryption
Substitution-permutation network. (2018, January 24). Simple English Wikipedia, the Free
Encyclopedia. https://simple.wikipedia.org/wiki/Substitution-permutation_network
ElBadawy, E. S. A. M., Mokhtar, A., El-Masry, W., & Hafez, A. (2010, January 1). A new
chaos Advanced Encryption Standard (AES) algorithm for data security.
ResearchGate.
https://www.researchgate.net/publication/235801070_A_new_chaos_Advanced_E
ncryption_Standard_AES_algorithm_for_data_security
Szaban, M., & Seredyński, F. (2008, January 1). Designing cryptographically strong S-boxes
with the use of cellular automata. Annales Universitatis Mariae Curie-Skłodowska.
https://doi.org/10.2478/v10065-008-0022-4
Larson, M. (n.d.). What are the Differences Between DES and AES Encryption?
http://info.townsendsecurity.com/bid/72450/what-are-the-differences-between-des-
and-aes-encryption
Security, T. (2022, November 14). AES vs DES Encryption: Why Advanced Encryption
Standard (AES) has replaced DES, 3DES and TDEA. Precisely.
https://www.precisely.com/blog/data-security/aes-vs-des-encryption-standard-
3des-tdea
B. (2019, December 26). Difference Between DES and AES (with Comparison Chart) - Tech
Differences. Tech Differences. https://techdifferences.com/difference-between-
des-and-aes.html
Difference between AES and DES ciphers. (2023, January 24). GeeksforGeeks.
https://www.geeksforgeeks.org/difference-between-aes-and-des-ciphers/
Difference Between DES (Data Encryption Standard) and AES (Advanced Encryption
Standard) - javatpoint. (n.d.). www.javatpoint.com. https://www.javatpoint.com/des-
vs-aes
Oswald, E. (2022, December 16). What Is the Advanced Encryption Standard (AES)? US
News & World Report. https://www.usnews.com/360-reviews/privacy/what-is-
advanced-encryption-standard
Jena, B. K. (2023, February 9). What Is AES Encryption and How Does It Work?
Simplilearn.com. https://www.simplilearn.com/tutorials/cryptography-tutorial/aes-
encryption
Bernstein, C., & Cobb, M. (2021, September 24). Advanced Encryption Standard (AES).
Security. https://www.techtarget.com/searchsecurity/definition/Advanced-
Encryption-Standard
S. (2023, August 1). What Is DES (Data Encryption Standard)? DES Algorithm and
Operation. Simplilearn.com. https://www.simplilearn.com/what-is-des-article