Unit 1 Introduction and Number Theory PDF
Unit 1 Introduction and Number Theory PDF
&
Network Security
Confidentiality
Integrity Availability
A B
Intruder
A B
Intruder
A B
Intruder
A B
Intruder
A B
I never sent the
message which you
claim to have received
Passive Active
• Cryptography
• Steganography
• Symmetric(Secret/ • Asymmetric(Public
Shared/Private key)
key)
C = E (M ) C =E (M )
k pu.k
M = D (C ) M =D (C )
k pr.k
Statistical Attack
Pattern Attack
CNS Unit 1 S. Chaudhari
ACPCE Slide 28
Cryptanalysis of Caesar Cipher
25 R F G Q G Q A Q Q A J Y Q Q
24 Q E F P F P Z P P Z I X P P
23 P D E O E O Y O O Y H W O O
22 O C D N D N X N N X G V N N
21 N B C M C M W M M W F U M M
20 M A B L B L V L L V E T L L
19 L Z A K A K U K K U D S K K
18 K Y Z J Z J T J J T C R J J
17 J X Y I Y I S I I S B Q I I
16 I W X H X H R H H R A P H H
15 H V W G W G Q G G Q Z O G G
14 G U V F V F P F F P Y N F F
13 F T U E U E O E E O X M E E
12 E S T D T D N D D N W L D D
11 D R S C S C M C C M V K C C
10 C Q R B R B L B B L U J B B
9 B P Q A Q A K A A K T I A A
8 A O P Z P Z J Z Z J S H Z Z
7 Z N O Y O Y I Y Y I R G Y Y
6 Y M N X N X H X X H Q F X X
5 X L M W M W G W W G P E W W
4 W K L V L V F V V F O D V V
3 V J K U K U E U U E N C U U
2 U I J T J T D T T D M B T T
1 T H I S I S C S S C L A S S
(i)=fc
()(
p −
ci)
0 c2
5
- i is the key
- f (c) is the frequency of character c in ciphertext
- p(x) is the frequency of character x in English
Statistical Attack
Correlation: φ(i) for 0 ≤ i ≤ 25
i φ(i) i φ(i) i φ(i) i φ(i)
0 0.0482 7 0.0442 13 0.0520 19 0.0315
1 0.0364 8 0.0202 14 0.0535 20 0.0302
2 0.0410 9 0.0267 15 0.0226 21 0.0517
3 0.0575 10 0.0635 16 0.0322 22 0.0380
4 0.0252 11 0.0262 17 0.0392 23 0.0370
5 0.0190 12 0.0325 18 0.0299 24 0.0316
6 0.0660 25 0.0430
Euler’s Theorem:
Plaintext: cryptography
Ciphertext: VYZXUHBYDMJZ
• Number of keys ?
CNS Unit 1 S. Chaudhari
ACPCE Slide 39
Monoalphabetic Cipher
then t, r, n, i, o, a, s
Plaintext= HIE
K1= 3
K= DHI
Ciphertext= KPM
3 7
k = P= HI = [ 7 8]
15 12
37
=
c[
78
] =
[
11
15=
][LP
]
151
2
Verify?
T H I S I S
C N S C L A
S S - - - -
1 2 3 4 5 6
Order : 3 6 1 4 5 2
Ciphertext: ISSATCSSCILHNS
Stream Block
Stream Block
• First-letter algorithm
• Every n-th character
• Altering the amount of whitespace
• Using a publicly available cover source