Cryptography and Its Applications: ITBP 301 Fall-2015
Cryptography and Its Applications: ITBP 301 Fall-2015
Its Applications
ITBP 301
Fall-2015
Outline
Introduction to Encryption
Secret Key Encryption Principles
Secret Key Encryption Algorithms
Cipher Block Modes of Operation
Public Key Encryption
Cryptography
Benefits of Cryptographic
Protocols
Historical Encryption
Caesar/Shift Cipher
Example:
K
=3
A D, B E , C F, , X A , Y B Z
C
HELLO
KHOOR
N could be I or A key is 5 or 13
1, 6, 13, or 17
The common shift is
13
Monoalphabetic Cipher
Plain:
abcdefghijklmnopqrstuvwxyz
Cipher Key:
DKVQFIBJWPESCXHTMYAUOLRGZN
EXAMPLE
Plaintext:
ifwewishtoreplaceletters
Ciphertext:WIRFRWAJUHYFTSDVFSF
UUFYA
Playfair Cipher
L
F
N
U
Z
R
D
M
T
Y
A
B
K
Q
X
H
S
I
P
W
C
E
G
O
V
..Playfair
Cipher- Cont
Example:
Plaintext: kill
Step # 1: Kill becomes kI lx lx
Step # 2: KI becomes EK; lx becomes
SU.
Ciphertext: EKSUSU
Vigenre Cipher
Vigenre Cipher
KEY
Vigenre Cipher
key:
deceptivedeceptivedeceptive
plaintext:
wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLM
GJ
key:
deceptivewearediscoveredsav
plaintext:
wearediscoveredsaveyourself
ciphertext:ZICVTWQNGKZEIIGASXSTSLVVW
LA
Transposition Ciphers
m e m a t r h t g p r y
e t e f e t e o a a t
giving ciphertext
MEMATRHTGPRYETEFETEOAAT
Terminologies
Terminologies
Cryptographic Services
Confidentiality
Content
Authentication
cannot be revealed
Integrity
Message
cannot be altered
Non-repudiation
Only
Restricted Algorithm
The
Key-Based Algorithm
The
Data
key
Double DES: 112 bit key
Triple DES 168
IDEA: 128 bit key
Skipjack (Clipper): 80 bit
also RC2 and Advanced Encryption
Standard
Cryptosystems
Notation
C = E(K,M)
M = D(K,C)
K: Key
E: Encryption Algorithm
D: Decryption Algorithm
M: Plaintext Message
C: Ciphertext Message
Cryptanalysis
Cryptanalyst is assumed to know E
and D
Objective of the cryptanalyst is to
discover the secret key K
(The real objective might be to discover
the plaintext message M, but this is
generally assumed to be equivalent to
discovering K)
Secret Key
Long-term keys
Prolonged
Session keys
Short-term
term key
Cryptanalysis Attacks
Ciphertext Only
Cryptanalyst
Known Plaintext
Cryptanalyst
pairs
Chosen Plaintext
Cryptanalyst
Chosen Ciphertext
Cryptanalyst
SIMPLE ALIPHABETIC
SUBSTITUTION
Example Key:
Plaintext ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ciphertext PZQSGIMBWXDFKJVCHAOLUTERYN
Trivially broken for known plaintext attack
Easily broken for ciphertext only attack (or
natural language plaintext)
Multiple encipherment does not help (No point in
doing two substitutions in sequence)
SIMPLE PERMUTATION
Example key:
Plaintext 1234
Ciphertext 4312
Easily broken for ciphertext only attack (or
natural language plaintext)
Multiple encipherment does not help (No point in
PRODUCT CIPHER
Number of
Alternative Keys
32
milliseconds 2.15
56
hours 10
128
168
PERFECT SECRECY
VERNAM ONE-TIME PAD
PERFECT SECRECY
VERNAM ONE-TIME PAD
Key cannot be reused
Known plaintext reveals the portion of the
key that has been used, but does not
reveal anything about the future bits of the
key
Secret-Key Cryptographic
Algorithms
DES Overview
DES Controversies
Triple DES
C = ciphertext
P = Plaintext
EK[X] = encryption of X using key K
DK[Y] = decryption of Y using key K
Triple DES
Private-Key Cryptography
(summary)
Public-Key Cryptography
The user may publish the public key freely because each key
does only half of the encryption and decryption process
The keys operate as inverses, meaning that one key undoes the
encryption provided by the other key
P D ( k PRIV , E ( k PUB , P ))
P D ( k PUB , E ( k PRIV , P ))
Public-Key Cryptography
How it works?
Encryption
Authentication
both
Public-Key Characteristics
Public-Key Cryptosystems
Public-Key Applications
(provide secrecy)
digital signatures (provide authentication)
key exchange (of session keys)
Public-Key Cryptographic
Algorithms
a block cipher
The most widely implemented
Diffie-Hellman
Exchange
RSA use
Key
Private key
KU={e,n}
KR={d,n}
Select p,q
Calculate
Calculate
(n) ( p 1)( q 1)
Select integer e
Calculate d
Public Key
Private key
( d * e) mod( ( n )) 1
KU = {e,n}
KR = {d,n}
2.
3.
Compute n = pq =1711=187
Compute (n)=(p1)(q-1)=1610=160
A large value of effectively inhibits factoring it to infer p and q
4.
5.
6.
7.
RSA Use
RSA Security