You are on page 1of 9

2.2 Cryptography................................................................................................... 2 - 4 2.9.8 Block Cipher Design Principles ................................................................... 2 - 42 3.8.1 Attacks on RSA ...........................................................................................

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

(vi) (vii) (viii)

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

4.8.3 Revocation of Certificates .......................................................................... 4 - 32 5.4 Honeypot....................................................................................................... 5 - 19


Chapter - 5 Network and System Security (5 - 1) to (5 - 42)
4.8.4 Authentication Procedures ........................................................................ 4 - 32 5.5 Firewall .......................................................................................................... 5 - 19
4.8.5 Digital Certificate ....................................................................................... 4 - 33 5.1 Access Control ................................................................................................. 5 - 2 5.5.1 Types of Firewall ......................................................................................... 5 - 22
4.9 Web Security Issues ...................................................................................... 4 - 35 5.1.1 Discretionary Access Control (DAC) .............................................................. 5 - 2 5.5.1.1 Packet Filtering Router................................................................................. 5 - 22
5.1.1.1 Drawbacks of DAC .......................................................................................... 5 - 2 5.5.1.2 Application Level Gateways ......................................................................... 5 - 26
4.9.1 Transport Layer Security (TLS) ................................................................... 4 - 36
4.9.2 Comparison between IPsec and TLS .......................................................... 4 - 38 5.1.2 Mandatory Access Control (MAC) ................................................................ 5 - 3 5.5.1.3 Circuit Level Gateways ................................................................................. 5 - 27
5.1.2.1 Elements of MAC ........................................................................................... 5 - 3 5.5.1.4 Comparison between Packet Filter and Proxies........................................... 5 - 27
4.10 HTTPS ............................................................................................................ 4 - 38
5.1.2.2 MAC Implementations ................................................................................... 5 - 3 5.5.2 Firewall Location ......................................................................................... 5 - 28
4.11 SSH ................................................................................................................ 4 - 40
5.1.3 Role-Based Access Control (RBAC) ............................................................... 5 - 4 5.5.3 Firewall Configuration ................................................................................ 5 - 30
4.12 Email Security ................................................................................................ 4 - 44
5.1.3.1 Difference between DAC and RBAC ............................................................... 5 - 5 5.6 Intrusion Prevention System......................................................................... 5 - 32
4.12.1 IPv4 Header Format .................................................................................... 4 - 44
5.1.4 Access Control Matrix .................................................................................. 5 - 5 5.7 Operating System Security ............................................................................ 5 - 33
4.13 IP Security...................................................................................................... 4 - 47
5.1.4.1 ACLs and Capabilities Lists ............................................................................. 5 - 5
4.13.1 IP Security Architecture .............................................................................. 4 - 47 5.7.1 Application Security .................................................................................... 5 - 34
5.2 Flooding Attacks .............................................................................................. 5 - 6 5.7.2 Security Maintenance ................................................................................. 5 - 35
4.13.2 IPSec Document .......................................................................................... 4 - 47
5.2.1 Distributed DOS Attacks ............................................................................... 5 - 8 5.8 Multilevel Security ........................................................................................ 5 - 35
4.13.3 IPSec Services.............................................................................................. 4 - 48

(ix) (x) (xi)

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

Unit VI 6.10.2 Buffer Overflow .......................................................................................... 6 - 33


