Slide 1

Slide 1 text

A talk on the RSA Cryptosystem [email protected] Barcelona Compsci Club

Slide 2

Slide 2 text

Outline Why Before RSA The Paper Mathematical foundations How it works How can it be used Impact The twist! Related papers

Slide 3

Slide 3 text

Why am I doing this? We need speakers! RSA is important and interesting Need to practice, learn Beamer

Slide 4

Slide 4 text

Life before RSA We had symmetric key algorithms Hebrew Atbash cipher – 600 BC Caesar cipher – 40 BC Enigma – 1920 DES – 1975 RSA precursors (key exchange) Merkle’s Puzzles – 1974 Diffie-Hellman – 1976

Slide 5

Slide 5 text

The seventies in computing 1970 – 4-node ARPANET 1972 – Intel 8008 – first 8-bit Intel 1973 – Ethernet 1976 – Cray I – 4Mb RAM, Apple I 1978 – VAX 11/780 – 4Gb addressable RAM

Slide 6

Slide 6 text

The Paper A Method for Obtaining Digital Signatures and Public-Key Cryptosystems R.L. Rivest, A. Shamir, and L. Adleman – April 4, 1977 Public key, security and signatures Method Mathematical foundations Efficient implementation Security

Slide 7

Slide 7 text

Mathematical foundations Discrete math Euler’s totient function ϕ Fermat’s Little Theorem or Euler’s Theorem Large prime numbers are easy to find (and large composites are hard to decompose) Some optimizations . . . Much of this is number theory, which didn’t have practical uses before!

Slide 8

Slide 8 text

A note about modulus Modulus (mod in math, % in many programming languages) 7 mod 3 = 1 11 mod 6 = 5 1 ≡ 4 ≡ 7 (mod 3) 5 ≡ 11 ≡ 17 (mod 6)

Slide 9

Slide 9 text

How it works Two large prime numbers p and q (large primes are easy to find) n = pq ϕ(n) = ϕ(p)ϕ(q) = (p − 1)(q − 1) = n − (p + q − 1) (Euler’s totient) e such that 1 < e < ϕ(n) and gcd(e, ϕ(n)) = 1 Find d such that d ≡ e−1 (mod ϕ(n)) (discrete math, modulo arithmetic) Public key: n, e Private key n, d and everything else

Slide 10

Slide 10 text

Encryption and decryption functions m message c ≡ me (mod n) encryption m ≡ cd (mod n) decryption (me)d ≡ m (mod n) proved by Euler or Fermat Need ‘optimizations’ to calculate large exponents ‘quickly’

Slide 11

Slide 11 text

How it can be used You publish your public key, keep your private key private (obviously!) Anyone can encrypt a message with your public key, only you can decrypt it with your private key You can send out a message along with the message encoded with your private key. Anyone can decode the encoded message with your public key and verify it’s equal to the unencoded message

Slide 12

Slide 12 text

Impact Public key encryption is very practical (in the Internet!) Signature didn’t even exist Symmetric is much faster than asymmetric, though! Hardy will be pissed: “No one has yet discovered any warlike purpose to be served by the theory of numbers or relativity, and it seems unlikely that anyone will do so for many years”

Slide 13

Slide 13 text

British spies! 1970 – James H. Ellis (GHCQ1, formerly GC & CS2, Alan!) proves that asymmetric encryption is possible 1974 – Clifford Cocks, basically finds out the operations that work in Ellis’ paper and is equivalent to RSA (3 years before) 1976 – Malcolm Williamson invents Diffie-Helman (a few months before) RSA is just . . . intuitive? obvious? Everything fits together! 1Government Communications Headquarters 2Government Code and Cypher School

Slide 14

Slide 14 text

Related papers Diffie, W.; Hellman, M. (1976). ”New directions in cryptography”. IEEE Transactions on Information Theory 22 (6): 644654. doi:10.1109/TIT.1976.1055638 The History of Non-Secret Encryption JH Ellis 1987