🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

II SDES example2.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Transcript

Simplified DES (S-DES) By Dr. Ram Mangrulkar KEY GENERATION PROCESS : Straight P Box : P10(3,5,2,7,4,10,1,9,8,6) Bit 1 2 3 4 5 6 7 8 9 10 Position I/P Seq 1 0 1 0 1 0 1 0 1 0 0/p Seq...

Simplified DES (S-DES) By Dr. Ram Mangrulkar KEY GENERATION PROCESS : Straight P Box : P10(3,5,2,7,4,10,1,9,8,6) Bit 1 2 3 4 5 6 7 8 9 10 Position I/P Seq 1 0 1 0 1 0 1 0 1 0 0/p Seq 1 1 0 1 0 0 1 1 0 0 Bit 3 5 2 7 4 10 1 9 8 6 Position 1010101010 - > [p10] -> 11010 01100 Left shift by 1 bit (First part) I/P Seq 1 1 0 1 0 0/p Seq 1 0 1 0 1 o/p : 10101 Left shift by 1 bit (Second part) I/P Seq 0 1 1 0 0 0/p Seq 1 1 0 0 0 o/p : 11000 Compression P-Box (6,3,7,4,8,5,10,9) Bit 1 2 3 4 5 6 7 8 9 10 Position i/p 1 0 1 0 1 1 1 0 0 0 o/p 1 1 1 0 0 1 0 0 Bit 6 3 7 4 8 5 10 9 Position o/p : 1110 0100 (K1) Compression P-Box (6,3,7,4,8,5,10,9) Bit 1 2 3 4 5 6 7 8 9 10 Position i/p 1 0 1 1 0 0 0 0 1 1 o/p 0 1 0 1 0 0 1 1 Bit 6 3 7 4 8 5 10 9 Position o/p : 0101 0011 (K2) Use K1 and K2 for Round 1 and Round 2 respectively. Simplified DES (S-DES) By Dr. Ram Mangrulkar Encryption Process: Step1: Input 8 bit PT (1010 1010) (AA-in Hex) Initial Permutation (IP(2,6,3,1,4,8,5,7)) Bit 1 2 3 4 5 6 7 8 Position i/p 1 0 1 0 1 0 1 0 o/p 0 0 1 1 0 0 1 1 Bit 2 6 3 1 4 8 5 7 Position O/p : 00110011 Step 2: Divide IP into 2 parts: Left Part IP Right Part IP o/p 0 0 1 1 0 0 1 1 Take the 4-bit Right Part, and perform Expansion Permutation (Ep) (4,1,2,3,2,3,4,1): Bit 1 2 3 4 5 6 7 8 Position i/p 0 0 1 1 o/p 1 0 0 1 0 1 1 0 Bit 4 1 2 3 2 3 4 1 Position O/p : 10010110 Step 3: XOR with: K1 (for encryption) // K2 (for decryption): i/p 1 0 0 1 0 1 1 0 XOR Key 1 1 1 0 0 1 0 0 Result 0 1 1 1 0 0 1 0 o/p : 01110010 Simplified DES (S-DES) By Dr. Ram Mangrulkar Divide the XOR result into 2 parts: Left Part of XOR Result Right Part of XOR Result o/p 0 1 1 1 0 0 1 0 Substitution Box Process: Row No: 01 = 1(Decimal) | Row No: 00 = 0(Decimal) Column No: 11 = 3(Decimal) | Column No: 01 = 1(Decimal) Int’n Value from S1 =0 (00) | Int’n Value from S1 =0 (01) o/p 0 0 0 1 The S-Box result is shuffled by P4 (2,4,3,1): Bit 1 2 3 4 Position i/p 0 0 0 1 o/p 0 1 0 0 Bit 2 4 3 1 Position o/p : 0100 XOR with the 4-bit Left Part of the IP Result: i/p 0 1 0 0 XOR Key 0 0 1 1 Result 0 1 1 1 Simplified DES (S-DES) By Dr. Ram Mangrulkar Combine with the 4-bit Right Part of the IP Result: Bit 1 2 3 4 5 6 7 8 Position i/p 0 1 1 1 0 0 1 1 SWAP and go for next round Bit 1 2 3 4 5 6 7 8 Position SWAP 0 0 1 1 0 1 1 1 O/p of ROUND 1 : 00110111 Round 2: Round Function 2 Divide SW into 2 parts: Left Part SW 0011 Right Part SW 0111 Take the 4-bit Right Part, and perform Expansion Permutation (Ep) (4,1,2,3,2,3,4,1): 10111110 XOR with: K2 (for encryption) // K1 (for decryption): 11101101 Divide the XOR result into 2 parts: Left Part of XOR Result 1110 Right Part of XOR Result 1101 Simplified DES (S-DES) By Dr. Ram Mangrulkar Substitution Box Process: S-Box S0 11 S-Box S1 00 The S-Box result is shuffled by P4: 1001 XOR with the 4-bit Left Part of the SW Result: 1010 Combine with the 4-bit Right Part of the SW Result: 10100111 By performing the final permutation with the IP Inverse (4,1,3,5,7,2,8,6), the result is obtained. IP Inverse (4,1,3,5,7,2,8,6) Bit 1 2 3 4 5 6 7 8 Position i/p 1 0 1 0 0 1 1 1 o/p 0 1 1 0 1 0 1 1 Bit 4 1 3 5 7 2 8 6 Position FINAL ANS: (0110 1011) = 6B

Tags

simplified DES encryption cryptography
Use Quizgecko on...
Browser
Browser