Lecture 4
Lecture 4
Encryption
Lecture # 4
By: Engr. Sundas Hanif
[email protected]
The increased use of computer and
communications systems by industry has
increased the risk of theft of proprietary
information. Although these threats may
require a variety of countermeasures,
encryption is a primary method of
protecting valuable electronic information.
Transposition Cipher -- Class
Practice
• Encrypt the message using Rail-fence cipher with
key = 3
IHAVEABIGSECRET
Transposition Cipher -- Class
Practice
• Decrypt the message
AES EAO OIT VUI NNN NEE RLC FTE LNV
LER LS
• if it was encrypted using tabular
(Columnar) transposition cipher with rows
of length 4 characters
Classical Encryption Techniques
• Transposition
• Substitution
Substitution Technique
• The letters of plaintext are replaced by other
letters or by numbers or symbols to generate the
ciphertext
• Monoalphabetic substitution cipher
• Polyalphabetic substitution cipher
The Ceasar Substitution Cipher
• The Ceasar cipher is named after Julius Ceasar, said to be
the first to use it
• In the Ceasar cipher, each character is substituted by
another
• This technique is called monoalphabetic cipher
• It involves replacing each letter of the alphabet with the
letter standing three places further down the alphabet
• plain: meet me after the toga
party
• cipher: PHHW PH DIWHU WKH WRJD SDUWB
The Ceasar Cipher Cont.
• the alphabet is wrapped around, so that the letter
following Z is A
The Ceasar Cipher Cont.
• A shift can be of any amount!
• Then the general Ceasar algorithm can be
expressed as follows;
C = E(k, p) = (p + k) mod 26
• The decryption algorithm is simply;
p = D(k, C) = (C - k) mod 26
Class Practice
• Encrypt the following;
MISSION IMPOSSIBLE
• Key: KEYWORD
Play-fair Cipher Decryption
• For decryption, same rules of encryption are
applied but in opposite direction
Example:
• Assume this encrypted message is received
SH HA HR FB BL VP KD
• Key: KEYWORD
Class
Practice
Class Practice
• Encrypt the following message by using the
matrix given on the previous slide;