Professional Documents
Culture Documents
Complex task
on protection of information
Done by student:
Nom.z.
m
Of the group:
TE 4.01
Variant 15
Checked by:
Kondratieva N. V.
Odessa 2014
Task 2.
2.1 General structure of RSA algorithm and signatures on the basis
of RSA algorithm:
Public key:
Secret key:
Encryption:
C M (mod n).
Decryption:
M Cd (mod n).
Signature:
S Md (mod n).
Decryption of
signature:
M Se (mod n).
15
11
13
18, 26, 47
Message =15
1. n = p*q = 11*13 = 143
2. (n) = (p 1)(q 1)=(11 1)(13 1)=10*12=120
2.3 Subscriber B encrypts and
subscriber A, subscriber A decrypts it.
1. C M (mod n)
passes
message
to
the
Y = Z mod
X
H = Z div
X
26
64
26
120
26
10
2x1+0=2
26
10
2x2+1=5
10
1x5+2=7
2x7+5=19
Pi=HiPi-1+Pi-2(mod
n)
3x19+7=64
2616(mod143) = (mod143) = 26
2616(mod143) = (mod143) = 104
2632(mod143) = (mod143) = 91
M = 91*130*91*26(mod143) = 27989780(mod143) = 104
2.4 Subscriber A signs a message by secret RSA key. Subscriber B
checks up a signature.
S Md (mod n) 2545(mod85)
45 = 32 + 8 + 4 + 1
1041(mod143) = 104
1042(mod143) = 91
1044(mod143) = 130
1048(mod143) = 26
10416(mod143) = 104
10432(mod143) = 91
S = 26*91*26*91(mod85) = 5597956(mod143) = 78
Decryption of signature:
M Se (mod n) = 7827(mod85)
27 = 16 + 8 + 2 + 1
781(mod143) = 78
782(mod143) = 78
784(mod143) = 78
788(mod143) = 78
7816(mod143) = 78
M = 78*78*78*78(mod143) = 37015056(mod143) = 78
Task 3.
A computes
Encryption
of
B chooses a random
calculates
.
from
, then
.
into an element
of
B calculates
B sends the
ciphertext
Decryption
to A.
ka
Kb
15
43
13
16
18
Message =14
Y = qka(modp) = 1316(mod43)
16 = 16+2
131(mod43)=13
132(mod43)=40
134(mod43)= 402(mod43)=9
138(mod31)= 92(mod43)=38
Y = 38 * 9 * 40 (mod 43) = 14
Open key:
Secret key:
Y = 16
Ka = 16
q = 13
P = 43
p = 43
C = MR = 148 = 11101000=0110=6
Values C, Z are transmitted. Deciphering:
R = Zka(modp) = 2716(mod31)
16 = 8 + 8
211(mod43) = 23
212(mod43) = 13
214(mod43) = 169(mod43) = 40
218(mod43) = 1600(mod43) = 9
R = 2*8*16(mod31) = 8
M = CR = 88= 01101000 = 1110 = 21
Task 4.
4.1 Structure of Diffi-Khellman algorithm:
1. Both subscribers have same prime number P and common mantissa D<(P-1) before
communication session start.
2. Every subscriber (1-st and 2-nd) chooses any natural number with conditions 1<X1<(P-1) and
1<X2<(P-1)
3. Every subscriber using own number X calculates Y1 D X1 (mod P ) and Y2 D X 2 (mod P)
4. Subscribers change with Y1 Y2 values between themselves by open channel.
5. Every subscriber calculates session key for ciphering for symmetric algorithm by the next
formulas: K12
Y2 1 (mod P) Y1 2 (mod P)
Communication Channel
p, D, X1
Y1 D (mod p)
p, D, X2
X1
Subscriber
Subscriber
Y2 D (mod p)
X2
Y2X (mod p)
Y1X (mod p)
kb
15
50
15
16
Number p = 101
Ya = aka(modp) = 5015(mod101)
15 = 8 + 4 + 2 + 1
501(mod101) = 50
502(mod101) = 76
504(mod101) = 762(mod101) = 5776(mod101) = 19
508(mod101) = 192(mod101) = 361(mod101) = 58
Ya=58*19*76*50(mod101) = 4.187.600(mod101) = 39
Yb = akb(modp) = 5016(mod101)
501(mod101) = 50
502(mod101) = 76
504(mod101) = 19
508(mod101) = 58
5016(mod101) = 582(mod101) = 3364 (mod101) = 31
(modp) =
(modp)
For subscriber A:
Ks=3115(mod101)
15 = 8 + 4 + 2 + 1
311(mod101) = 31
312(mod101) = 961(mod101) = 52
314(mod101) = 522(mod101) = 2704(mod101) = 78
318(mod101) = 782(mod101) = 6084(mod101) = 24
Ks=24*78*52*31(mod101)=87
For subscriber B:
Ks=3916(mod101)
391(mod101) = 39
394(mod101) = 1521 (mod101) = 6
394(mod101) = 62(mod101) = 36
398(mod101) = 362(mod101) = 1296(mod101) = 84
3916(mod101) = 842(mod101) = 7056(mod101) = 87
Calculator rates
System
Express
Number events: 20