Data Encryption Standard

Data Encryption Standard

Data Encryption Standard Overview: The data encryption standard is probably the most widely used conventional encryption algorithm. A detailed study of DES provides an understanding of the principles used in other conventional encryption algorithms. Compared to public-key encryption schemes such as RSA, the structure of DES and most conventional encryption algorithms, is very complex. Accordingly, we begin with a simplified version of DES, called S-DES. Classroom experience indicates that a study of this simplified version enhances understanding of DES. S-DES: It is an educational algorithm rather than a secure encryption algorithm. The S-DES encryption algorithm takes an 8-bit block of plaintext (e.g. 10111101) and a 10-bit key as input and produces an 8-bit block of ciphertext as output. Whereas the original DES uses 64-bit block of plaintext and 56-bit key. The S-DES decryption algorithm takes an 8-bit block of ciphertext and the same 10-bit key to produce the original plaintext. The encryption algorithm involves FIVE functions: o An initial Permutation (IP) o A complex function labeled fk – involves permutation and substitution o A simple permutation function that switches the two halves of the data o The function fk again o A permutation function that is the inverse of the IP (IP-1) See figure 3.1 for complete process of S-DES. 10-bit key ENCRYPTION DECRYPTION P10 8-bit plaintext 8-bit plaintext Shift IP IP-1 P8 K1 K1 fK fK Shift SW SW P8 K2 K2 fK fK IP-1 IP 8-bit ciphertext 8-bit ciphertext Figure 3.1 Simplified DES Scheme 10-bit key 10 P10 5 5 LS-1 LS-1 5 5 P8 8 K1 LS-2 LS-2 5 5 P8 8 K2 Figure 3.2 Key Generation for Simplified DES 8-bit plaintext 8 IP 4 f 4 K E/P 8 F 8 + K1 4 4 S0 S1 2 2 P4 4 + 4 SW 4 f 4 K E/P 8 F 8 + K2 4 4 S0 S1 2 2 P4 4 + 4 IP-1 8 8-bit ciphertext Figure 3.3 Simplified DES Encryption Detail S-DES Key Generation for S-DES: An Example 10-bit key: 1-2-3-4-5-6-7-8-9-x 1-0-1-0-0-0-0-0-1-0 P10: 3-5-2-7-4-x-1-9-8-6 1-0-0-0-0-0-1-1-0-0 5-bits 5-bits 1-0-0-0-0 0-1-1-0-0 LS-1: Circular left LS-1 LS-1 shift by 1 bit => 0-0-0-0-1 1-1-0-0-0 Merge: 1-2-3-4-5-6-7-8-9-x 0-0-0-0-1 0-0-0-0-1-1-1-0-0-0 1-1-0-0-0 P8: 6-3-7-4-8-5-x-9 0-0-0-0-1 1-0-1-0-0-1-0-0 1-1-0-0-0 This is the key K1 LS-2: Circular left LS-2 LS-2 shift by 2 bits => 0-0-1-0-0 0-0-0-1-1 Merge: 1-2-3-4-5-6-7-8-9-x 0-0-1-0-0-0-0-0-1-1 P8: 6-3-7-4-8-5-x-9 0-1-0-0-0-0-1-1 This is the key K2 S-DES S-DES: An Example 8-bit plain text: 1-2-3-4-5-6-7-8 1-1-1-1-0-0-1-1 IP: 2-6-3-1-4-8-5-7 1-0-1-1-1-1-0-1 Left 4-bits: Right 4-bits: Right 4-bits: 1-0-1-1 1-2-3-4 1-1-0-1 1-1-0-1 E/P: Expansion/Permutation: 4-1-2-3-2-3-4-1 1-1-1-0-1-0-1-1 XOR: 1-1-1-0-1-0-1-1 1-0-1-0-0-1-0-0 (Key K1) 0-1-0-0-1-1-1-1 Left 4-bits: Right 4-bits: 0-1-0-0 1-1-1-1 First &Last bits: First &Last bits: 0,0 = 0 1,1 =3 Second & Third bits: Second & Third bits: 1,0 = 2 1,1 = 3 S0 0 1 2 3 row = 0 row = 3 S1 0 1 2 3 0 1 0 3 2 column = 2 column = 3 0 0 1 2 3 1 3 2 1 0 Use S0 Box Use S1 Box 1 2 0 1 3 2 0 2 1 3 3 3 2 3 0 1 0 3 3 1 3 2 3 2 1 0 3 In bits: In bits: 1-1 1-1 New 4-bits: 1-2-3-4 1-1-1-1 P4: 2-4-3-1 1-0-1-1 1-1-1-1 XOR: 1-0-1-1 1-1-1-1 0-1-0-0 1-1-0-1 (Left 4-bits) (Right 4-bits) SWITCH Left bits: Right bits: Right 4-bits: 1-1-0-1 1-2-3-4 0-1-0-0 0-1-0-0 E/P: Expansion/Permutation: 4-1-2-3-2-3-4-1 0-0-1-0-1-0-0-0 XOR: 0-0-1-0-1-0-0-0 0-1-0-0-0-0-1-1 (Key K2) 0-1-1-0-1-0-1-1 Left 4-bits: Right 4-bits: 0-1-1-0 1-0-1-1 First &Last bits: First &Last bits: 00 = 0 11 =3 Second & Third bits: Second & Third bits: 11 = 3 01 = 1 S0 0 1 2 3 row = 0 row = 3 S1 0 1 2 3 0 1 0 3 2 column = 3 column = 1 0 0 1 2 3 1 3 2 1 0 Use S0 Box Use S1 Box 1 2 0 1 3 2 0 2 1 3 2 1 2 3 0 1 0 3 3 1 3 2 3 2 1 0 3 In bits: In bits: 1-0 0-1 New 4-bits: 1-2-3-4 1-0-0-1 P4: 2-4-3-1 1-1-0-1 0-1-0-1 XOR: 1-1-0-1 0-1-0-1 1-0-0-0 0-1-0-0 (Left 4-bits) (Right 4-bits) 1-2-3-4-5-6-7-8 1-0-0-0-0-1-0-0 IP-1: 4-1-3-5-7-2-8-6 0-1-0-0-0-0-0-1 (This is the 8-bit cipher text) BRUTE-FORCE ATTACK: With 10-bit key, there are only 210 = 1024 possibilities. Given a ciphertext, an attacker can try each possibility and analyze the result to determine if it is a reasonable plaintext. CRYPTANALYSIS: Assume some 8-bit plaintext and the corresponding ciphertext are known and 10-bit key is unknown. S-box makes the S-DES non-linear and makes the cryptanalysis difficult. Possible non-linear equation for the 4-bit (a, b, c, d) input to S-box and the 4-bit (q, r, s, t) output from the S-Box would be: q=abcd+ab+ac+b+d r=abcd+abd+ab+ac+ad+a+c+1 .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us