This document provides an overview of the Triple Data Encryption Standard (3DES). It first briefly describes the original Data Encryption Standard (DES) and its key components including the initial and final permutations, substitution boxes, and key schedule. It then explains that 3DES applies DES three times with three different keys to strengthen security by effectively doubling the key size to 112 bits. Simulations are included showing encryption and decryption using 3DES with equal and different keys.
3. Introduction:
• The Data Encryption Standard (DES) is a symmetric-key block cipher published by
the National Institute of Standards and Technology (NIST).
• DES was developed as a standard for communications and data protection by an
IBM research team, in response to a public request for proposals by the NBS - the
National Bureau of Standards (which is now known as NIST).
4. Basic Terminology
• plaintext - the original message
• ciphertext - the coded message
• cipher - algorithm for transforming plaintext to ciphertext
• key - info used in cipher known only to sender/receiver
• encipher (encrypt) - converting plaintext to ciphertext
• decipher (decrypt) - recovering ciphertext from plaintext
• Permutation !
10. Example:
• Find the output of the initial permutation box when the input is given in
hexadecimal as:
• Solution:
Only bit 25 and bit 63 are 1s; the other bits are 0s. In the final permutation, bit 25
becomes bit 64 and bit 63 becomes bit 15. The result is
14. DES
64 bit plaintext block
IP
L0 R0
L1=R0 R1=L0 f(R0,K1)
f
K1 (derived from
56 bit key)=48 bit
L16=R15
f
K16 (derived from
56 bit key)= 48 bit
IP-1
repeat 16 times…
64 bit ciphertext block
R16=L15 f(R15,K16)
32 32
15. Per-Round Key Generation
28 bits 28 bits
48 bits
Ki
One
round
Circular Left Shift Circular Left Shift
28 bits 28 bits
Permutation
with Compression,
PC-2
Initial Permutation of DES key ,PC-1
C i-1 D i-1
C i D i
19. L0 R0
L1 R1
48 bit subkey
Generator
K48 = g(i,K56)
(The key for
each round is
deterministically
found from the
input 56 bit key).
Expansion Permutation
S-Box Substitution
P-Box Permutation
32
48
48
48
32
32
3232
32
20. Expansion P-box
• Since RI−1 is a 32-bit input and KI is a 48-bit key, we first need to expand RI−1 to
48 bits.
21. Continue
• Although the relationship between the input and output can be defined
mathematically, DES uses Table to define this P-box.
25. Example:
• The input to S-box 1 is 100011. What is the output?
• Answer:
• If we write the first and the sixth bits together, we get 11 in binary, which is 3 in
decimal. The remaining bits are 0001 in binary, which is 1 in decimal. We look for the
value in row 3, column 1, in Table (S-box 1).
• The result is 12 in decimal, which in binary is 1100. So the input 100011 yields the output
1100.
29. Decryption
• The same algorithm as encryption.
• Reversed the order of key (Key16, Key15, … Key1).
• For example:
IP undoes IP-1 step of encryption.
1st round with SK16 undoes 16th encrypt round.
30. DES Security:
• Not too good:
• Trying all 256 possible keys
is not that hard these days.
• If you spend ~$25k you can build
a DES password cracker that can
will succeed in a few hours.
• The major criticism of DES regards its key length. Fortunately DES is not a group.
This means that we can use double or triple DES to increase the key size.
31. Triple DES - More Secure
True cryptographic strength of 3DES key is 2x56 bits = 112 bits
Ci EK3
DK2
EK1
Pi
32. Triple DES - More Secure
Triple DES with two keys
• Run DES three times
Why Encrypt then Decrypt then
Encrypt with 2 keys?!
• Backwards compatibility
• If K2 = K3, this is DES
E(D(E(P,K),K),K)= E(P,K)
C=E(D(E(P,K1),K2),K1)
P=D(E(D(C,K1),K2),K1)
The encryption process is made of two permutations (P-boxes), which we call initial and final permutations, and sixteen Feistel rounds.
DES Decryption i) Use same function ii) Key is the key… Used in reverse order (K1,…, K16 becomes K16,…, K1) Right circular shift of 0-2 bits 0 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1) With DES it is possible to use the same function to encrypt or decrypt a block. The only difference is that the keys must be used in the reversed order. That is , if the encryption keys for each round are K1,K2,K3,…K16, then the decryption keys are K16, K15, K14, …,K1.The algorithm that generates the key used for each round is circular as well. The key shift is shown above.