Example of RSA


A.    n = pq, Phi (n) = (p-1) (q-1)

       Pick block size b < min(p,q).    Want b coprime to n.

       Pick exponent e with gcd(e, Phi (n)) = 1.

       Get e^(-1) (= s with 1 = se + t Phi (n)).  Publish n and e.

       If message block is x_i, then send y_i = x^s_i mod n.

B.    receives y_i and computes y_i mod n    = (x_i)^(se) mod n

                                                                   = (x_i)^(1 + k Phi (n)) mod n

                                                                   = x_i (x_i^(Phi (n)) mod n

                                                                   = x_i 1^k mod n = x_i

 

E.g., Send X = "invest in bonds" using p = 61, q = 127.

       So publish n = 7747, compute Phi (n) = 7560, pick and publish e = 3113

       Compute e^(-1) = s = ... = 17

       So X --> 0813 2104 1819 0813 0114 1303 1823 (added a X)

       Raise each to 17th power and send mod 7747

       2169 0628 5540 2169 6560 6401 4829