What is Expansion Permutation in Cryptography?
Last Updated :
19 Jun, 2024
Cryptography is very vital today especially in the field of Information Technology in the aspect of transmitting information. There are many varied techniques in modern cryptography and one of those widely adopted in many deterministic algorithms is the expansion permutation, which is widely used in numerous block cipher models such as the DES model.
This article focuses on detailing what expansion permutation is and why it is important, the principles of expansion permutation, and its function of achieving secure data encryptions.
What is Expansion Permutation?
Expansion permutation is a process applied in single cryptographic algorithms to increase the sector size of a data block usually from a small size to the larger one. It is mainly employed to establish dependability by making it possible to process the data through the cryptographic function. In the case of DES algorithm, the expansion permutation is used to expand a 32-bit data block into a 48-bit block before the other encryption steps are performed on it.
Key Terminologies
Before diving deeper into expansion permutation, it is essential to understand some primary terminologies used:
- Cryptography: The practice and art of protecting information that is being passed between two parties by coding it in a way that cannot be intercepted easily.
- Block Cipher: One of the types of the symmetric-key cipher that operates in such a manner as to encrypt data in the fixed blocks, also used in the data encryption standard.
- Data Encryption Standard (DES): A popular block cipher algorithm for symmetric keys that processes data in blocks of 64 bits with a key of 56 bits.
- Permutation: The functioning of a transformation in which the parts of something that is arranged in a certain order or sequence are repositioned.
- Expansion: The act of making data larger in size or perhaps in terms of number of units it contains.
- Round: A round is one cycle of the encryption process, this stages include substitution, permutation, and mixing.
RPT expansion permutation table
32
| 1
| 2
| 3
| 4
| 5
| 4
| 5
| 6
| 7
| 8
| 9
|
---|
8
| 9
| 10
| 11
| 12
| 13
| 12
| 13
| 14
| 15
| 16
| 17
|
---|
16
| 17
| 18
| 19
| 20
| 21
| 20
| 21
| 22
| 23
| 24
| 25
|
---|
24
| 25
| 26
| 27
| 28
| 29
| 28
| 29
| 30
| 31
| 32
| 1
|
---|
The Role of Expansion Permutation in DES
In DES algorithm a single 64 bit data block is processed through 16 iteration also termed as round. Some of the steps that are involved in each round are the expansion permutation. Here's a detailed look at how expansion permutation fits into the DES algorithm:
- Initial Permutation (IP): this step involved in positioning of the 64 bits of the plaintext block in a certain sequence.
- Splitting the Block: Permuted block is divided into two 32-bit halves which are called as left-half(L) and right half (R).
- Expansion Permutation: To exploit the differences resulting from the first input addition step, the 32-bit right half (R) is expanded into a 48-bit using the expansion permutation table.
- Key Mixing: Thus having an original block of 56 bits, the block size is extended to 48 bits to which 48 bits of a subkey derived from the original key which is XORed.
- Substitution: 8 bits result of the XOR is divided into eight 6-bit blocks that in turn is replaced by S-boxes to get eight 4-bit blocks.
- Permutation (P-box): Next the permutated 32-bit block is subjected to a P-box substitution.
- Feistel Function: The permuted block is XORed with the left half (L) of the previous round, to form the right half (R).
- Swapping: The left and right halves of the list will be exchanged for the subsequent iterations.
The expansion permutation step makes sure that the right half (R) of the data block is properly combined with subkey, as it adds more security to the encrypted way.
How Expansion Permutation Works?
In the DES algorithm, the expansion permutation is requesting for the increasing of a block of 32 bits to 48 bits by the help of table. This table shows the arrangement of the 48 bit output block which is derived from the 32 bit input block, duplication and permutation of the bits indicated below. The expansion permutation table for DES is as follows:
32-bit Input: E R 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
48-bit Output: 32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 16 17 18 19 20 21 20 21 22 23 24 25 24 25 26 27 28 29 28 29 30 31 32 1
Here is a visual representation of how the 32-bit block is expanded to 48 bits
In this table:
- The groups of bits undergo repetition and reorganization in parallel with the defined loop.
- Originally, the first bit in the 48 different outputs is detected on the 32nd bit of 32 different inputs.
- The second 8 bits of the 48 bits resulting from the encryption are the first 8 bits of the original 32 bits, and so on.
This expansion makes some of the bits a duplicate of the other, making the data safer from cryptographic attacks.
Steps Involved in Expansion Permutation
- Input Block: Begin the mixer with a 32-bit block from the right half (R) of the data.
- Use Expansion Table: You can refer to the expansion permutation table that you have defined above for mapping the each bit of the block of 32 bits with the concerned positions in the block of 48 bits.
- Duplicate and Rearrange: Copy some of these bits and paste them in different places as shown by the.
- Output Block: An output, which is a 48-bit block, is ready for the key mixing step.
Here’s an example to illustrate the process
- 32-bit Input: 11010010101101001101001111010101
- Expansion Permutation
- Take the 32nd bit and place it in the 1st position of the 48-bit block.
- Take the 1st bit and place it in the 2nd position, and so on.
- 48-bit Output: 111010011010010111010010110011101101110110110110
Importance of Expansion Permutation
The expansion permutation step is vital for several reasons:
- Enhances Security: By expanding the bits then permutating the data block the expansion permutation makes it even harder for the attackers to be able to predict the data block and launch the usual attacks.
- Prepares for Key Mixing: Increasing the length to 48 bits means that the data block is XORed with a 48-bit subkey, which is used in DES when it needs to create the necessary thoroughly encrypted data.
- Ensures Thorough Mixing: When some of the bits have been duplicated, it is made certain that each input block influence many blocks of the output block in the process of diffusion and confusion.
Conclusion
In conclusion, Expansion permutation is one of the key features of the DES encryption algorithm being a determinant factor affecting security degree of data. We see the common use of terms and ideas relating to cryptographic algorithms’ utility in secure and efficient encryption. In the larger scheme of things concerning cryptography, the effectiveness of the expansion permutation in increasing the size of the data block as well as the preparation for key mixing further makes this particular permutation relevant. It is seen that these principles of expansion permutation remain important even with the advancement in the concepts of cryptography in formulating the ideal encryption standards.
Similar Reads
What is a Permutation Array in DSA?
A permutation array, often called a permutation or permuted array, is an arrangement of elements from a source array in a specific order different from their original placement. The critical characteristic of a permutation array is that it contains all the elements from the source array but in a dif
7 min read
What is p-box in Cryptography?
P-boxes are permutation boxes which are usually one of the main components of a modern block cipher. They are also known as D-boxes or diffusion boxes. P-boxes are used in the block cipher called the data encryption standard commonly known as DES in cryptography. In this article, we will look into w
5 min read
Cryptography Introduction
Cryptography is the study and practice of techniques for secure communication in the presence of third parties called adversaries. It deals with developing and analyzing protocols that prevents malicious third parties from retrieving information being shared between two entities thereby following th
4 min read
Expansion Slot in Computer
An expansion slot is a bus slot or expansion port found on the motherboard of a computer. It performs as a socket on the motherboard. Basically, it holds expansion cards featured in a computer so that it can use those features for better operationâsay, a video card for better graphics and sound, Eth
8 min read
Transposition Cipher Techniques in Cryptography
Transposition Ciphers are an essential part of cryptography that uses systematic shuffling of plain text characters or bits to secure data by altering their positions based on some defined way or algorithm. Moreover, unlike substitutive codes where different letters substitute others, in these, you
5 min read
What is a Factorial Notation?
Sometimes, to find order, arrangements, or combinations of objects are required. Combinatorics is that branch of mathematics that focuses on the study of counting. So the fundamental counting principle was introduced which states that if one event has m possible outcomes and the second event has n p
3 min read
Implementing next_permutation() in Java with Examples
Given an array or string, the task is to find the next lexicographically greater permutation of it in Java.Examples: Input: string = "gfg" Output: ggf Input: arr[] = {1, 2, 3} Output: {1, 3, 2} In C++, there is a specific function that saves us from a lot of code. Itâs in the header file #include
5 min read
Symmetric Key Cryptography
Symmetrical Key Cryptography also known as conventional or single-key encryption was the primary method of encryption before the introduction of public key cryptography in the 1970s. In symmetric-key algorithms, the same keys are used for data encryption and decryption. This type of cryptography pla
11 min read
Permutation vs Combination
The key differences between Permutation and Combination are as follows:FeaturePermutationCombinationDefinitionArrangement of objects in a specific order.Selection of objects without regard to order.Formula\text{P(n, r)} = \frac{n!}{(n - r)!}\text{C(n, r)} = \frac{n!}{r!(n - r)!}OrderOrder is importa
1 min read
PRG, PRF and PRP in Cryptography
Cryptography is the study and practice of techniques for secure communication in the presence of third parties called adversaries. It deals with developing and analyzing protocols that prevent malicious third parties from retrieving information being shared between two entities thereby following the
2 min read