6.10.2.1 Exploitation ................................................................................................ 6 - 35
Chapter - 6 Cyber Security and Tools (6 - 1) to (6 - 40)
6.11 Password Cracking ........................................................................................ 6 - 35
6.1 Introduction .................................................................................................... 6 - 2 6.12 Keyloggers and Spywares.............................................................................. 6 - 36
6.1.1 Cybersqatting ................................................................................................ 6 - 3
6.13 The Indian IT Act - Amendments................................................................... 6 - 36
6.1.2 Cyber Terrorism ............................................................................................ 6 - 4
6.14 Challenges to Indian Law and Cybercrime Scenario in India ........................ 6 - 37
6.1.3 Cybercrime against Property ........................................................................ 6 - 5
6.15 IT Act ............................................................................................................. 6 - 37
6.2 Cybercrime and Information Security ............................................................. 6 - 7
6.15.1 Aim and Objectives of IT Act, 2000 ............................................................ 6 - 37
6.2.1 Types of Cyber Crimes .................................................................................. 6 - 8
6.15.2 Importance of IT Act ................................................................................... 6 - 38
6.2.2 Information Security Life Cycles ................................................................... 6 - 9
6.16 Multiple Chioce Questions with Answers ..................................................... 6 - 39
6.2.3 Botnets........................................................................................................ 6 - 10
6.2.4 Zombie ........................................................................................................ 6 - 12 Solved Model Question Papers (M - 1) to (M - 4)
6.3 Classification of Cybercrimes ........................................................................ 6 - 13
6.4 The Legal Perspectives - Indian Perspective ................................................. 6 - 16
6.4.1 Indian IT Act ................................................................................................ 6 - 17
6.4.2 Cyber Laws and Crimes as per the Indian IT Act ......................................... 6 - 19
6.4.3 Advantages of Cyber Law ........................................................................... 6 - 19
6.4.4 A Global Perspective on Cybercrimes ........................................................ 6 - 20
6.5 Categories of Cybercrime.............................................................................. 6 - 21
6.6 Social Engineering ......................................................................................... 6 - 21
6.7 Cyber Stalking................................................................................................ 6 - 23
6.7.1 Motivates of Cyber Stalker ......................................................................... 6 - 25
6.7.2 Types of Stalkers ......................................................................................... 6 - 25
6.7.3 Typology of Cyber Stalking ......................................................................... 6 - 27
6.7.4 Types of Stalkers ......................................................................................... 6 - 27

(xii) (xiii) (xiv)


TM

TECHNICAL PUBLICATIONS - An up thrust for knowledge

Confidentiality

Secure
Integrity
Availability
hp

Opponent Message from opponent


Opponent Read content of that appears to be from sender
message from sender
to receiver
hp hp

nternet
nternet

Sender Receiver Sender Receiver

hp

Opponent Observe pattern of


messages from sender
to receiver
hp hp

nternet

Sender
Receiver

hp

hp

Capture message from


Opponent sender to receiver, later Disrupts service
replay message to receiver provided by server
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

Legitimate connection attempt


TCP SYN packet
nternet
TCP SYN ACK packet
Sender Receiver
TCP ACK packet

Syn flood DOS attack


TCP SYN packet

TCP SYN ACK packet

The final TCP ACK packet is never sent


Trusted third
party

Sender Receiver

Transformation Transformation

Message + Secret nformation Secret + Message


message Channel message

Secret Opponent Secret


information information

Secret key
shared by
sender and recipients

Plaintext Encryption Decryption Plaintext


input algorithm algorithm output

TM

TECHNICAL PUBLICATIONS - An up thrust for knowledge

^
X
Cryptanalyst ^
K

Message X Encryption Y Decryption X


algorithm algorithm Destination
source

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

Plaintext (2w bits)


Key

Round 1 L0 w bits w bits R0 K1 Subkey


generation
algorithm
F

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

Plaintext (2w bits)

 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

Shift register Shift register

K
Key Encrypt Decrypt

Counter Counter 1
Ki Select discard

Key Encrypt Key Encrypt


P1 + +

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 Kn1 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 i1 Ri1 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)

nitial permutation Permuted


choice 1

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

Ciphertext (64 bit)

32 bits 32 bits 28 bits 28 bits R (32 bits)

Li – 1 Ri – 1 Ci – 1 Di – 1
E

Left shift Left shift


Expansion / 48 bits K(48 bits)
permutation

+
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]]]

Encryption Decryption Plaintext

DES Encryption Key 1


64-bit 64-bit
plaintext (P) plaintext (P)
DES Encryption Key 2

K1
DES reverse DES Encryption Key 3
DES cipher
cipher

Ciphertext

64-bit middle 64-bit middle


text text

K2
DES reverse
DES cipher
cipher

64-bit cipher 64-bit cipher


text (C) text (C)

Plaintext Plaintext
Key

Add round key w[0, 3] Add round key


Round 10

Substitute bytes Expand key nverse sub bytes

Shift rows nverse shift rows


Round 1

Mix columns nverse mix columns

Add round key w[4, 7] Add round key


Round 9

nverse sub bytes

nverse shift rows

Substitute bytes
Round 9

Shift rows

Mix columns nverse mix columns

Add round key w[36, 39] Add round key

Substitute bytes nverse sub bytes


Round 1
Round 10

Shift rows nverse shift rows

Add round key w[40, 43] Add round key

Ciphertext Ciphertext
(a) Encryption (b) Decryption

You might also like