Professional Documents
Culture Documents
Lecture 4,5,6
Cryptography for e-security
Areesha Sajjad
NBCA&E
Some Basic Terminology
Key
Stream
Plaintext
Ciphertext
Example of Stream Decryption
Key
Stream
Ciphertext
Plaintext
Real Cipher Streams
• DES, 3-DES
• AES (Rijndael)
• RC-2
• RC-5
• IDEA
• Blowfish, Cast
• Gost
MODES OF OPERATION IN BLOCK
CIPHER
ECB Mode Encryption
(Electronic Code Book)
P1 P2 P3
Ek Ek Ek
C1 C2 C3
S0 P1 P2 P3
Ek Ek Ek
C1 C2 C3
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
Monoalphabetic Cipher Security
• MLD BLF PMLD GSV TZNV SLD GL KOZB RG. TVG IVZWB ULI HRNROZI
KILYOVNH RM BLFI VCZNH. XSVVIH.
Playfair Cipher
P A K I/J S
T N B C D
E F G H L
M O Q R U
V W X Y Z
Encrypting and Decrypting
• Prepare Message in the following format:
• ME ET ME AT CA FE
P A K I/J S
T N B C D
E F G H L
M O Q R U
V W X Y Z
Security of Playfair Cipher
• if a truly random key as long as the message is used, the cipher will be
secure
• called a One-Time pad
• is unbreakable since ciphertext bears no statistical relationship to the
plaintext
• since for any plaintext & any ciphertext there exists a key mapping one
to other
• can only use the key once though
• problems in generation & safe distribution of key
Transposition Ciphers
Plaintext: a t t a c k p
ostpone
duntilt
woamxyz
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
Product Ciphers
• an alternative to encryption
• hides existence of message
• using only a subset of letters/words in a longer message marked in some way
• using invisible ink
• hiding in LSB in graphic image or sound file
• has drawbacks
• high overhead to hide relatively few info bits
Summary
• have considered:
• classical cipher techniques and terminology
• monoalphabetic substitution ciphers
• cryptanalysis using letter frequencies
• Playfair cipher
• polyalphabetic ciphers
• transposition ciphers
• product ciphers and rotor machines
• stenography
Quiz total marks 5
• Decrypt the following cipher text using Ceaser cipher with the key=7
and check it too: