13-04-2013, 02:41 PM
S-DES Algorithm:-
Encryption:- Encryption algorithm takes an 8-bit block of plaintext and 10-bit key as input and produce an 8-bit block of ciphertext as output.
1. Encryption algorithm involves five functions:
1) an initial permutation function (IP)
2) a complex function (fk) which involves both substitution and permutation
3) a simple permutation function (SW) that switches two halves of data
4) the function f again
5) a permutation function that is the inverse of the initial permutation(IP-1).
2. The function fk takes as input as input data passing through the encryption algorithm and an 8-bit subkeys.
3. Produced ciphertext will be
Ciphertext = IP-1(fk2(SW(fk1(IP(plaintext)))))
Key Generation:- A 10 bit key from which two 8 bit subkeys are generated.
1. The key is first subjected to permutation (P10).
2. Then shift operation is performed.
3. Output of the shift operation then passes through a permutation that produces an 8 bit output(P8) for the first subkey (K1).
4. The output of the shift operation also feeds into another shift and another of P8 to produce the second subkey(K2).
Decryption :- Decryption is just reverse process of encryption.