Docsity

RSA Encryption, Lecture Notes - Computer Science, Study notes of Number Theory

Partial preview of the text

Download RSA Encryption, Lecture Notes - Computer Science and more Study notes Number Theory in PDF only on Docsity!

RSA Encryption

Zeph Grunschlag

Agenda

RSA Cryptography

 A useful and basically unbreakable method for encoding messages

Needed for implementing RSA:

 Fast Exponentiation

 Extended Euler‟s Algorithm

 Modular inverses

 FLT (Fermat‟s Little Theorem)

 CRT (Chinese Remainder Theorem)

There are several encryption methods. Perhaps

the simplest “unbreakable” system is the RSA

(Rivest, Shamir, Adleman) system.

FrogsRUs.com provides a large number N (e.g. 1024 bit binary number) and an encryption exponent e. Usually the

server communicates

these directly to web

browser behind the

scenes.

N, e

Mr. Smiley‟s browser then converts his

message into numbers, as in the modular

encryption that we saw before. The

letters are then put together into number

blocks with each block less than N. Mr.

Smiley‟s browser exponentiates each

number block by the exponent e modulo N and broadcasts these garbled

blocks back to FrogsRUs.com

N = 4559, e = 13.

Smiley Transmits: “Last name Smiley”

 L A S T N A M E S M I L E Y

m e^ mod N

N = 4559, e = 13.

Smiley Transmits: “Last name Smiley”

 L A S T N A M E S M I L E Y

 1201 1920 0014 0113 0500 1913 0912 0525

m e^ mod N

N = 4559, e = 13.

Smiley Transmits: “Last name Smiley”

 L A S T N A M E S M I L E Y

 1201 1920 0014 0113 0500 1913 0912 0525

 120113 mod 4559 , 192013 mod 4559, …

 2853 0116 1478 2150 3906 4256 1445 2462

m e^ mod N

FrogsRUs.com receives the encrypted

blocks n = m e^ mod N. They have a private decryption exponent d which when applied to n recovers the original blocks m : (m e^ mod N )^ d^ mod N = m

For N = 4559, e = 13 the

decryptor d = 3397.

N = 4559, d = 3397

 2853 0116 1478 2150 3906 4256 1445 2462

 28533397 mod 4559 , 01163397 mod 4559, …

N = 4559, d = 3397

 2853 0116 1478 2150 3906 4256 1445 2462

 28533397 mod 4559 , 01163397 mod 4559, …

 1201 1920 0014 0113 0500 1913 0912 0525

N = 4559, d = 3397

 2853 0116 1478 2150 3906 4256 1445 2462

 28533397 mod 4559 , 01163397 mod 4559, …

 1201 1920 0014 0113 0500 1913 0912 0525

 L A S T N A M E S M I L E Y

The key to security of RSA cryptosystem:

The public key (N,e) must be such that

it is very difficult for Snoop Snoopy

Snoop to figure out what d is, yet very

simple for FrogsRUs.com to come up

with.

Fast Modular Exponentiation

A: By taking the mod after each

multiplication.

EG, a more lucid example:

233 mod 30 

Fast Modular Exponentiation

A: By taking the mod after each

multiplication.

EG, a more lucid example:

233 mod 30  -7^3 (mod 30)