Module 2
Symmetric Ciphers
- Symmetric Encryption is the most basic and old method of encryption. It uses only one key for
the process of encryption and decryption.
- Aka single key encryption.
- It consists of plain text, cipher text, encryption and decryption.
- The symmetric cipher model has block cipher structure, it consists of block ciphers and works
with 16 number of rounds to generate the key value.
- Each and every round, the key will be multiplied with the plain text and we are generating the
nal encrypted cipher text
Data Encryption Standard (DES)
- The input plain text: 64 bit
- Output cipher text: 64 bit
- Main key: 64 bits
- Sub key (generated from main key) : 56 bit
- Round key (generated from sub key): 48 bit
There are a total of 16 di erent rounds in DES algo, so that 16 di keys will be generated.
The plain text to be encrypted is ZMACELN8794201 - too tu
PT: FDB954201368ACE - a lil easier (hexadecimal); key value: 022346688AABCEE2
PT in binary: 1111 1101 1011 1001 0101 0100 0010 0000 0001 0011 0110 1000 1010 1100 1110
DES algo (write in exam)
- DES means Data Encryption Standard.
- It is a block cipher
- 56 bit key length
- Played a signi cant role in data security.
- 64 bit plain text will be converted to 56 bit text and that further will be divided into left half and
right half.
- Similarly, the DES key with the size of 64 bit will be converted to 56 bit through permutation and
then further it’ll be converted to 48 bit round key.
- There are a total of 16 rounds, each round a unique round key will be generated.
- The encrypted text which is in the size of 64 bits is called as 64 bit cipher text.
- The same key will be used both in encryption and decryption. The size of the
sub-key is 56 bits.
- We mentioned that DES uses 56 bit key. The initial key consists of 64 bits,
however, before the DES process, in the starting stage, every 8 bit of the
key is discarded to produce a 56 bit key.
- The discarded bit positions are 8, 16, 24, 32, 40, 48, 56 and 64. Thus the
discarding of every 8 bit of the key produces a 56 bit key from the original
64 bit key
- DES is based on 2 fundamental attributes of cryptography.
- Substitution: achieved by S-Box
- Transposition: achieved by P-Box
- DES consists of 16 steps, each of which is called as round. Each round performs the step of
substitution and transposition.
Step 1: the 64 bit plain text is handed over to an initial permutation (IP function)
Step 2: the initial permutation is performed on the plain text
fi
fi
ff
ff
ff
Step 3: next, the initial permutation produces 2 halves of the permitted block that are said to be
left plain text (LPT) and right plain text (RPT).
Step 4: now each LPT and RPT go through 16 round of encryption process.
Step 5: in the end, LPT and RPT are rejoined and a nal permutation is performed on the
combined block.
Step 6: the result of this process produces 64 bit cipher text.
Block Diagram for level of DES:
Initial Permutation (IP)
- This happens only once and it happens before the rst round and it suggests how the
transposition in IP should proceed.
- The initial permutation replaces the rst bit of original plain text with the 58th bit of original plain
text and the second bit of original plain text with the 58th bit of original plain text so that
through this conversion, 64 bit plain text will be converted to 56 bit plain text
- The 64 bit permuted text is divided into halves which is said to be 32 bit each and it was given
as input to 16 rounds of round key calculation.
- In that process, the following steps are involved:
- Key transformation
- Expansion permutation
- S-Box permutation
- P-Box permutation
- X-OR and swap functions
Key transformations:
- The initial 64 bit key is transformed into 56 bit key by discarding every 8th bit of the initial key.
Thus for each 56 bit key a 48 bit round key will be generated.
- The 56 bit key will be divided into two halves, each half consists of 28 bits, these halves are
circularly shifted by 1 or 2 positions depending on the round.
Expansion Permutation:
fi
fi
fi
- Here, two halves of 32 bit plain texts are given as input. The left half is LPT and right half is
RPT.
- During expansion permutation, the 32 bit of RPT will be expanded to 48 bits.
- Bits are permuted and called as expansion permutation. The 32 bit RPT is divided into 8 blocks
with each block consisting of 4 bits.
- Each 4 bit of the previous step is then expanded to the corresponding 6 bit block. This process
results in expansion as well as permutation of the input bit while creating the output.
- The key transformation process the 56 bit key to 48 bit key.
- The output of expansion permutation is given as input to S-Box where substitution method will
be performed.
- The output of S-Box will be given to input for P-Box where transposition will be performed.
- Further left half key will be X-OR with right half key and generate right cipher text and the initial
right half will be given as input to left half.
- Finally the left half and right half will merge together and generate the cipher text/encrypted text
for DES algo.