cryptography
cryptography
A B
Intruder
Communications security
CSE2500 System
2
Why Study cryptology(2)
Customer Merchant
TTP
CSE2500 System
3
Why Study cryptology(3)
A B
LEA
Law enforcement
CSE2500 System
4
The Basic Problem
We consider the confidentiality goal:
Alice and Bob are Friends
Marvin is a rival
Alice wants to send secret messages (M1,M2,…)
to Bob over the Internet
Rival Marvin wants to read the messages (M1,M2,
…) - Alice and Bob want to prevent this!
Assumption: The network is OPEN: Marvin is
able to eavesdrop and read all data sent from
Alice to Bob.
Consequence: Alice must not send messages
(M1,M2,…) directly – they must be “scrambled” or
CSE2500 encrypted
System using a ‘secret code’ unknown to
Marvin but known to Bob. 5
Cryptography
encryption
decryption
CSE2500 System
6
Private key cipher
Alice E
D Bob
key
Message Message
(cleartext,plaintext (cleartext, plaintext)
)
CSE2500 System
7
Basic terms
Cryptology (to be very precise)
Cryptography --- code designing
Cryptanalysis --- code breaking
Cryptologist:
Cryptographer & cryptanalyst
Encryption/encipherment
Scrambling data into unintelligible to
unauthorised parties
Decryption/decipherment
Un-scrambling
CSE2500 System
8
Following are some specific
security requirment
Authentication
Confidentiallity
Integrity
Non-repudiation
three types of algorithm are used
Secret key cryptography—same key used
Public key cryptography----two diffrent key
used
Hash function - H(m)
CSE2500 System
9
method
CSE2500 System
10
CSE2500 System
11
Examples of “Messages”
CSE2500 System
13
Notations
CSE2500 System
15
The Caesar cipher (cnt’d)
K=3
Outer: plaintext
Inner: ciphertext
CSE2500 System
16
An example
CSE2500 System
17
Breaking classic ciphers
CSE2500 System
18
Breaking the Caesar cipher
By trial-and error
By using statistics on letters
frequency distributions of letters
letter percent
A 7.49%
B 1.29%
C 3.54%
D 3.62%
E 14.00%
..................................
CSE2500 System
19
Morden Cryptography applications
CSE2500 System
21
4 types of attacks
CSE2500 System
22
4 types of attacks
A B C D E F G H I J K L M N O P Q R S
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
T U VW X Y Z
20 21 22 23 24 25 26
5 20 8 5 1 13 5 18 9 3 1 14 2 12 1 3
11 3 8 1 13 2 5 18 03 07
K
05 12
Now using the matrix (key)
Hill Cipher example
Make the first pair a column vector (h (8) e (5)),
and multiply that matrix by the key.
3 7 8 59
5 12 5 100
Example:
M= BE OR NOT TO BE
C= YH KO J KQ QKYH
Another Classical Substitution Ciphers
Transposed keyword mixed
Example:
3- 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
ABGLQUYHCINR VZMEJ OSWDF KPTX
4- M= BE OR NOT TO BE
C= BQ JO ZMW WM BQ
One-Time Pad
• This technique was introduced by army
signal officer Joseph Mauborgne. Which is
also called Vernam.
• He suggested using a random key that is as
long as the message.
• A message encrypted using a one-time pad
cannot be broken because the encryption
key is a random number and because the
key is used only once
A B C D E F G H I J K L M N O P Q R S
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
T U VW X Y Z
20 21 22 23 24 25 26
One-Time Pad (OTP)
• Step 1: HLMSEZRBHPSJOTDW
· To make the key easier to work with, break it into blocks of
two characters each, thus
HL MS EZ RB HP SJ OT DW
• 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
Popular sites for Popular sites for Steganography information
http://www.ise.gmu.edu/~njohnson/Steganography
http://www.rhetoric.umn.edu/Rhetoric/misc/dfrank/ste
gsoft.html
http://www.topology.org/crypto.html
Data Encryption Standard
Expansion Permutation Box − Since right input is 32-bit and round key
is a 48-bit, we first need to expand right input to 48 bits.
2.Now decrypt the output of step 1 using single DES with key
K2.
3.Finally, encrypt the output of step 2 using single DES with
key K3.
4.The output of step 3 is the ciphertext.