Top Banner
RSA Cryptosystem By Coleman Gorham and Mack Weaver
38

RSA final notation change2

Apr 14, 2017

Download

Documents

Coleman Gorham
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RSA final notation change2

RSA CryptosystemBy Coleman Gorham and Mack Weaver

Page 2: RSA final notation change2

History Many civilizations have

come up with secret codes in order to pass information

First people to give a name to this practice were the Greeks

Page 3: RSA final notation change2

History

Definition: Cryptography, or hidden in Greek, was the practice and study of techniques for safe communication in the presence of a third party.

Page 4: RSA final notation change2

History

Early cryptography was solely concerned with converting messages into unreadable groups of figures to protect the message’s content during the time the message was being carried from one place to another (New World 2007).

Page 5: RSA final notation change2

Process

The process of cryptography begins with the encryption.

The creator of this encryption shares how to decode the message with the member he would like to send the message too.

Page 6: RSA final notation change2

Key Encapsulation

Class of encryption techniques designed to secure symmetric cryptographic key material for transmission using asymmetric (public-key) algorithms.

Symmetric-key algorithms have the same cryptographic keys for both encryption and decryption

Page 7: RSA final notation change2

Key Encapsulation

Public key systems are clumsy to use in transmitting long messages.

Instead they are often used to exchange symmetric keys, which are usually short.

This symmetric key is then used to encrypt the longer message

Page 8: RSA final notation change2

Example

During WWII, the German’s used a shift when they would crypt a message.

This is an example of a symmetric key.

Page 9: RSA final notation change2

Process

Since the first World War, cryptography and the process of encryption have become very difficult.

Today, encryption and decryption are heavily involved with mathematical theory.

These algorithms are hard to break and almost impossible for an inexperienced adversary to figure out.

Page 10: RSA final notation change2

RSA

The RSA or the Rivest, Shamir, Adleman was the first practicable public-key (asymmetric) cryptosystem. Asymmetric cryptosystem – requires two separate keys

(public and private)

Today it is used in order to secure data transmission.

Page 11: RSA final notation change2

RSA

In this system, the encryption key is public while the decryption key is kept a secret.

Therefore the key doesn’t need to be transmitted. Instead of sending how to decrypt the message all you

have to send is the cyphertext itself. If intercepted with a symmetric system the way to

decrypt the system is included with the cyphertext.

Page 12: RSA final notation change2

RSA

This kind of algorithm is based on the practical difficulty of factoring the product of two large prime numbers.

In order to create an encryption, the user must base the public key off of two large prime numbers.

If the prime numbers are large enough, factoring them would take even a computer a lengthy period of time.

Page 13: RSA final notation change2

Example

Instead of factoring a large prime number like 44,345,523 to find 2 prime numbers.

We can multiply two prime numbers together in order to create a public key.

Page 14: RSA final notation change2

Example

Page 15: RSA final notation change2

RSA

The prime numbers must be kept a secret Since the encryption key is public anyone can encrypt

a message, however if the public key is large enough, only someone who knows the prime numbers can decode the message.

Page 16: RSA final notation change2

Operation First, create a key. Choose two distinct prime

numbers p and q These should be of similar digit

length and take the Euler’s Totient Function (phi function) of the two numbers.

Screenshot

Euler’s Totient function – is an arithmetic function that counts the totatives of y, that is, the positive integers less than or equal to y that are relatively prime to y

Page 17: RSA final notation change2

Operation

Page 18: RSA final notation change2

Lemma Lemma 1: If p is a positive prime number, then Φ(p) = p – 1. Proof: If p is prime, then since its only positive divisors are 1

and p, all of the integers 1, 2, 3, … , p – 1 are relatively prime to p.

Page 19: RSA final notation change2

Operation By multiplying p and q together we receive and integer

y. Now we take the Euler Totient function of y.

Page 20: RSA final notation change2

P and q

Page 21: RSA final notation change2

Lemma Lemma 2: For p and q distinct primes, Φ(pq) = Φ(p) Φ(q) = (p - 1)

(q - 1). Proof: There are pq - 1 natural numbers smaller than pq including p, 2p, 3p, 4p, …, (q - 1)p and q, 2q, 3q, 4q, …, (p - 1)q, all of which

have a factor other than 1 in common with pq. Since there are (q - 1) + (p - 1) of these numbers, this leaves (pq) – 1 – (p - 1) – (q - 1) = pq – p – q + 1 = (p - 1)(q – 1) numbers

with no factors in common with pq other than 1. This shows that Φ(pq) can be applied to both p and q at the same

time.

Page 22: RSA final notation change2

Operation

So by using this function designated Φ we can compute

Φ(y) = Φ(p) Φ(q) = (p - 1)(q - 1)

Now we choose an integer x so that 1< x <Φ(y) and the gcd(x, Φ(y)) = 1

In other words, x and Φ(y) are coprime.

Page 23: RSA final notation change2

Operation

Phi of y and pick x

Page 24: RSA final notation change2

Lemma

