r.s.a encryption

13
R.S.A Encryption through pell’s equation By:- N.C.M

Upload: chandramowliswaran-narayanaswamy

Post on 18-Aug-2015

17 views

Category:

Documents


2 download

TRANSCRIPT

R.S.A Encryption through

pell’s equation

By:- N.C.M

STEP 1

Select a secret ODD prime integer “R”

STEP 2

Consider the Diophantine Equation:

Y2 – R X2 = 1

Let (Y0 , X0 ) be the least “positive” integral

Solution of . Here X0,Y0 are kept secret.

1

1

STEP 3

Select two large ODD primes p,q

DEFINE:- N: = pq

2

STEP 4

Define α:= [Y0+ φ(n)]2 – R [Xo + e]2; Where “e” can be chosen such that

1<e< φ(n) and G.C.D ( e, φ(n)) = 1 Since G.C.D (e, φ(n))=1, there is a unique “positive” integer “d” such

that de≡1(Mod φ(n))

ASSUME Here φ(n) = Euler’s φ function

3

d3 ≠ 1(Modφ(n)) e3 ≠ 1(Modφ(n))

STEP 5

From (3), we have α = Y0

2 +[φ(n)]2 + 2Yoφ(n) −R[Xo2+e2+2X0e]

= Y0

2 −RXo2 +[φ(n)]2 + 2Y0 φ(n)− Re2− 2X0eR

α ≡1 − Re2 − 2X0eR (Mod φ(n))

α + Re2 + 2X0eR ≡ 1 (Mod φ(n))

Multiply by d3 on both sides, of the above congruence

We get, αd3+ Rd + 2X0d2R ≡ d3 (Mod φ(n))

STEP 6

Define:

S = αd3 + 2x0d2R + Rd

so, S ≡ d3 (Mod φ(n))

Step 7

Represent the given message “m” in the interval (0, n-1)

Step 8

ASSUME G.C.D (m,n) =1

Step 9

Encryption :E ≡ mS (mod n)

≡ m +k∙φ(n) (mod n)

≡ m ∙[mφ(n)]k (mod n)

So, E ≡ m (mod n)

Public key : = S, n

Step 10

Decryption = E (mod n)

= (m ) (mod n)

= m (mod n)

[d3e3 ≡1(mod φ(n)]

=m (mod n)

Step 10 Contd..

d3e3 = 1 +k1∙φ(n)

m = m∙[mφ(n)]k (Mod n)

= m(Mod n)

1