You are on page 1of 4

Lecture 5 Cryptograghy

Just add or question 1 (insert SQL injection)


(means commenting out)
i.e
50 mod 26 = 24
15 mod 26 = 15 (if first number smaller than thats the answer)
i.e
A=0
B=1
C=2
D=3
E=4
and so on
c = (p + k) mod 26
P=M
K=R
= (12+17) mod 26
= 29 mod 26
=3=D
i.e - Cypertext
to be or not P
run run run Key
*repeat the key depending on the length of the P
tob
run
c = (19+17) mod 26
= 36 mod 26
10 K
c = (14+20) mod 26
= 34 mod 26
=8I

c = (1+13) mod 26
= 14 mod 26
= 14 O
ANS: KIO
Plaintext example
K=run
C=kio
10 = (p + 17) mod 26
p = 19
19 = T
c = (p+k) mod 26
8 = (p + 20) mod 26
34 20 = 14
p=O
c = (p+k) mod 26
14 = (P+13) Mod 26
14 13 = 1
p=B
Early Block
J is omitted
PALMERSTON
P

P = KJ = KI
-

If J is chosen, replace with I

- Now KI is our plaintext


- Use successive key (to the right)
P = KI
= QK
i.e
LO = MT
-

Use successive key (use diagonal when there not next to each
other)

Circular Motion
AW = SA
P

AA

Duplicated Numbers
- duplicated numbers become an X
- j equals i
i.e
ii = ix = kw
i.e

kjj = kii = kix = KI XZ


Rules:
- duplicated
- successive
- circular
- corners
- odd numbers it has to be a pair and equals Z
- I=J
Collision
H (M1) = H (M2)
H(MI) = X
H(M2) = Y
IF X = Y than values will be interchangeable
Substitution Box
- change the value to inverted (i.e) 1 = 0, 0 = 1
- every S box takes 4 bits
- collision domain is equal to amount of bits; 2 to the power of n
divided by 2
counter encryption
k4 = (IV+4)k

You might also like