0% found this document useful (0 votes)
39 views

Week 10 Public Key Cryptography - Part 1 2

This document discusses public-key encryption and the RSA algorithm. It begins by explaining the problems with symmetric cryptography and the properties of public-key cryptosystems. It then describes how the RSA algorithm works, including generating key pairs, encryption with the public key, and decryption with the private key. The security of RSA is discussed, as well as other public-key algorithms like ElGamal and elliptic curve cryptography.

Uploaded by

Very dangger
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Week 10 Public Key Cryptography - Part 1 2

This document discusses public-key encryption and the RSA algorithm. It begins by explaining the problems with symmetric cryptography and the properties of public-key cryptosystems. It then describes how the RSA algorithm works, including generating key pairs, encryption with the public key, and decryption with the private key. The security of RSA is discussed, as well as other public-key algorithms like ElGamal and elliptic curve cryptography.

Uploaded by

Very dangger
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Public-key encryption

Adopted from
Chaminda Hewage (ph.d.),
Cardiff Metropolitan University
Learning outcomes
• Students should be able to demonstrate an understanding about
• Asymmetric encryption/Public-Key encryption
• RSA algorithm
PROBLEMS WITH SYMMETRIC CRYPTOGRAPHY

• Symmetric trust
• Key establishment
Properties of public-key cryptosystems

• The briefcase protocol

Intruder
Marwan Omar
Comm
Hello Medium
bye
Key
Encrypt #1weqAD@ Decrypt

Key Cipher-text Key

#1weqAD@12458#@#1
Drawbacks of The briefcase protocol
• Authentication
• Efficiency
A BLUEPRINT FOR A PUBLIC-KEY CRYPTOSYSTEM

• The keys used to encrypt and decrypt should be different


• Anyone who wants to be a receiver needs a unique decryption key (private
key)
• Anyone who wants to be a receiver needs to publish an encryption key
(public key)
• Some guarantee of the authenticity of a public key needs to be provided
(public-key certificate)
• It should not be feasible to deduce the plaintext from knowledge of the
cipher text and the public key
• It should not be feasible to deduce the private key from the public key
Asymmetric, or Public Key, Cryptography
A BETTER BRIEFCASE ANALOGY?
• Padlock/keys
• Engraved padlock
Exercise
• You have 30 minutes to do a search and find an example of
asymmetric encryption usage.
• You will present and explain your findings in the class. So make sure
you have electronic copy (Word/PowerPoint) of the results.
Modular arithmetic
• When working modulo n (mod n), where n is some positive
integer which we call the modulus, the only numbers that we deal
with are:
0, 1, 2, 3, . . . , n − 1.
One-way functions for public-key cryptography

• TRAPDOOR ONE-WAY FUNCTIONS


• The function should be ‘easy’ to compute
• The function should be ‘hard’ to reverse.
• One-way functions for which there exists a trapdoor of this type,
knowledge of which allows the plaintext to be obtained from the
cipher text, are referred to as trapdoor one-way functions.
One-way functions for public-key cryptography
• MULTIPLICATION OF TWO LARGE PRIMES
One-way functions for public-key cryptography
• MODULAR EXPONENTIATION WITH A LARGE MODULUS
Part 2
RSA Algorithms
• The RSA cryptosystem was one of the first proposed, and remains one
of the most used, public-key cryptosystems today.
• It is named after the three researchers Ron Rivest, Adi Shamir and
Len Adleman who first published the idea behind its
GENERATING AN RSA KEY PAIR

• Generating the modulus. Let n be the product of two large primes p


and q. In other words, let n (RSA Modulus) = p X q.
• Generating e. We select a ‘special’ number e.
• For example, it must be greater than 1 and less than (p − 1)(q − 1).
• e must have is that there must be no numbers that divide neatly into e and
into (p − 1)(q − 1) except for 1.
• The mathematical term for this property is that e and (p − 1)(q − 1) are
coprime.
GENERATING AN RSA KEY PAIR

• Let p = 3 and q = 7.
• Modulus n =?
• Lets find e?
• 1 < e < (p − 1)(q − 1)
• In this case (p − 1)(q − 1) = 2 × 6 = 12. Therefore 1 < e < 12
• Any suitable choice of e must have the property that there are no numbers
that neatly divide into e and 12, except for 1.
GENERATING AN RSA KEY PAIR

• Forming the public key. The pair of numbers (n, e) form the RSA public
key and can be made available to anyone who wishes to send encrypted
messages to the holder of the private key
• Generating the private key. We compute the private key d from p, q and
e.
e X d = 1 mod (p − 1)(q − 1).
GENERATING AN RSA KEY PAIR
• Generating the modulus. Let p = 47 and q = 59. Thus: n = pq = 47 × 59 = 2773.
• Generating e. Select e = 17, which is a valid choice since there is no number
that divides into 17 and (p − 1)(q − 1) = 46 × 58 = 2668, except for 1.
• Forming the public key. The pair of numbers (n, e) = (2773, 17) form the
public key and can be made available to anyone whom we wish to be able to
send us encrypted messages.
• Generating the private key. Input p = 47, q = 59 and e = 17 to the Extended
Euclidean Algorithm. The output will be d = 157. We can check that this result
is correct by computing:
d X e = 1 mod (p-1)(q-1) = 1 mod 2668 = 2669 = d X 17
• The private key is d = 157, which is a value that only we know.
Encryption and decryption using RSA
• RSA ENCRYPTION: Suppose that we wish to send some plaintext to
someone whose public key is (n, e).
• C = Pe mod n
• example, if the plaintext is P = 31 then encrypting using public key
(2773, 17) results in: C = 3117 = 587 mod 2773 = 587
Encryption and decryption using RSA
• RSA DECRYPTION: All the receiver does is to raise cypher text C to the
power of their private key d. The result will be the plaintext P. In other
words:
• P = Cd mod n
• Returning again to our numerical example, the cipher text C = 587 can
be decrypted using private key 157 to obtain:
• P = 587157 mod n = 31 mod 2773.
Security of RSA
An attacker can either attempt to:
• decrypt a cipher text without knowledge of the private key;
• determine the private key directly from the public key.
Other public Key algorithms
• ElGamal cryptosystem
• Elliptic curve cryptography
RELATIVE KEY LENGTHS
Hybrid encryption
Summary
• Asymmetric encryption
Questions.
Your Guide to Knowledge

You might also like