0% found this document useful (0 votes)
16 views21 pages

Cns Unit-3

Uploaded by

abhiramkothuri8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views21 pages

Cns Unit-3

Uploaded by

abhiramkothuri8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Assymetc Cryonpuy

There ave ot pulbte key


sfferest tpes of

RSA AGgetie
DIFFIE-HEUMAN) tadithm

RSA Atkme

Rvest, Shamir,tAlewo
>RSA stods fo ipher n e -tie pam
SRSA is a bock to
text are
tat aud ciphev test
n-l,SUM
RSA er USes

Altthn wmbes pke'


Delet tuo prime
Daleulate n' lue n=PX

aleudate 'z' alee.2-(p- (-)

tateger d. olich is re tively ne


to 2 GCD(p6)

Calblate
C-p°Mod
excrgion
decnyetin, P=nodu

decyptin

e=4 ;m= 5

rime wwmbers
P=3

n33

(3-)(n-)
-20
falculate onuc
td=| Mad 20
1 - 4 Mod n
1x-1I Mod 20
=l4 Mod 20
14 =1Mod 20
6

a
4X3 = I Mod ..d=3
Mod o
91 =
21 Mod 20=|

Fa encyio,
C-PMod u
-5 Mod 33
18128 Mod 3
=

fö decryptten
=(0Hod 33
=2444Mod33

P=5)

, 33
Riote
ToP-5, a =ll, e-3 M=9.
M=

Time
P=5 ad

W= PX 2-fG)-(o--)
n= 55
-(s-) (1-)

ed=| Mod d)
Caleulate ne(a) od 55
3d=l Mod uo Mod 55-4
(t Med 55= J96 Mod 55
3X \ = 1 Mod yo =3)

3= | Mod uo ()Hod S5(3Na) Mod 65


3 Modyo =1 =\6 Hod 55

d=2+ (Hod s55 26X26 Mod55


676 Mod 55
C= p wod
=9 wod 55 =256 Mod&5
=429 Mod 55 =36

516 Mod55X36Mods
mod
,2t
RRme wibers, p=l
Rine =l1 ksume

e=l3t
=(a-d(1-)
n=187
160

GCD( \60,)
C=88'mod i3t
18t
ed =| Hod fo)

z64

1=4.Mod L60 ={096 Mod 187


-{69

tx23- Mod 160


l61 Hod 160
I =
K=()mod
cewptes-he
beu BUer »
as eyConptes
the User
r the pub¦
toc asiae yae -tie
YE=mod Goupte
mod Best Ya
GupitUsere E,
K=
ush
to b o tieSSupose
Printtive
wuwber4 prime (a) mmers &kt2
qvement,
bit
e
haed is
vesut
K=( mo
K-(wod wol
(

(a

LHS =R# S
Qsethe deffe-helan ey
prme wler
eselboog
aSer has pvtte kgy Xa-5,iat

oer B' has plite key XR=l2, at


Tf
is Bs pulic key Y-?

's Poblc key Yasl


b) Cakulate B's ule koy
Yp-xwod q
=\384|294201

shad secvt ky

024
z30

Cser t Sde shed secve feey K=30


User B &de shared acvet keu K=(
=(6i)
30
LHS= RtS
S
disisi ble by 'p then
IMal P.
HeePis a pime wtwey
a is nat diotsbe by p te)
Rrove -tRa famát's
o P5 &a=9
Gien data.
Bine wumber p=5
tge ite qer a =2
:.Fermats ttle TCene =I Hod P

Substtue p&a iu eq

Mod 5
=I Mod s
l6
16 Mod5=|
ot
proted at
': Ferwatd's t e tehem
P=5 &a=2
0Rroe tiat femats ttk etem hald

P=6 a 2

P-I
a
EIod 6
5
9 E1 Mod6
3 2 I Hod s

32 Mod 6 =|
Fermas Hte teeu
t

Ax A=I Vodn

3X| =1Mod 5 3X 2 =|Mod 5


6 =I Mod 5
3 Mod 5 = |X 6 Hod 5= |

Te MP

u(Mod 26)
i|XMod 26
l = Mod 26
-2

3 -2
3 I -2 5
3 26
) 26
3
Tt-xt tt-wte t%-2Y5
=|-2Y¬2 =-2-5
T=0-2
t=5-3x
T=-2
=5+2l = 26

T=-+
Hteve e add 'a' to ¢t te
T=-7+26 )

T= 19
proed t
P a wap P-l =i Mod P
P Mod P

32 Mod 5 = 2
Hod
29
heve +ye

tiat re velaeby prime to'n

GCD ot tus wiw


gven dáta, isteu

Ealer's
: n= 5

B(5)=no
p5)=1, 2, 3,4
Relai selyne
Gal,5)=1
GDe,5) =|
GCOB,5)-/
acDl, s)l
<8

