SIC Module1
SIC Module1
Cryptography
kryptos (hidden) + graphein (to write) = secret writing
It is used for:
-Conceal messages from unauthorized persons (secrecy
+privacy)
-Verify correctness of message (authentication)
-Authenticate to other party
Terminologies
Plain Text
Terminologies...
Encryption
Decryption
Terminology
Cryptanalysis: The study of encryption and
Terminology
Cryptographers: People who do cryptography
Cryptanalysts: practitioners of cryptanalysis
Conventional Cryptosystem
Principles
cryptosystem has the following five
ingredients:
Plaintext
Encryption algorithm
Secret Key
Ciphertext
Decryption algorithm
Cryptosystem
A cryptosystem is a system for encryption
and decryption.
10
Classifications
Classification of cryptosystems
Symmetric cryptosystems
Asymmetric cryptosystems
11
Plain-text input
The quick
brown fox
jumps over
the lazy
dog
Cipher-text
Plain-text output
AxCv;5bmEseTfid3)f
GsmWe#4^,sdgfMwir
3:dkJeTsY8R\s@!
q3%
The quick
brown fox
jumps over
the lazy
dog
Encryption
Decryption
Same key
(shared secret)
Weakness:
Assymmetric Cryptosystem
Different keys are used for encryption and
decryption purposes.
The pair of keys are mathematically related and
consist of a public key that can be published
without doing harm to the system's security and a
private key that is kept secret.
Also known as public key cryptosystems
Asymmetric Cryptosystem
The public key is used for encryption purposes
and lies in the public domain.
Anybody can use the public key to send an
encrypted message.
The private key is used for decryption purposes
and remains secret.
An example of a public cryptosystem is the RSA
cryptosystem.
Strength
Classical Ciphers
Substitution ciphers
Transposition ciphers
with another.
if plaintext is viewed as a sequence of bits,
Substitution Ciphers
Monoalphabetic cipher
Caesar cipher
Polyalphabetic cipher
Vigenre cipher
Playfair cipher
19
Monoalphabetic Ciphers
In monoalphabetic substitution, the
relationship between a symbol in the
plaintext to a symbol in the ciphertext is
always one-to-one.
The following shows a plaintext and its corresponding ciphertext.
The cipher is probably monoalphabetic because both ls are
encrypted as Os.
Polyalphabetic Ciphers
In polyalphabetic substitution, each occurrence of a
character may have a different substitute. The
relationship between a character in the plaintext to
a character in the ciphertext is one-to-many.
Caesar Cipher
earliest known substitution cipher
by Julius Caesar
first attested use in military affairs
replaces each letter by 3rd letter on
example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
Keyword Cipher
There will be many keys but still easy to remember
Keyword cipher:
1. select a keyword - if any letters are repeated, drop the second
and all other occurrences from the keyword
2. write the keyword below the alphabet, fill in the rest of the
space with the remaining letters in the alphabet in their
standard order
Example
The keyword is COUNT
plaintext A
ciphertext C
U N
So a goes to c, b goes to o, . . .
Monoalphabetic Cipher
Key sentence: THE MESSAGE WAS
TRANSMITTED AN HOUR AGO
Plain text: PLEASE CONFIRM RECEIPT
Original :
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
SUBSTITUTION ALPHABET:
T H E M S A G W R N I D O U B C F J K L P Q V X Y Z
Playfair Cipher
not even the large number of keys in a
Playfair ciphers
l
r
g
a
b
h
y f
c d
k m
n
u
o
v
q
w
s
x
p
i
t
z
Playfair encryption
p
i
n
u
l
r
g
o
v
a y f
b c d
h k m
q s t
w x z
He lx lo th er ex
KG YV RV QM GI KU
To decrypt, just reverse!
I/J
Polyalphabetic Ciphers
polyalphabetic substitution ciphers
improve security using multiple cipher alphabets
make cryptanalysis harder with more alphabets to
guess and flatter frequency distribution
use a key to select which alphabet is used for each
letter of the message
use each alphabet in turn
repeat from start after end of key is reached
Vigenre Cipher
simplest polyalphabetic substitution cipher
effectively multiple caesar ciphers
key is multiple letters long K = k 1 k2 ... kd
ith letter specifies ith alphabet to use
use each alphabet in turn
repeat from start after d letters in message
decryption simply works in reverse
Polyalphabetic Cipher
The most common method used is Vigenre cipher
Vigenre cipher starts with a 26 x 26 matrix of
alphabets in sequence. First row starts with A,
second row starts with B, etc.
Like the ADFGVX cipher, this cipher also requires a
keyword that the sender and receiver know ahead of
time
Each character of the message is combined with the
characters of the keyword to find the ciphertext
character
32
33
34
Polyalphabetic Cipher
E.g., Message = SEE ME IN MALL
Take keyword as INFOSEC
Vigenre cipher works as follows:
S E E M E I N M ALL
I NF OS EC I NFO
------------------------------------A R J AW M P U N Q Z
35
Polyalphabetic Cipher
E.g., Message = SEE ME IN MALL
Take keyword as INFOSEC
Vigenre cipher works as follows:
S E E M E I N M ALL
I NF OS EC I NFO
------------------------------------A R J AW M P U N Q Z
36
37
Polyalphabetic Cipher
E.g., Message = SEE ME IN MALL
Take keyword as INFOSEC
Vigenre cipher works as follows:
S E E M E I N M ALL
I NF OS EC I NFO
------------------------------------A R J AW M P U N Q Z
38
39
One-Time Pad
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
now consider classical transposition or
permutation ciphers
these hide the message by rearranging the
letter order
without altering the actual letters used
can recognise these since have the same
frequency distribution as the original text
Transpositionciphers
A transposition cipher does not substitute one symbol for another,
instead it changes the location of the symbols.
Note
She
then
creates
MEMATEAKETETHPR.
the
ciphertext
giving ciphertext
MEMATRHPRYETEFETEAT
Columnar transposition
Plaintext Ciphertext
W H Y D O
welrnel
E S I T A
hswatta
L W A Y S
yiaihhn
R A I N I
dtyneed
N T H E N
oasinrs
E T H E R
L A N D S
M
M
T
A
E
E
H
R
E
A
E
K
T
T
P
Shannon characteristics
Confusion
Diffusion
Cipher Classification
Ciphers
Symmetric
Key
Public Key
PublicKey
Signature
ID
Classical
Transposition
Stream
Substitution
Block
Stream Ciphers
Disadvantages
Examples
monoalphabetic substitution ciphers
Vigenere ciphers
Block Cipher
Divide input bit stream into n-bit sections, encrypt only that
section