JMU
Encryption
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Encryption Terminology
Symmetric Key Encryption
images/encryption_symmetric-key.gif
Symmetric Key Encryption (cont.)
Public Key Encryption
images/encryption_public-key.gif
Public Key Encryption (cont.)
Motivating the Rivest-Shamir-Adelman (RSA) Algorithm
Public Key Encryption (cont.)
Creating Keys with the RSA Algorithm
  1. Select two (large) prime numbers, \(p\) and \(q\)
    • \(p=7\)
    • \(q=17\)
  2. Calculate \(n = p \cdot q \)
    • \(n = 7 \cdot 17 = 119 \)
  3. Find a number, \(e\), that is relatively prime (i.e., has no common divisors with) \((p-1)(q-1)\)
    • \(e = 5\)
  4. Find a number, \(d\), such that \(d \cdot e = 1 \mod (p-1)\cdot(q-1)\) (e.g., using the extended Euclidean algorithm)
    • \(d = 77\)
  5. \(e\) and \(n\) are the public key and \(d\) is the private key
Public Key Encryption (cont.)
RSA Example