SlideShare a Scribd company logo
Lecture
10
Dr Syed Muhammad Sajjad
Department of Cyber-Security and Data Science
Riphah Institute of Systems Engineering (RISE),
Riphah International University, Islamabad, Pakistan.
Cryptography
Public-key Cryptography and RSA
Table 9.1
Terminology Related to Asymmetric Encryption
Source: Glossary of Key Information Security Terms, NIST IR 7298 [KISS06]
Misconceptions Concerning
Public‐Key Encryption
• Public‐key encryption is more secure from
cryptanalysis than symmetric encryption
• Public‐key encryption is a general‐purpose
technique that has made symmetric encryption
obsolete
• There is a feeling that key distribution is trivial
when using public‐key encryption, compared to
the cumbersome handshaking involved with key
distribution centers for symmetric encryption
• The concept of public‐key cryptography evolved from
an attempt to attack two of the most difficult
problems associated with symmetric encryption:
• Whitfield Diffie and Martin Hellman from Stanford
University achieved a breakthrough in 1976 by coming
up with a method that addressed both problems and
was radically different from all previous approaches to
cryptography
Principles of Public‐Key
Cryptosystems
• How to have secure communications in general without having to
trust a KDC with your key
Key distribution
Key distribution
• How to verify that a message comes intact from the claimed sender
Digital signatures
Digital signatures
Public‐Key Cryptosystems
• A public‐key encryption scheme has six ingredients:
Plaintext
The
readable
message
or data
that is fed
into the
algorithm
as input
Encryption
algorithm
Performs
various
transforma‐
tions on the
plaintext
Public key
Used for
encryption
or
decryption
Private key
Used for
encryption
or
decryption
Ciphertext
The
scrambled
message
produced
as output
Decryption
algorithm
Accepts
the
ciphertex
t and the
matching
key and
produces
the
original
plaintext
12- Public-key Cryptography and RSA the lecture on cryptography
Table 9.2
Conventional and Public‐Key Encryption
Public‐Key Cryptosystem: Secrecy
Public‐Key Cryptosystem: Authentication
Public‐Key Cryptosystem:
Authentication and Secrecy
Applications for Public‐Key
Cryptosystems
• Public‐key cryptosystems can be classified into
three categories:
• Some algorithms are suitable for all three
applications, whereas others can be used only for
one or two
•The sender encrypts a message
with the recipient’s public key
Encryption/decryption
Encryption/decryption
•The sender “signs” a message
with its private key
Digital signature
Digital signature
•Two sides cooperate to
exchange a session key
Key exchange
Key exchange
Table 9.3
Applications for Public‐Key Cryptosystems
Table 9.3 Applications for Public-Key Cryptosystems
Public‐Key Requirements
• Conditions that these algorithms must fulfill:
• It is computationally easy for a party B to generate a pair
(public‐key PUb, private key PRb)
• It is computationally easy for a sender A, knowing the
public key and the message to be encrypted, to generate
the corresponding ciphertext
• It is computationally easy for the receiver B to decrypt
the resulting ciphertext using the private key to recover
the original message
• It is computationally infeasible for an adversary, knowing
the public key, to determine the private key
• It is computationally infeasible for an adversary, knowing
the public key and a ciphertext, to recover the original
message
Public‐Key Requirements
• Need a trap‐door one‐way function
• A one‐way function is one that maps a domain into a range
such that every function value has a unique inverse, with the
condition that the calculation of the function is easy, whereas
the calculation of the inverse is infeasible
• Y = f(X) easy
• X = f–1(Y) infeasible
• A trap‐door one‐way function is a family of invertible
functions fk, such that
• Y = fk(X) easy, if k and X are known
• X = fk
–1(Y) easy, if k and Y are known
• X = fk
–1(Y) infeasible, if Y known but k not known
• A practical public‐key scheme depends on a suitable trap‐
door one‐way function
Rivest‐Shamir‐Adleman
(RSA) Algorithm
• Developed in 1977 at MIT by Ron Rivest, Adi
Shamir & Len Adleman
• Most widely used general‐purpose approach
to public‐key encryption
• Is a cipher in which the plaintext and
ciphertext are integers between 0 and n – 1 for
some n
• A typical size for n is 1024 bits, or 309 decimal
digits
RSA Algorithm
• RSA makes use of an expression with exponentials
• Plaintext is encrypted in blocks with each block having a binary
value less than some number n
• Encryption and decryption are of the following form, for some
plaintext block M and ciphertext block C
C = Me mod n
M = Cd mod n = (Me)d mod n = Med mod n
• Both sender and receiver must know the value of n
• The sender knows the value of e, and only the receiver knows the
value of d
• This is a public‐key encryption algorithm with a public key of
PU={e,n} and a private key of PR={d,n}
Algorithm Requirements
• For this algorithm to be satisfactory for public‐
key encryption, the following requirements
must be met:
1. It is possible to find values of e, d, n
such that Med mod n = M for all M < n
2. It is relatively easy to calculate Me mod
n and Cd mod n for all values of M < n
3. It is infeasible to determine d given e
and n
12- Public-key Cryptography and RSA the lecture on cryptography
Example of RSA Algorithm
12- Public-key Cryptography and RSA the lecture on cryptography
Exponentiation in Modular
Arithmetic
• Both encryption and decryption in RSA involve
raising an integer to an integer power, mod n
• Can make use of a property of modular
arithmetic:
[(a mod n) x (b mod n)] mod n =(a x b) mod n
• With RSA you are dealing with potentially large
exponents so efficiency of exponentiation is a
consideration
Summary
• Public‐key
cryptosystems
• Applications for public‐
key cryptosystems
• Requirements for
public‐key
cryptography
• Public‐key cryptanalysis
• The RSA algorithm
• Description of the
algorithm
• Computational
aspects

