SUNY Geneseo Department of Computer Science


Cryptography Examples

{Date}

CSci 141, Fall 2003
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture


End-of-Semester

CS Dept. holiday party

SOFIs in class next Monday (12/8)

Final

Questions?

RSA Cryptography

To create a public/private key pair:

  1. Pick two prime numbers, p & q, such that p mod 4 = q mod 4 = 3
  2. Compute n = p*q
  3. Choose e such that e is relatively prime to n
  4. Find d such that e * d mod (p-1)(q-1) = 1

The public key is the pair (e,n)

The private key is the pair (d,n)

Encrypt a numeric message x as y = xe mod n

Decrypt y as x = yd mod n

Demonstration:

To simplify exponentiations mod n


Next Lecture