1 / 9

Proving Modular Arithmetic Properties for Primes in RSA Algorithm

This document explores the properties of modular arithmetic involving prime numbers, specifically in the context of RSA encryption. We prove that if n = p * q (where p and q are prime), then for a relatively prime integer a, several congruences can be deduced: ( a^{phi(n)} equiv 1 mod p ) and ( mod q ). The paper also demonstrates how ( a^{m+1} equiv a mod p ) and ( a^{m+1} equiv a mod q ) hold true, where gcd(a, n) = 1. This analysis is crucial for ensuring the security of RSA encryption systems.

adelle
Télécharger la présentation

Proving Modular Arithmetic Properties for Primes in RSA Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Question 13 page 160 n = p x q a. m = k x Φ(n) = k x (p – 1) x (q – 1) gcd (a, n ) = 1  am≡ a m (mod p – 1) (mod p) ≡ a k x (p – 1) x (q – 1) (mod p – 1) (mod p) ≡ a0 ≡ 1 (mod p)

  2. n = p x q m = k x Φ(n) = k x (p – 1) x (q – 1) gcd (a, n ) = 1  am≡ a m (mod p – 1) (mod q) ≡ a k x (p – 1) x (q – 1) (mod q – 1) (mod q) ≡ a0 ≡ 1 (mod q)

  3. First, we prove that: If n = p x q, p and q are primes Then a Φ(n) ≡ 1 (mod p) if a and p are relatively prime ≡ 0 (mod p) if a and p are not relatively prime And a Φ(n) ≡ 1 (mod q) if a and q are relatively prime ≡ 0 (mod q) if a and q are not relatively prime • Proof: • If a and n are relatively prime • a Φ(n) ≡ a Φ(n) (mod p – 1) (mod p) ≡ a (p – 1) x (q – 1) (mod p – 1) (mod p) ≡ a0 ≡ 1 (mod p) Similar proof for q If gcd(a,p) = b ≠ 1 As p is prime  a = c x p and b = p So a Φ(n)≡ (cp) Φ(n)≡ 0 (mod p) and a ≡ cp ≡ 0 (mod p) Similar proof for q

  4. b. Prove that : a m + 1≡ a (mod p) for all a • a m + 1≡ a kΦ(n) + 1 (mod p) • ≡ (a kΦ(n) (mod p) x a (mod p)) (mod p) • ≡ (a k ) Φ(n) (mod p) x a (mod p)) (mod p) • ≡ 1 x a (mod p) if ak and p are relatively prime • ≡ a (mod p) • If ak and p are not relatively prime • (ak)Φ(n)≡ 0 (mod p) (proven above) And a ≡ 0 (mod p) (proven above) • a m + 1 ≡ 0 x 0 ≡ 0 (mod p) • a m + 1 ≡ a ≡ 0 (mod p)

  5. Prove that: a m + 1≡ a (mod q) for all a • a m + 1≡ a kΦ(n) + 1 (mod q) • ≡ (a kΦ(n) (mod q) x a (mod q)) (mod q) • ≡ (a k ) Φ(n) (mod q) x a (mod q)) (mod q) • ≡ 1 x a (mod q) if ak and q are relatively prime • ≡ a (mod q) • If ak and q are not relatively prime • (ak)Φ(n)≡ 0 (mod q) And a ≡ 0 (mod q) • a m + 1 ≡ 0 x 0 ≡ 0 (mod q) • a m + 1 ≡ a ≡ 0 (mod q)

  6. c. Prove that: a ed≡ a (mod n) for all a Recall that d is chosen such that ed ≡ 1 (mod (p – 1) x ( q – 1)) ≡ 1 (mod Φ(n))  a ed≡ a kΦ(n) + 1 (mod n)

  7. a ed≡ a kΦ(n) + 1≡ a (mod p) (proven before) (1) a ed≡ a kΦ(n) + 1≡ a (mod q) (proven) (2) (1)  a ed= u x p + a • a ed – a = u x p , u is integer However, (2)  a ed = v x q + a  a ed – a = v x q , v is integer • u x p = v x q  u = (v x q) / p As p, q are primes, so q/p cannot be integer, and u is an integer  v/p is integer  v = t x p • a ed = v x q + a = t x p x q + a  a ed≡ a (mod p x q)

  8. d. gcd(a, n) = 1, n = p x q p, q are large primes assume gcd(a,n) = b  a = u x b = p x q  in order that b ≠ 1: b = p or b = q or b = p x q  for gcd(a, n) ≠ 1 : a = k x p or a = k x q Large p p 2p 3p 4p 5p Small p

  9. As p and q are large primes, within a certain bound of values, the number of values that makes gcd(a, n) ≠ 1 is small i.e. the number of values between 2 consecutive numbers that make gcd(a, n) ≠ 1 is large • With large primes p and q, and we randomly choose a, then gcd(a, n) is likely to be 1

More Related