More Related Content

Similar to 12- Public-key Cryptography and RSA the lecture on cryptography (20)

PPT
Rsa
magentie
 
PPTX
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
VishwanathMahalle
 
PPT
Attaining data security in cloud computing
Gopinath Muthusamy
 
PPTX
Cryptography using rsa cryptosystem
Samdish Arora
 
PPTX
engineering cryptography pptxmodule 4 rsa.pptx
shaziasulthana2
 
PPTX
3 pkc+rsa
Shashank Mishra
 
PPT
RSA Algorithm - Public Key Cryptography
Md. Shafiul Alam Sagor
 
PPT
Public key cryptography and RSA
Shafaan Khaliq Bhatti
 
PPT
Public Key Cryptography and RSA algorithm
Indra97065
 
PPTX
UNIT-IV.pptx
SunnyAnchews
 
PPTX
Security - ch3.pptx
HabtamuHaileMichael2
 
PPTX
Public-Key Cryptography.pptx
AbdulRehman970300
 
PDF
Lecture12
Hardik Padhy
 
PPTX
Security - ch3.pptx
GebrehanaAlemaw
 
DOC
Unit 3(1)
Vinod Kumar Gorrepati
 
PPT
5967073.ppt
MuhammadFahadNaeem1
 
PPTX
RSA Algorithm and its implementation in C++.pptx
bani30122004
 
PPTX
Module2.pptx
ShilpaShettyA1
 
PPTX
Cyptography and network security unit 3-1
AsrithaKorupolu
 
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
VishwanathMahalle
 
Attaining data security in cloud computing
Gopinath Muthusamy
 
Cryptography using rsa cryptosystem
Samdish Arora
 
engineering cryptography pptxmodule 4 rsa.pptx
shaziasulthana2
 
3 pkc+rsa
Shashank Mishra
 
RSA Algorithm - Public Key Cryptography
Md. Shafiul Alam Sagor
 
Public key cryptography and RSA
Shafaan Khaliq Bhatti
 
Public Key Cryptography and RSA algorithm
Indra97065
 
UNIT-IV.pptx
SunnyAnchews
 
Security - ch3.pptx
HabtamuHaileMichael2
 
Public-Key Cryptography.pptx
AbdulRehman970300
 
Lecture12
Hardik Padhy
 
Security - ch3.pptx
GebrehanaAlemaw
 
5967073.ppt
MuhammadFahadNaeem1
 
RSA Algorithm and its implementation in C++.pptx
bani30122004
 
Module2.pptx
ShilpaShettyA1
 
Cyptography and network security unit 3-1
AsrithaKorupolu
 

Recently uploaded (20)

PPTX
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPTX
Presentation: Climate Citizenship Digital Education
Karl Donert
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
PPTX
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
PPTX
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
PPTX
LEGAL ASPECTS OF PSYCHIATRUC NURSING.pptx
PoojaSen20
 
PDF
BÀI TẬP BỔ TRỢ THEO LESSON TIẾNG ANH - I-LEARN SMART WORLD 7 - CẢ NĂM - CÓ ĐÁ...
Nguyen Thanh Tu Collection
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPTX
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
PPTX
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
PDF
The-Beginnings-of-Indian-Civilisation.pdf/6th class new ncert social/by k san...
Sandeep Swamy
 
PPTX
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
Presentation: Climate Citizenship Digital Education
Karl Donert
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
community health nursing question paper 2.pdf
Prince kumar
 
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
LEGAL ASPECTS OF PSYCHIATRUC NURSING.pptx
PoojaSen20
 
BÀI TẬP BỔ TRỢ THEO LESSON TIẾNG ANH - I-LEARN SMART WORLD 7 - CẢ NĂM - CÓ ĐÁ...
Nguyen Thanh Tu Collection
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
The-Beginnings-of-Indian-Civilisation.pdf/6th class new ncert social/by k san...
Sandeep Swamy
 
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
Ad

