SlideShare a Scribd company logo
1 of 38
RSA Cryptosystem
By Coleman Gorham and Mack Weaver
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
History
 Definition: Cryptography, or hidden in Greek, was the
practice and study of techniques for safe
communication in the presence of a third party.
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).
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.
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
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
Example
 During WWII, the German’s used a shift when they would
crypt a message.
 This is an example of a symmetric key.
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.
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.
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.
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.
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.
Example
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.
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
Operation
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.
Operation
 By multiplying p and q together we receive and integer y.
 Now we take the Euler Totient function of y.
 P and q
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.
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.
Operation
 Phi of y and pick x
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
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
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)).
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.
 Compute d
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).
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.
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.
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
 Compute c
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.
 Compute b
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).
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).
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

More Related Content

What's hot

Proof of Kraft-McMillan theorem
Proof of Kraft-McMillan theoremProof of Kraft-McMillan theorem
Proof of Kraft-McMillan theoremVu Hung Nguyen
 
The Mathematics of RSA Encryption
The Mathematics of RSA EncryptionThe Mathematics of RSA Encryption
The Mathematics of RSA EncryptionNathan F. Dunn
 
Error control coding bch, reed-solomon etc..
Error control coding   bch, reed-solomon etc..Error control coding   bch, reed-solomon etc..
Error control coding bch, reed-solomon etc..Madhumita Tamhane
 
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithmVaibhav Khanna
 
Improved security system using steganography and elliptic curve crypto...
Improved  security  system using  steganography  and  elliptic  curve  crypto...Improved  security  system using  steganography  and  elliptic  curve  crypto...
Improved security system using steganography and elliptic curve crypto...atanuanwesha
 
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE Qualcomm
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic EncryptionGöktuğ Serez
 
Broadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attackBroadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attackAnkita Kapratwar
 
Random Oracle Model & Hashing - Cryptography & Network Security
Random Oracle Model & Hashing - Cryptography & Network SecurityRandom Oracle Model & Hashing - Cryptography & Network Security
Random Oracle Model & Hashing - Cryptography & Network SecurityMahbubur Rahman
 
Introduction - Lattice-based Cryptography
Introduction - Lattice-based CryptographyIntroduction - Lattice-based Cryptography
Introduction - Lattice-based CryptographyAlexandre Augusto Giron
 
Presentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_PaperPresentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_PaperNithin Cv
 
Lattice Based Cryptography - GGH Cryptosystem
Lattice Based Cryptography - GGH CryptosystemLattice Based Cryptography - GGH Cryptosystem
Lattice Based Cryptography - GGH CryptosystemVarun Janga
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareProf. Swapnil V. Kaware
 

What's hot (20)

Proof of Kraft-McMillan theorem
Proof of Kraft-McMillan theoremProof of Kraft-McMillan theorem
Proof of Kraft-McMillan theorem
 
The Mathematics of RSA Encryption
The Mathematics of RSA EncryptionThe Mathematics of RSA Encryption
The Mathematics of RSA Encryption
 
Error control coding bch, reed-solomon etc..
Error control coding   bch, reed-solomon etc..Error control coding   bch, reed-solomon etc..
Error control coding bch, reed-solomon etc..
 
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithm
 
Chap 3
Chap 3Chap 3
Chap 3
 
Lecture6 rsa
Lecture6 rsaLecture6 rsa
Lecture6 rsa
 
Unequal-Cost Prefix-Free Codes
Unequal-Cost Prefix-Free CodesUnequal-Cost Prefix-Free Codes
Unequal-Cost Prefix-Free Codes
 
Improved security system using steganography and elliptic curve crypto...
Improved  security  system using  steganography  and  elliptic  curve  crypto...Improved  security  system using  steganography  and  elliptic  curve  crypto...
Improved security system using steganography and elliptic curve crypto...
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
Quantum Noise and Error Correction
Quantum Noise and Error CorrectionQuantum Noise and Error Correction
Quantum Noise and Error Correction
 
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
RSA - ALGORITHM by Muthugomathy and Meenakshi Shetti of GIT COLLEGE
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
Broadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attackBroadcasting and low exponent rsa attack
Broadcasting and low exponent rsa attack
 
同態加密
同態加密同態加密
同態加密
 
Random Oracle Model & Hashing - Cryptography & Network Security
Random Oracle Model & Hashing - Cryptography & Network SecurityRandom Oracle Model & Hashing - Cryptography & Network Security
Random Oracle Model & Hashing - Cryptography & Network Security
 
Introduction - Lattice-based Cryptography
Introduction - Lattice-based CryptographyIntroduction - Lattice-based Cryptography
Introduction - Lattice-based Cryptography
 
Presentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_PaperPresentation on Cryptography_Based on IEEE_Paper
Presentation on Cryptography_Based on IEEE_Paper
 
