Docsity

Simplified DES-Computer Security-Lecture Slides, Slides of Computer Security

Partial preview of the text

Download Simplified DES-Computer Security-Lecture Slides and more Slides Computer Security in PDF only on Docsity!

Computer Security

Simplified DES

• Developed by Professor Edward Schaefer of Santa Clara University

• Sole purpose is background preparation for actual DES

• Symmetric Cipher

 Cipher follows a well known standard  Single key is used that is kept private

• Input

 Block Inputs  Each block consist of 8 bits

• Outputs

 Block Outputs  Each Block consist of 8 bits

• Stages

 There are two stages of encryption

• Key

 Requires a key for each stage  One option is to use16 bit key with two 8 bits sub-keys  Another option is to use a single 8 bit key  S-DES uses a 10 bit key, and two 8-bit sub keys are generated to satisfy the requirement

S-DES Scheme…

S-DES Operation Simplified

 Step-1 Sub Keys generation  Generation of two sub-keys k 1 & K 2 each of 8-bit length  Step-2 Encryption  Plaint text is divided into two halves Left and Right  Left half is encrypted using K1 where Right half is encrypted using K  Step-3 Decryption  Cipher text is divided into two halves  Left half is decrypted using K1 where Right half is encrypted using K

S-DES..

 Encryption

  1. Initial permutation on plaintext (8 bits)
  2. Output of initial permutation is divided into two equal halfs
  3. First half (4 bits) passes through Fk
  4. Fk Uses K 1 and encrypts first half
  5. Switching function swaps the two halves
  6. Step 4 is repeated with K 2
  7. The two halves passes through IP-

Ciphertext = IP-1^ ( Fk 2 ( SW ( Fk 1 ( IP ( Plaintext ) ) ) ) )

  • Decryption

 The encryption process is reversed

Plaintext = IP-1(FK 1 (SW(FK 2 (P(CipherText)))))

S-DES Key Generation..

  • P

 Permutation Rule

Example:

Input

Ouput

K 1 K 2 K 3 K 4 K 5 K 6 K 7 K 8 k 9 k 10

K 3 K 5 K 2 K 7 K 4 K 10 K 1 K 9 k 8 k 6

K 1 K 2 K 3 K 4 K 5 K 6 K 7 K 8 k 9 k 10

K 3 K 5 K 2 K 7 K 4 K 10 K 1 K 9 k 8 k 6

S-DES Key Generation…cont..

  • Shift Operation, LS-1,LS-

 Operates on 5 bits

 LS-1: 1 bit left circular shift

 LS-2: 2 bit left circular shift

 2 bit shift

 Example:

 LS-1 (first five bits)  LS-1 (10000)  (00001)

 LS-1 (remaining five bits)  LS-1 (01100)  (11000)

 Key becomes (01100 11000)

  • P

 Performs 8 bit permutation according to following rule

 Bit 1 and 2 are eliminated

 Sub key 1

 By repeating P8 after LS-2 sub key 2 will be generated

P

S-DES Encryption

• Encryption Algorithm

 Consist of Five Functions

  1. IP  Initial Permutation
  2. Fk Complex Function
    1. Performs permutation and Substitution
  3. SW  Swapping
  4. FkComplex Function
  5. IP-1^ Inverse of IP

S-DES Encryption. .cont..

  • Initial Permutation

 Input

 8 bit block

 Output bit Pattern 

 No bit is discarded

  • Inverse of IP or IP-

 Input

 8 bit Block

 Output bit pattern 

 IP and IP-1^ should work as

 IP ( IP-1(x) ) = x

S-DES Encryption

S-DES Encryption

S-DES Scheme… cont..

  • S-Boxes

 Input

 Four bits for each of the s box

 First and fourth input bit specify row

 Second and third input bit specify column

 Output is a two bit value

S0= S1=

  • Switch Function

 Interchanges the left and right 4 bits