12- Public-key Cryptography and RSA the lecture on cryptography

  • 1. Lecture 10 Dr Syed Muhammad Sajjad Department of Cyber-Security and Data Science Riphah Institute of Systems Engineering (RISE), Riphah International University, Islamabad, Pakistan. Cryptography Public-key Cryptography and RSA
  • 2. Table 9.1 Terminology Related to Asymmetric Encryption Source: Glossary of Key Information Security Terms, NIST IR 7298 [KISS06]
  • 3. Misconceptions Concerning Public‐Key Encryption • Public‐key encryption is more secure from cryptanalysis than symmetric encryption • Public‐key encryption is a general‐purpose technique that has made symmetric encryption obsolete • There is a feeling that key distribution is trivial when using public‐key encryption, compared to the cumbersome handshaking involved with key distribution centers for symmetric encryption
  • 4. • The concept of public‐key cryptography evolved from an attempt to attack two of the most difficult problems associated with symmetric encryption: • Whitfield Diffie and Martin Hellman from Stanford University achieved a breakthrough in 1976 by coming up with a method that addressed both problems and was radically different from all previous approaches to cryptography Principles of Public‐Key Cryptosystems • How to have secure communications in general without having to trust a KDC with your key Key distribution Key distribution • How to verify that a message comes intact from the claimed sender Digital signatures Digital signatures
  • 5. Public‐Key Cryptosystems • A public‐key encryption scheme has six ingredients: Plaintext The readable message or data that is fed into the algorithm as input Encryption algorithm Performs various transforma‐ tions on the plaintext Public key Used for encryption or decryption Private key Used for encryption or decryption Ciphertext The scrambled message produced as output Decryption algorithm Accepts the ciphertex t and the matching key and produces the original plaintext
  • 7. Table 9.2 Conventional and Public‐Key Encryption
  • 11. Applications for Public‐Key Cryptosystems • Public‐key cryptosystems can be classified into three categories: • Some algorithms are suitable for all three applications, whereas others can be used only for one or two •The sender encrypts a message with the recipient’s public key Encryption/decryption Encryption/decryption •The sender “signs” a message with its private key Digital signature Digital signature •Two sides cooperate to exchange a session key Key exchange Key exchange
  • 12. Table 9.3 Applications for Public‐Key Cryptosystems Table 9.3 Applications for Public-Key Cryptosystems
  • 13. Public‐Key Requirements • Conditions that these algorithms must fulfill: • It is computationally easy for a party B to generate a pair (public‐key PUb, private key PRb) • It is computationally easy for a sender A, knowing the public key and the message to be encrypted, to generate the corresponding ciphertext • It is computationally easy for the receiver B to decrypt the resulting ciphertext using the private key to recover the original message • It is computationally infeasible for an adversary, knowing the public key, to determine the private key • It is computationally infeasible for an adversary, knowing the public key and a ciphertext, to recover the original message
  • 14. Public‐Key Requirements • Need a trap‐door one‐way function • A one‐way function is one that maps a domain into a range such that every function value has a unique inverse, with the condition that the calculation of the function is easy, whereas the calculation of the inverse is infeasible • Y = f(X) easy • X = f–1(Y) infeasible • A trap‐door one‐way function is a family of invertible functions fk, such that • Y = fk(X) easy, if k and X are known • X = fk –1(Y) easy, if k and Y are known • X = fk –1(Y) infeasible, if Y known but k not known • A practical public‐key scheme depends on a suitable trap‐ door one‐way function
  • 15. Rivest‐Shamir‐Adleman (RSA) Algorithm • Developed in 1977 at MIT by Ron Rivest, Adi Shamir & Len Adleman • Most widely used general‐purpose approach to public‐key encryption • Is a cipher in which the plaintext and ciphertext are integers between 0 and n – 1 for some n • A typical size for n is 1024 bits, or 309 decimal digits
  • 16. RSA Algorithm • RSA makes use of an expression with exponentials • Plaintext is encrypted in blocks with each block having a binary value less than some number n • Encryption and decryption are of the following form, for some plaintext block M and ciphertext block C C = Me mod n M = Cd mod n = (Me)d mod n = Med mod n • Both sender and receiver must know the value of n • The sender knows the value of e, and only the receiver knows the value of d • This is a public‐key encryption algorithm with a public key of PU={e,n} and a private key of PR={d,n}
  • 17. Algorithm Requirements • For this algorithm to be satisfactory for public‐ key encryption, the following requirements must be met: 1. It is possible to find values of e, d, n such that Med mod n = M for all M < n 2. It is relatively easy to calculate Me mod n and Cd mod n for all values of M < n 3. It is infeasible to determine d given e and n
  • 19. Example of RSA Algorithm
  • 21. Exponentiation in Modular Arithmetic • Both encryption and decryption in RSA involve raising an integer to an integer power, mod n • Can make use of a property of modular arithmetic: [(a mod n) x (b mod n)] mod n =(a x b) mod n • With RSA you are dealing with potentially large exponents so efficiency of exponentiation is a consideration
  • 22. Summary • Public‐key cryptosystems • Applications for public‐ key cryptosystems • Requirements for public‐key cryptography • Public‐key cryptanalysis • The RSA algorithm • Description of the algorithm • Computational aspects