Lattice Based Cryptography - GGH Cryptosystem
Lattice Based Cryptography - GGH CryptosystemLattice Based Cryptography - GGH Cryptosystem
Lattice Based Cryptography - GGH Cryptosystem
 
Cryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil KawareCryptography & Network Security By, Er. Swapnil Kaware
Cryptography & Network Security By, Er. Swapnil Kaware
 

Viewers also liked

Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystemSamdish Arora
 
Islamic sim to be showcased in Africa
Islamic sim  to be showcased in AfricaIslamic sim  to be showcased in Africa
Islamic sim to be showcased in AfricaYiannis Hatzopoulos
 
A Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA VariantsA Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA Variantsijsrd.com
 
Project presentation - Steganographic Application of improved Genetic Shifti...
Project presentation  - Steganographic Application of improved Genetic Shifti...Project presentation  - Steganographic Application of improved Genetic Shifti...
Project presentation - Steganographic Application of improved Genetic Shifti...Vladislav Kaplan
 
ECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-NinjasECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-NinjasJames McGivern
 

Viewers also liked (8)

Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
 
Islamic sim to be showcased in Africa
Islamic sim  to be showcased in AfricaIslamic sim  to be showcased in Africa
Islamic sim to be showcased in Africa
 
A Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA VariantsA Literature Review of Some Modern RSA Variants
A Literature Review of Some Modern RSA Variants
 
Rsa Crptosystem
Rsa CrptosystemRsa Crptosystem
Rsa Crptosystem
 
Project presentation - Steganographic Application of improved Genetic Shifti...
Project presentation  - Steganographic Application of improved Genetic Shifti...Project presentation  - Steganographic Application of improved Genetic Shifti...
Project presentation - Steganographic Application of improved Genetic Shifti...
 
ECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-NinjasECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-Ninjas
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Similar to RSA final notation change2

2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiouvafopoulos
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysDharmalingam Ganesan
 
Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!Ashutosh Tripathi
 
An Introduction to RSA Public-Key Cryptography
An Introduction to RSA Public-Key CryptographyAn Introduction to RSA Public-Key Cryptography
An Introduction to RSA Public-Key CryptographyDavid Boyhan, JD, CIPP
 
Proof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungProof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungVu Hung Nguyen
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxvaishnavi339314
 
11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdfVipinNegi38
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dDharmalingam Ganesan
 
Cryptanalysis Project Report
Cryptanalysis Project ReportCryptanalysis Project Report
Cryptanalysis Project Reportshahparin
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDharmalingam Ganesan
 

Similar to RSA final notation change2 (20)

Eulers totient
Eulers totientEulers totient
Eulers totient
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
Programming Exam Help
Programming Exam Help Programming Exam Help
Programming Exam Help
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
 
Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!Primes: a quick tour to spplications and challenges!
Primes: a quick tour to spplications and challenges!
 
An Introduction to RSA Public-Key Cryptography
An Introduction to RSA Public-Key CryptographyAn Introduction to RSA Public-Key Cryptography
An Introduction to RSA Public-Key Cryptography
 
Number theory
Number theoryNumber theory
Number theory
 
Rsa
RsaRsa
Rsa
 
Ch08
Ch08Ch08
Ch08
 
Proof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hungProof of Kraft Mc-Millan theorem - nguyen vu hung
Proof of Kraft Mc-Millan theorem - nguyen vu hung
 
Rsa
RsaRsa
Rsa
 
D0111720
D0111720D0111720
D0111720
 
PKC&RSA
PKC&RSAPKC&RSA
PKC&RSA
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
 
RSA
RSARSA
RSA
 
11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf11 Applied_Mathemathics HANDBOOK.pdf
11 Applied_Mathemathics HANDBOOK.pdf
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent d
 
Cryptanalysis Project Report
Cryptanalysis Project ReportCryptanalysis Project Report
Cryptanalysis Project Report
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private Variables
 

RSA final notation change2

  • 1. RSA Cryptosystem By Coleman Gorham and Mack Weaver
  • 2. 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
  • 3. History  Definition: Cryptography, or hidden in Greek, was the practice and study of techniques for safe communication in the presence of a third party.
  • 4. 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).
  • 5. 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.
  • 6. 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
  • 7. 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
  • 8. Example  During WWII, the German’s used a shift when they would crypt a message.  This is an example of a symmetric key.
  • 9. 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.
  • 10. 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.
  • 11. 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.
  • 12. 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.
  • 13. 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.
  • 15. 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.
  • 16. 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
  • 18. 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.
  • 19. Operation  By multiplying p and q together we receive and integer y.  Now we take the Euler Totient function of y.
  • 21. 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.
  • 22. 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.
  • 23. Operation  Phi of y and pick x
  • 24. 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
  • 25. 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
  • 26. 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)).
  • 27. 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.
  • 29. 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).
  • 30. 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.
  • 31. 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.
  • 32. 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
  • 34. 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.
  • 36. 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).
  • 37. 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).
  • 38. 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

Editor's Notes

  1. Lemma 4.4