15.07.2013 Views

aryabhata remainder theorem: relevance to public-key crypto ...

aryabhata remainder theorem: relevance to public-key crypto ...

aryabhata remainder theorem: relevance to public-key crypto ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 RAO AND YANG<br />

2.1. Aryabhata <strong>remainder</strong> <strong>theorem</strong> (ART)<br />

Theorem (ART). Let m1 and m2 be relatively prime moduli and M = m1m2.<br />

Given X mod m1 = x1, X mod m2 = x2, X has a unique solution in Z M given by<br />

X = ART(x1, x2; m1, m2; M)<br />

= ART(0, c; m1, m2; M) + x1, where c = (x2 − x1) mod m2<br />

= A + x1, where A = m1[(c · m −1<br />

1 ) mod m2].<br />

Proof. First we show that X = A + x1 ∈ Z M. Because A = m1 · b for some<br />

b ∈ Zm2 , A must be less than or equal <strong>to</strong> m1(m2 − 1). Because x1 < m1, A + x1<br />

must be less than M = m1m2, and therefore X ∈ Z M. Now consider (A +<br />

x1) mod m1. Because A is a multiple of m1, wehave(A + x1) mod m1 = x1.<br />

Because A mod m2 = c due <strong>to</strong> the cancellation of the terms m1 and m −1<br />

1 ,wehave<br />

(A + x1) mod m2 = c + x1 = x2. Thus, A + x1 = X satisfies the two congruences<br />

as required and is a solution in Z M. It is easy <strong>to</strong> show that A + x1 is a unique<br />

solution in Z M. IfY ∈ Z M is another solution, then (X − Y ) mod mi = 0, for<br />

i = 1, 2, and (X − Y ) mod M = 0. Thus, X = Y . ✷<br />

A formal extension of ART <strong>to</strong> any number of moduli is rather straightforward and<br />

is given in Section 5. Here we illustrate by an example.<br />

Example 3. Let X mod 3 = x1 = 1, X mod 4 = x2 = 3, and X mod 5 = x3 = 3.<br />

Then X = ART(1, 3, 3; 3, 4, 5; 60).<br />

Step 1.<br />

Step 2.<br />

X ′ = X mod 12 = ART(1, 3; 3, 4; 12)<br />

= ART(0, 2; 3, 4; 12) + 1<br />

= 3[(2 · 3 −1 ) mod 4]+1<br />

= 3 · 2 + 1 = 7<br />

X = ART(7, 3; 12, 5; 60)<br />

= ART(0,(3 − 7) mod 5; 12, 5; 60) + 7<br />

= ART(0, 1; 12, 5; 60) + 7<br />

= 12[(1 · 12 −1 ) mod 5]+7<br />

= 12 · 3 + 7 = 43<br />

3. Multiplicative inverse<br />

Given positive pairwise prime integers a and b, it is very often necessary <strong>to</strong> find<br />

a −1 mod b. That is, <strong>to</strong> find x ∈ Zb such that a · x mod b = 1. In RSA, the private

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!