Professional Documents
Culture Documents
C235 - IT Security and Management: Modern Symmetric Ciphers
C235 - IT Security and Management: Modern Symmetric Ciphers
Management
Lecture 5.1
Modern Symmetric Ciphers
1
Learning Objectives
2
What is Symmetric key Algorithm?
6
XOR Cipher
• Exclusive XOR has the property needed for symmetric
operation
• XOR
0 0 = 0
0 1 = 1
1 0 = 1
1 1 = 0
10
Quiz Quiz
• An XOR cipher encrypts the plaintext
10110001 to ciphertext 10010000. What is the
key of this XOR cipher?
A. 00011011
B. 10011011
C. 00100001
D. 10110000
11
Stream Cipher
• Stream Cipher
Encrypt on byte by byte basis
Faster but generally weaker
Used in the following encryption
algorithm
• Caesar Bit stream generation
algorithm
• Vigenere
Plaintext
XOR
12
Block Cipher
Encryption
Algorithm
• Block Cipher
Encryption on group of bytes (block)
Slower but generally stronger
Used in the following encryption algorithm
• Rail Fence
Plaintext • Columnar Transposition
13
Modern Symmetric Ciphers
• DES
• 3DES
• AES
14
Modern Symmetric Ciphers
• DES
Block cipher
Block size: 64 bits, Key sizes: 56 bits
• 3DES
Block cipher
Block size: 64 bits, Key size: (3*56 if all 3 keys are different) 168 bits
• AES
Block cipher
Block size: 128 bits
Key sizes: 128, 192, and 256 bits
15
DES
16
How DES work?
64 bits
2. 56-bit key is modified depending on the round and 56-bit key 48 bits are chosen
48 bits are selected
3. The right block is expanded from 32 bits to 48 bits 32 bits 48 bits
Ri
4. The 48 bits key sequence and 48 bits right block are
48 bits are chosen 48 bits
XORed
5. Eight S-boxes are used to transform the result into a
32-bit sequence S-Boxes
18
What makes a Good Cryptosystem?
19
Confusion and Diffusion
• Confusion
Hides the relationship between the key and the ciphertext through
complexity.
Can’t determine the key based on the ciphertext.
• Diffusion
Hides the relationship between plaintext and ciphertext by spreading
the statistics of the plaintext onto the ciphertext
To defeat statistical analysis (remember the weakest of substitution
ciphers, the hacker can use the letter frequency patterns to recover the
plaintext from the cipher text)
Changing one bit of input results in at least 50% change in output.
Uses a combination of transposition and substitution(or other more
elaborate) methods like DES. 20
Quiz Quiz
21
Quiz Quiz
22
Evaluating Cryptosystems
• Kerckhoffs’s principle
“a cryptosystem should be secure even if everything about
the system, except the key, is public knowledge”
• Therefore:
The key is the only thing that is secret
The algorithms (methods) should not be secret
• Good cryptosystem must be open
• Only openness ensures rigorous testing by cryptography experts
• If after rigorous testing, it is still secure – then the encryption is
truly secure
• Security through obscurity is bad 23
Attack on Cryptosystem
24
Brute Force Attack
25
Brute Force Attack
Possible Passwords
26
Number of Possible Passwords
Number of Possible
26 * 26
Passwords
26 * 26 * 26 * 26 = 26 4
a-z
(26 chars) 26 676 456,976 308,915,776 208,827,064,576
a-z, 0-9
(36 chars) 36 1296 1,679,616 2,176,782,336 2,821,109,907,456
a-z (26 chars) very fast very fast 0.5 seconds 5 minutes 2.4 days
a-z, 0-9
(36 chars) very fast very fast 1.7 seconds 36 minutes 33 days
28
Brute Force on the Key
232
Time to brute force the Key (assume one million attempts per second)
Key
Length 32-bit 40-bit 48-bit 56-bit 64-bit 128-bit
Number of
Possible
Keys 4,294,967,296 1 * 1012 2x1014 7x1016 1.8x1019 3x1038
2 / 10
32 6
1.08x1025
years
(more than
3 times the
lifetime of
Time to 1.2 13 8.9 2300 580,000 the
brute force hours days years years years Universe)
29
Brute force with Modern computers
An average computer can perform a
few million password cracks per
second.
Modern computing clusters can cycle
through billion of passwords guesses
per second!
To crack a 8 character long Windows
password using say 350 billion of
passwords guesses per second will
takes:
26 Uppercase/ 26 lowercase/
95^8/350000000000 10 digits/ 33 symbols
= less than 5.5 hours ! 350 billion
30
Quiz Quiz
33
Dictionary Attack
Dictionary
34
Quiz Quiz
35
At the end of you should be able to:
the lesson,