b(a)=l)2,3,4 ,5,6, 4
GcD
Gc1,3)=1
Ge,)=2 X

GcDG,3)=!
X

|GcD5,3)=)
X
GcD6,)=2

E)-S,3, 5,3
STF -d)n=]

p)=, 2,3,4) 5,6,t, &,9, l0


GCD(e,i=
GCD(2, =1
ScD G, ) =1 GcDi,)
|GcDA,Id=)
GcD (io,ll =)
sCD (5,
ase I,

(n-)
B5)= 5-)

are pvme

n=l5
(3x 5)= l5

e-|
3 3-1
3
I0=1 8|Mod
(e-dx(5-) pio)=
10=2X5
6,58,9 3,
4,5, o=,2, p
funetou
is totiet Eders
a=
3
data)) Gisen
Therow =I0 3 a fe
true hald them Ee tht
ni totet Saler's da= ehere
Mod
GCD(a,) -ten priwe
to 'u' a
SOud OYe )
+e
thevon Swers
Thevow
Gioex data,

Mod
fren S.TF

oo)I,2, 3, 4,) 5,6,1,2, "

pco-()x(5-)

9 =I Mod

I6 Mod I0=1
3 =1X
. ET is not true
4niie Rot
A wuubey pritise vest wad ,

-poer of mod M.
Tiitinta is -to be a
d qime wmtey'p', a modP,o
are distiat.
mad a P
vost ot prine vuu
2 a prtmative
data )

P=5

2 mod 5 2

2
2. mod tt wads
3 8 wad 5
wod 5
od 5 I6 wod 5
prime umer5
of prine
tive vootot of

a mad Gmod
2

2 mod 2
e r e-ere
mod
wod
2
l6 mod
wod 32 wod
mad

huber
a=3,

3mod ? 3

6
mod
wod t
429

Cinese Remander eticmK)


Ckine se vemNde eâem is 0sedto ie

gayiable bat

The CRT ttes t


hose a ique saien s f-he wbe
-)
CfT

=2(uod ; x-Buod):
X=9
5) 2wod) X=2

Gisen data x= 2(ued


X=
x=3(wed)
x=2Cuoa)
Xza,wo
m 3

ag3 my5
H
a3-2

-3X5X4

M=105
Mel M
M,=MlO5-=35

Mo=M
5
-|uo+Gt30] Hod as
=233 Mod io
M,xH,=IMod my -23
3fX | = Mod 3 .y=23
35 Mod3=1
x=2(mod3)
35X2 = Mod' 23 =2(mad)
a6Hod 13=tV 23

-3(mads)
93=3/d )
93 Mad5 =3
X2(ma
23 =2(wa)
5X |= Hod t (5 Hd? =l
2r -6(mod 20

Gisen dato,
5(moda)>= 5x4(wod
=8X+(Hod
B(mod 20) [=35
' mod 20
Cmod) uo Mod q=|
4=X
) m20 20x 3 = IMod q

6 =\X
M 9 K 20 20*4 =Mod q

20X5 =lModq
1g0-2O 100 Mod q =)
M=2o My =5
180
Mg= M 20
MgxMy =|Mod m
M=9 qxl |Mod 20

Calpusate
x2- Mod 20
18=1X
36 Med 0= | -|
IHoda
N5: Mod 20
l¢5 Mod 20-|
5

qX6=| Hod 20
5y
54 Had 20-|
8=

qxt l Hod 20
63 Mod 20-1 12 Hodq=)
3-|X
3=lX

AX& = Mod 20
12 Hod 20 =|
(2 =1X 20 Mod q=2X
4x6=odq
81 Mod 20=) 6=lx
xf=Hod4
M, =9 28Hod q =)

xa0x5 +3xqXa) mad i80


=B800t 243 wmod (80
IO3

X= u3

I3 mod 20 -3
l43 Modq8 3= 3v

You might also like