Professional Documents
Culture Documents
3 - 23
2.2.1 Linear Cryptanalysis ..................................................................................... 2 - 5 2.9.9 Double DES ................................................................................................ 2 - 43 3.8.1.1 Computing (n) ....................................................................................... 3 - 23
2.2.2 Differential Cryptanalysis ............................................................................. 2 - 6 2.9.10 Triple DES .................................................................................................... 2 - 44 3.8.1.2 Timing Attacks .......................................................................................... 3 - 24
2.2.3 Difference between Linear and Difference Cryptanalysis ........................... 2 - 7 2.10 Confusion and Diffusion ................................................................................ 2 - 45 3.8.1.3 Mathematical Attacks .............................................................................. 3 - 24
2.3 Stream Ciphers ................................................................................................ 2 - 7 2.10.1 Distinguish between Diffusion and Confusion .............................................. 2 - 46 3.8.1.4 Adaptive Chosen Cipher-text Attacks ...................................................... 3 - 25
2.3.1 Advantages and Disadvantages of Stream Cipher ....................................... 2 - 8 2.11 Advanced Encryption Standard..................................................................... 2 - 46 3.9 Key Distribution............................................................................................. 3 - 32
2.3.2 Comparison between Stream and Block Cipher .......................................... 2 - 8 2.11.1 Evaluation Criteria for AES ............................................................................ 2 - 46 3.9.1 Distribution of Public Keys ......................................................................... 3 - 32
2.4 Substitution Techniques ................................................................................. 2 - 9 2.11.2 AES Cipher ..................................................................................................... 2 - 47 3.9.2 Distribution of Secret Keys using Public Key Cryptography ....................... 3 - 35
2.4.1 Caesar Cipher .............................................................................................. 2 - 9 2.11.3 Comparison between AES and DES ............................................................... 2 - 49 3.9.3 Key Distribution and Certification.............................................................. 3 - 37
2.4.2 Monoalphabetic Cipher ............................................................................. 2 - 10 2.12 Multiple Choice Questions with Answers ..................................................... 2 - 50 3.9.4 Key Distribution ......................................................................................... 3 - 41
2.4.3 Playfair Cipher............................................................................................ 2 - 10 Unit III 3.10 Diffie-Hellman Key Exchange ........................................................................ 3 - 45
2.4.4 Hill Cipher................................................................................................... 2 - 11 3.11 El Gamal Algorithm ....................................................................................... 3 - 50
Chapter - 3 Asymmetric Key Cryptography (3 - 1) to (3 - 56)
2.4.5 Polyalphabetic Substitution ....................................................................... 2 - 12 3.12 Elliptic Curve Cryptography........................................................................... 3 - 52
2.4.6 One Time Pad............................................................................................. 2 - 14 3.1 Number Theory ............................................................................................... 3 - 2 3.13 Multiple Choice Questions with Answers ..................................................... 3 - 54
2.4.7 Feistel Cipher ............................................................................................. 2 - 14 3.1.1 Divisibility ..................................................................................................... 3 - 2
Unit IV
2.4.8 Comparison between Monoalphabetic and Polyalphabetic Cipher .......... 2 - 17 3.1.2 Prime Number.............................................................................................. 3 - 2
2.5 Transposition Techniques ............................................................................. 2 - 20 3.1.2.1 Relatively Prime Numbers.............................................................................. 3 - 3 Chapter - 4 Data Integrity Algorithms and Web Security
(4 - 1) to (4 - 60)
2.5.1 Comparison of Substitution and Transposition Ciphers ............................. 2 - 21 3.1.3 Greatest Common Divisor............................................................................ 3 - 4
3.2 Fermat and Euler Theorems ........................................................................... 3 - 5 4.1 Cryptographic Hash Functions ........................................................................ 4 - 2
2.6 Block Ciphers ................................................................................................. 2 - 23
3.2.1 Fermat’s and Euler’s Theorems ................................................................... 3 - 5 4.1.1 Requirement and Security ............................................................................ 4 - 3
2.6.1 Advantages and Disadvantage of Block Cipher ......................................... 2 - 24
3.3 Testing for Primality ........................................................................................ 3 - 7 4.1.2 Applications of Cryptographic Hash Functions ............................................ 4 - 3
2.7 Block Cipher Modes of Operation................................................................. 2 - 24
4.1.3 Two Simple Hash Functions ......................................................................... 4 - 4
2.8 Simple DES .................................................................................................... 2 - 29 3.4 Chinese Reminder Theorem ........................................................................... 3 - 8
4.1.4 Birthday Attack ............................................................................................ 4 - 5
2.9 Data Encryption Standard ............................................................................. 2 - 33 3.5 Euclid's Algorithm ......................................................................................... 3 - 11
4.2 Hash Functions Based on Cipher Block Chaining ............................................ 4 - 6
2.9.1 Details of Single Round .............................................................................. 2 - 35 3.5.1 Extended Euclidean Algorithm................................................................... 3 - 12
4.3 Secure Hash Algorithm (SHA).......................................................................... 4 - 7
2.9.2 Key Generation .......................................................................................... 2 - 39 3.6 Discrete Logarithm ........................................................................................ 3 - 15
4.3.1 Secure Hash Algorithm (SHA-512) ................................................................ 4 - 8
2.9.3 DES Encryption ........................................................................................... 2 - 39 3.6.1 Computing Discrete Logarithm .................................................................. 3 - 16
4.3.2 SHA-3 .......................................................................................................... 4 - 13
2.9.4 DES Decryption .......................................................................................... 2 - 41 3.7 Public Key Cryptography .............................................................................. 3 - 17
4.4 Message Digest ............................................................................................. 4 - 15
2.9.5 DES Weak Keys........................................................................................... 2 - 41 3.7.1 Advantages and Disadvantages ................................................................. 3 - 20
4.4.1 MD5 Description ......................................................................................... 4 - 15
2.9.6 Advantages of DES ..................................................................................... 2 - 41 3.7.2 Comparison between Public Key and Private Key Algorithm .................... 3 - 20
4.4.2 Differences between MD4 and MD5 ......................................................... 4 - 17
2.9.7 Disadvantages of DES................................................................................. 2 - 42 3.8 RSA ................................................................................................................ 3 - 22
4.4.3 Comparison between MD5 and SHA ......................................................... 4 - 17 4.13.4 Security Association .................................................................................... 4 - 49 5.3 Intrusion Detection ......................................................................................... 5 - 9
4.5 Message Authentication Codes .................................................................... 4 - 18 4.13.5 SA Parameters ............................................................................................ 4 - 50 5.3.1 Prevention ................................................................................................. 5 - 10
4.5.1 Message Authentication Requirements .................................................... 4 - 19 4.13.6 Transport Mode .......................................................................................... 4 - 50 5.3.2 Detection .................................................................................................... 5 - 11
4.5.2 Application of MAC .................................................................................... 4 - 19 4.13.7 Tunnel Mode............................................................................................... 4 - 51 5.3.3 Function and Strength of IDS ...................................................................... 5 - 11
4.5.3 MAC based on DES..................................................................................... 4 - 20 4.13.8 Application of IPSec .................................................................................... 4 - 52 5.3.4 Types of IDS ................................................................................................ 5 - 12
4.6 Digital Signatures .......................................................................................... 4 - 21 4.13.9 Benefits of IPSec ......................................................................................... 4 - 52 5.3.4.1 Anomaly Detection ...................................................................................... 5 - 12
4.6.1 Arbitrated Digital Signatures ..................................................................... 4 - 21 4.14 Authentication Header.................................................................................. 4 - 52 5.3.4.2 Signature-based Detection .......................................................................... 5 - 13
4.6.2 Direct Digital Signature .............................................................................. 4 - 22 4.14.1 AH Transport Mode .................................................................................... 4 - 54 5.3.4.3 Comparison between Signature-based and Anomaly Detection ................. 5 - 13
4.6.3 Digital Signature Standard ......................................................................... 4 - 23 4.14.2 AH Tunnel Mode ......................................................................................... 4 - 54 5.3.4.4 Network based System ................................................................................ 5 - 13
4.6.4 Digital Signature Algorithm........................................................................ 4 - 24 4.15 ESP ................................................................................................................. 4 - 55 5.3.4.5 Host-based IDSs (HIDS) ................................................................................ 5 - 14
4.7 PKI ................................................................................................................. 4 - 25 4.15.1 ESP Format .................................................................................................. 4 - 55 5.3.4.6 Differences between HIDS and NIDS............................................................ 5 - 15
4.7.1 Benefits and Limitation of PKI ..................................................................... 4 - 27 4.15.2 Encryption and Authentication Algorithms ................................................ 4 - 55 5.3.5 Limitation of IDS ......................................................................................... 5 - 16
4.7.2 Certificate .................................................................................................... 4 - 27 4.15.3 Padding ....................................................................................................... 4 - 56 5.3.6 Difference between IDS and IPS ................................................................. 5 - 16
4.8 X.509 Certificate ............................................................................................ 4 - 29 4.15.4 Comparison between AH and ESP .............................................................. 4 - 56 5.3.7 Intrusion Detection Techniques ................................................................. 5 - 17
4.8.1 X.509 Format of Certificate........................................................................ 4 - 30 4.16 Multiple Choice Questions with Answers ..................................................... 4 - 56 5.3.8 Tools for Intrusion Detection ...................................................................... 5 - 17
4.8.2 Obtaining User’s Certificate ....................................................................... 4 - 31 Unit V 5.3.9 Distributed IDS ............................................................................................ 5 - 18
5.9 Concepts of Trusted System ......................................................................... 5 - 36 6.7.5 Investigating Cyber Stalking........................................................................ 6 - 28 Notes
5.10 Trusted Computing ....................................................................................... 5 - 37 6.8 Proxy Servers ................................................................................................ 6 - 29
5.10.1 Software Reverse Engineering .................................................................... 5 - 38 6.9 Anonymizers.................................................................................................. 6 - 30
5.10.2 Digital Rights Management ........................................................................ 5 - 39 6.10 Phishing ......................................................................................................... 6 - 30
5.11 Multiple Choice Questions with Answers ..................................................... 5 - 40 6.10.1 Phishing Attacks .......................................................................................... 6 - 32
Confidentiality
Secure
Integrity
Availability
hp
nternet
nternet
hp
nternet
Sender
Receiver
hp
hp
hp hp
nternet nternet
Sender Receiver
hp
Source Server
system
Opponent modifies
hp
Target
Opponent message from sender system
to receiver
hp hp
Sender Receiver
Transformation Transformation
Secret key
shared by
sender and recipients
TM
^
X
Cryptanalyst ^
K
K
Secure channel
Key
source
K 1 , K 2 , K 3 ....... Ki
P1 , P2 , P 3 ....... Pi
Ci Pi Ki
Pi Ci Ki
P1 P2 C1 C2 Key stream
Ciphertext
Plaintext
2 38 Pay 150/-
2 47
C1 K 11 K 12 K 13 P1
C2 K 21 K 22 K 23 P2
C K K 32 K 33 P3
3 31
17 17 5
21 18 21
2 2 19
17 17 5 15
21 18 21 0
2 2 19 24
375 11
819 13
486 18
RE 0 LE 0
L1 R1
ki ki
Round i Ki
17 17 5
Li Ri
21 18 21
2 2 19
Round n Kn 17 17 5
21 18 21
LD 0 F( RD 0 , K 16 ) 2 2 19
F
15 15 375 11
Ln Rn 0 0 819 13
24 24 486 18
Ln+1 Rn+1
0 13 14
19 6 4
17 1 25
2 4 4 8
18 13 0
14
4 18 19 11
K P mod 26
0 13 14 4 4 8
19 6 4 18 13 0 mod 26
0 13 14
17 1 25 18 19 11
19 6 4
17 1 25
486 435 154
256 230 196 mod 26
536 556 411
0 13 14 2 18 19 24
22 22 14 mod 26
19 6 4 14 mod 26
17 1 25 4 16 10 21
238 4 S T Y
W W D mod 26
138 mod 26 8
148 18 Q K V
227
16
Time = 1 Time = 2 Time = N
P1 P2 PN
K K K
Encrypt Encrypt Encrypt
C1 C2 Encryption CN
EK
C1 C2 CN
Ci E k (Pi C i 1 )
Co EK ( m o I ) Pi C i 1 D k (C i )
K K K
Decrypt Decrypt Decrypt
Ci E K ( mi C i 1 )
P1 P2 Decryption PN
P0 P1 P2 C0 C1 C2
IV + + +
Key D D D Decryption
Encryption box
Key E E E box
+ + + Exclusive
IV
OR
C0 C1 C2 P0 P1 P2
Encryption Decryption
Plaintext
Ciphertext
K
Key Encrypt Decrypt
Counter Counter 1
Ki Select discard
P1 + P2 +
Ciphertext Plaintext
C1 C2
(a) Encryption
Counter Counter 1
b 1 b 2 b3 b 4 b 5 b 6 b7 b 8
k 1 k 2 k 3 k 4 k 5 k 6 k 7 k 8 k 9 k 10
Key Encrypt Key Encrypt
C1 C2
K1 K2
+ +
K1 S1
P1 P2 K2 S2 S1
(b) Decryption LS 1 LS 2
k 1 k 2 k 3 k 4 k 5 k 6 k 7 k 8 k 9 k 10 k 3 k 5 k 2 k 7 k 4 k 10 k 1 k 9 k 8 k 6
i th
Li Ri 1 R i L i 1 f(R i 1 , K i )
LS 1
Ln Rn
Rn Ln
LS 2
b1 b2 b 3b4 b 1b 4 , b 2 b 3
K1 , K 2 Kn
Kn Kn1 K1
K1 K2 f(R i 1 , K i ) f(Ri 1 , Ki )
IP 1 fK 2 fK 1 Ri–1
E(Ri–1)
Ki
1
IP
4 bits 4 bits
S1 S2
L 0 R0 L0
R0 i th f(Ri–1, Ki)
fK
L i1 Ri1 L i Ri Ki
f (R i 1, k i)
fK FK
Li–1 Ri–1
FK
f Ki 1 2 3 4 5 6
1 2 4 3 4 3 5 6
E(Ri 1 )
Ki
Li Ri
Plain text (64 bit) Key (64 bit)
64 56
f(Ri 1 , Ki ) 48
Permuted
56
Left circular
Round 1
choice 2 shift
K1
64 56
48 56
Permuted Left circular
6 th Round 2
choice 2 shift
K2
f ( R i 1 , K i )
48 56
Permuted Left circular
Round 16
choice 2 shift
K16
32 bit swap
64
Inverse initial
permutation
Li – 1 Ri – 1 Ci – 1 Di – 1
E
+
F 48
Permutation /
XOR Ki
contraction
48
S1 S2 S3 S4 S5 S6 S7 S8
Substitution / choice
(S-box)
P
32
Permutation 32 bits
(P)
32
XOR
Li Ri Ci Di
b1 b2 b3 b4 b5 b6 L R
R L ( ) f (R, K) Kn
Kn
4 bit column L0 R0
number Kn
2 bit row
L n 1 R n 1 Kn n
number
Ln R n 1
Rn L n 1 R n 1 K n
R 16 L 16
Key
R 10 L 10 K 10
Permuted
choice 1 K 10
C0 D0
Left Left
shift shift
C1 D1
Permuted K1
choice 2
Left Left
shifts shifts
CN DN
Permuted KN
choice 2
Left Left
shifts shifts
C16 D16
Permuted K16
choice 2
E K 2 (E K 1 (P))
D K 1 (D K 2 (C)) K1 (K 2 )
K3
E K 2 (E K 1 (P))
C = E K 3 [D K 2 [E K 1 [P]]]
K1
DES reverse DES Encryption Key 3
DES cipher
cipher
Ciphertext
K2
DES reverse
DES cipher
cipher
Plaintext Plaintext
Key
Substitute bytes
Round 9
Shift rows
Ciphertext Ciphertext
(a) Encryption (b) Decryption