Lemma 3: If p is prime and k is a positive integer, then gcd(n, pk) = 1 if and only if p does not divide n.

Proof: First of all if p|n, then gcd(n, pk) ≠ 1 because p also divides pk.

Conversely, if gcd(n, pk) ≠ 1 then n and pk are not relatively prime, i.e., they share a common factor greater than 1.

But the only factors of pk are powers of p and so p|n. When choosing x, x must be coprime and thus the

gcd(x, Φ(y)) = 1

Page 25: RSA final notation change2

Lemma

Lemma 4: If p is prime and k is a positive integer, then Φ(pk) = pk – pk-1.

Proof: There are precisely pk-1 integers between 1 and pk that are divisible by p, namely {p, 2p, 3p, …, pk-1p}.

So of the pk that are positive and less than or equal to pk, pk – pk-1 of them do not have a factor in common with pk.

This shows (pk) = pk – pk-1

Example: 5

Page 26: RSA final notation change2

Lemma Lemma 5: For n > 2, Φ(n) is an even integer. Proof: Divide this problem into two cases: Case 1: n is a power of 2, i.e., n = 2k (k > 1). Then

Φ(n) = Φ(2k) = 2k – 2k-1 = 2k-1(2 – 1) = 2k-1, which is even. Case 2: n is not a power of 2. In this case n is divisible by an

odd prime p, so n = pkm (k ≥ 1) and gcd(pk, m) = 1.

So, Φ(n) = Φ(pkm) = (pk – pk-1) Φ(m) = pk-1(p-1) Φ(m)

Which is even (because 2|(p-1)).

Page 27: RSA final notation change2

Operation

So now x is released as the public key exponent. Now we must determine d (private key). d ≡ x -1(mod Φ(y)) Thus, we solve for d given that dx ≡ 1 (mod Φ(y)). And thus d is kept as the private key exponent.

Page 28: RSA final notation change2

Compute d

Page 29: RSA final notation change2

Euler’s Theorem

Euler’s Theorem shows us that for some prime number n, if n and a are coprime then n and a have no common factors, n|(aΦ(n) – 1) and so, aΦ(n) ≡ 1(mod n).

Page 30: RSA final notation change2

Operation

So far now we have the public key which consists of the modulus y and the public exponent x.

The private key however consists of the modulus y and the private exponent d.

Thus the variables a, b, Φ(y) must be kept secret because they are used to calculate d.

Page 31: RSA final notation change2

Operation

The next step is to create the encryption. Therefore, give out your public key (y,x) and keep the

d value a secret. Now we wish to send out a message called TAP. Make TAP an integer by using ASCII notation

designated by b, such that T is 20, A is 01, and P is 16.

Page 32: RSA final notation change2

Operation

Next you produce the cipher text c corresponding to c ≡ bx (mod y).

This is done through modular exponentiation. Now we send the c value to the recipient

Page 33: RSA final notation change2

Compute c

Page 34: RSA final notation change2

Operation

The decryption is done by recovering the b value from c by using the private key exponent d.

This is done by computing b ≡ cd mod y.

Page 35: RSA final notation change2

Compute b

Page 36: RSA final notation change2

Euler’s Theorem If n is a positive integer with gcd(a, n) = 1, then aΦ(n) ≡ 1(mod n). Proof: If n =1, we wish to show that a0 ≡ 1(mod 1) which is

obviously true. So assume that n > 1 and let S = {a1, a2, …, aΦ(n)} be the set of positive integers less than n that are relatively prime to n.

Since gcd(a, n) = 1, and we know that aa1, aa2, …, aaΦ(n) are congruent to a1, a2, …, aΦ(n) in some order.

aa1 ≡ a’1(mod n),aa2 ≡ a’2(mod n),…aaΦ(n) ≡ a’ Φ(n)(mod n).

Page 37: RSA final notation change2

Euler’s Theorem

Taking the product of all of the congruence's yields

(aa1)(aa2)…(aaΦ(n)) ≡ a’1a’2…a’Φ(n)(mod n) = a1a2…aΦ(n)(mod n),

or

aΦ(n)(a1a2…aΦ(n)) ≡ a1a2…aΦ(n)(mod n).

Letting x = a1a2…aΦ(n), we have aΦ(n)x ≡ x(mod n) and gcd(x, n) = 1.

Now aΦ(n)x – x = kn for some integer k implies x(aΦ(n) – 1) = kn. Since n|kn, n|x(aΦ(n) – 1). But since n and x have no common factors, n|(aΦ(n) – 1) and so, aΦ(n) ≡ 1(mod n).

Page 38: RSA final notation change2

Works Cited

http://searchsecurity.techtarget.com/definition/cryptology http://mathworld.wolfram.com/RSAEncryption.html https://crypto.stanford.edu/~dabo/papers/RSA-survey.pdf http://www.studentpulse.com/articles/41/a-brief-history-of-

cryptography http://www.laits.utexas.edu/~anorman/BUS.FOR/course.mat/SSim/

history.html MatLab Cryptological Mathematics by Robert Edward Lewand