Information Security Lectures
Information Security Lectures
Information Security Lectures
Concept of Security
• No security.
• Security through obscurity.
• Host Security.
• Network Security.
Interruption Fabrication
Modification
(Masquerade) (Denial of Service)
• Virus
Add x to y
Add x to y
Perform print job
Perform print job
Perform virus job Delete all files
Perform close job
Perform close job Return
End
End
• Worms.
• Trojan Horse.
• Applets and activeX controls.
• Cookies
• Packet Sniffing.
• Packet Spoofing.
• DNS Spoofing.
• Caeser Cipher.
• Modified version of Ceaser cipher.
• Monoalphabetic cipher.
• Homophonic cipher.
• Polygram substitution cipher.
• Polyalphabatic substitution cipher.
C1 9 18 10 p1
C2 = 16 21 1 p2 (mod 26)
C3 5 12 23 p3
4 9 18 10 8
14 = 16 21 1 2 (mod 26)
12 5 12 23 0
19 9 18 10 13
12 = 16 21 1 19 (mod 26)
14 5 12 23 3
18 9 18 10 14
21 = 16 21 1 8 (mod 26)
9 5 12 23 19
23 9 18 10 1
9 = 16 21 1 2 (mod 26)
17 5 12 22 3
23 9 18 10 7
9 = 16 21 1 5 (mod 26)
17 5 12 22 0
• Hill Cipher
• Takes n successive letters. Each letter of the
• English alphabet is assigned a value: a = 0, b = 1, c =
2, ..., y = 24, z = 25
• A set of linear equations is used to define the
encryption using modular arithmetic.
Structure (3 characters at a time):
• – C1 = K1,1 P1 + K1,2 P2 + K1,3 P3 mod 26
• – C2 = K2,1 P1 + K2,2 P2 + K2,3 P3 mod 26
• – C3 = K3,1 P1 + K3,2 P2 + K3,3 P3 mod 26
The receiver knows the key, and can solve the system of
equations for unknowns Pi :
• – C1 = K1,1 P1 + K1,2 P2 + K1,3 P3 mod 26
• – C2 = K2,1 P1 + K2,2 P2 + K2,3 P3 mod 26
• – C3 = K3,1 P1 + K3,2 P2 + K3,3 P3 mod 26
This system has solutions iff the matrix K is invertible.
• Let M be its inverse. Then:
• – P1 = M1,1 C1 + M1,2 C2 + M1,3 C3 mod 26
• – P2 = M2,1 C1 + M2,2 C2 + M2,3 C3 mod 26
• – P3 = M3,1 C1 + M3,2 C2 + M3,3 C3 mod 26
• C = Ek(P) = KP mod 26
• P = Dk(C) = K-1C mod 26 = K-1KP = P
• Key Exchange
Insecure Channel
Alice
Bob
Eve
05/13/22 Vivek Kapoor 55
Diffie-Hellman key exchange
• Alice
• Knows doesn't know
• p = 23 b = 15
• base g = 5
• a=6
• 56 mod 23 = 8
• 5b mod 23 = 19
• 196 mod 23 = 2
• 8b mod 23 = 2
• 196 mod 23 = 8b mod 23
• s=2
•
05/13/22 Vivek Kapoor 56
Diffie-Hellman key exchange
• Bob
• knows doesn't know
• p = 23 a=6
• base g = 5
• b = 15
• 515 mod 23 = 19
• 5a mod 23 = 8
• 815 mod 23 = 2
• 19a mod 23 = 2
• 815 mod 23 = 19a mod 23
• s=2
•
05/13/22 Vivek Kapoor 57
Diffie-Hellman key exchange
Eve Computes
A = gx mod n = 78 mod 11 = 9
B = gy mod n = 76 mod 11 = 4
Bob computes
B = gy mod n = 79 mod 11 = 8
Alice sends A (i.e. 2) to Bob. Eve intercepts it & sends his A
(i.e. 9) to Bob. In return Bob sends B (i.e. 8) to Alice. Eve
intercepts it & sends his B (i.e. 4) to Alice. Both Alice &
Bob does not know that their values has been hijacked.
05/13/22 Vivek Kapoor 60
Man in Middle Attack
• Alice--- A= 2, B= 4*
Bob computes
K2 = Ay mod n = 99 mod 11 = 5
• Now Eve Has two keys K1=5 (Bob) & K2= 9 (Alice).
• When he receive message from Alice he manipulates
them and forward it to Bob using key K1=5 and vice
versa.
• A two bit binary no. has four states 00, 01, 10, 11.
• A three bit binary no. has eight states 000, 001, 010,
100, 011, 101, 110, 111.
• As no. of bit increases by one no. the no. of binary states
increases by double.
• Thus as the key size increases the no. of binary states
increases and so is the no. of key range and efforts
required to break the key.
Algorithm Types
Encryption
Fig.
Algorithm Modes
Encryption Decryption
• Basic principles
Key discarding process- Initial key of 64 bits is used &
every 8th bit of key is discarded i.e 8, 16, 24, 32, 40, 48,
56, 64 to produce 56 bit key.
• Fig.
Fig.
• Initial Permutation
Possible Result=T
Keys
Result=T
00 Encrypt
01
10 Result=T
11
Result=T
Possible Result=T
Keys
Result=T
00
Decrypt
01 Result=T
10
11 Result=T
C
05/13/22 Vivek Kapoor 119
Triple DES
• Fig.
K2 (Bits 17-32)
K1 (Bits 1-16) K6 (Bits 81-96) Unused (Bits 97-128)
For I = 1 to r
A = ((A XOR B) <<< B) + S[2i]
B = ((B XOR A) <<< A) + S[2i = 1]
• In first two steps input plain text blocks is divided into two
32-bit blocks A & B.
• The first two sub keys S0 & S1 added to A & B. This
produces C & D.
• Sub Key generation :
ENCRYPTION
Encrypted
Cipher text CT + symmetric key K1
Digital envolope
05/13/22 Vivek Kapoor 160
Digital envolope
Encrypted
symmetric key K1 Symmetric key K1
Symmetric Key K1