SlideShare a Scribd company logo
Cryptography
CIA TRIAD
The CIA triad is a model for information security that combines three key principles and computer
security mainly concerned with these three main areas: Confidentiality, Integrity, and Availability.
The CIA triad is a common model that forms the basis for the development of security systems.
• Confidentiality: Confidentiality means that only authorized individuals/systems can view sensitive
or classified information. The data being sent over the network should not be accessed by
unauthorized individuals. The attacker may try to capture the data using different tools available
on the Internet and gain access to your information. A primary way to avoid this is to use
encryption techniques to safeguard your data so that even if the attacker gains access to your
data, he/she will not be able to decrypt it.
CIA TRIAD
Integrity:
• Integrity refers to the process of verifying that data has not been altered, therefore establishing
its reliability. It is correct, authentic, and reliable.
• Ecommerce customers, for example, expect product and pricing information to be accurate, and
that quantity, pricing, availability, and other information will not be altered after they place an
order.
• Ensuring integrity involves protecting data in use, in transit (such as when sending an email or
uploading or downloading a file), and when it is stored, whether on a laptop, a portable storage
device, in the data center, or in the cloud.
CIA TRIAD
Availability:
• Simply, availability means that networks, systems, and applications are up and running. It ensures
that authorized users have timely, reliable access to resources when they are needed.
• Many things can jeopardize availability, including hardware or software failure, power failure,
natural disasters, and human error. Perhaps the most well-known attack that threatens
availability is the Denial-of-service attack.
• In Denial Of service attack the performance of a system, website, web-based application, or web-
based service is intentionally and maliciously degraded, or the system becomes completely
unreachable.
• To prevent data loss from such occurrences, a backup copy may be stored in a geographically
isolated location, perhaps even in a fireproof, waterproof safe.
Introduction of Cryptography
• Cryptography is technique of securing information and communications through use of codes so
that only those person for whom the information is intended can understand it and process it.
Thus preventing unauthorized access to information.
Some terminology of Cryptography
• Encryption: Encryption is a fundamental concept in computer security that involves the
transformation of information or data into a coded form to prevent unauthorized access or
interception. The purpose of encryption is to ensure the confidentiality and integrity of sensitive
data as it is transmitted or stored. It is a crucial component in securing communication channels
and protecting information from being accessed by unauthorized parties.
• Ciphertext: In cryptography, ciphertext is a series of random letters and numbers that result from
encrypting text. It's also known as encrypted or encoded information.
• Decryption: Decryption is the process of converting encrypted data back into its original, human-
readable form. It's the reverse process of encryption.
• Key: A Key is a numeric or alpha numeric text or can be a unique symbol. The Key can be used at
the time of encryption takes place on the Plain Text and at the time of decryption create place on
the Cipher Text.
Types of Cryptography
Symmetric Key Cryptography
Symmetric Key Cryptography also known as Symmetric Encryption is a type of encryption where
only one key (a secret key) is used to both encrypt and decrypt electronic data. The entities
communicating via symmetric encryption must exchange the key so that it can be used in the
decryption process.
The success of this approach depends on the strength of the random number generator that is
used to create the secret key. Symmetric Key Cryptography is widely used in today's Internet and
primarily consists of two types of algorithms, Block and Stream. Some common encryption
algorithms include the Advanced Encryption Standard (AES) and the Data Encryption Standard
(DES). This form of encryption is traditionally faster than Asymmetric however it requires both the
sender and the recipient of the data to have the secret key.
The primary benefit of symmetric cryptography is its speed compared to asymmetric
cryptography. However, the major drawbacks of symmetric encryption include challenges in key
distribution and key management. As the number of users increases, the number of necessary
keys also rises. Handling the growing count of secret keys evolves into what's known as the "key
management problem”.
Symmetric Key Cryptography
Where to use Symmetric Encryption
• Bulk Data Encryption: Symmetric encryption is efficient for encrypting large amounts of data,
making it suitable for scenarios where speed and performance are crucial, such as encrypting files
or streaming media. Bulk data encryption is a method that encrypts multiple data streams
together, making it more secure for large amounts of data.
• Secure Communication: Symmetric encryption is often used to secure communication channels
between entities that share a secret key. This includes protocols like SSL/TLS for secure web
browsing and secure email communication.
• Storage Encryption: Symmetric encryption is employed to encrypt data stored on devices or in
databases, ensuring that sensitive information remains confidential, even if the storage medium
is compromised.
• Disk Encryption: Symmetric encryption is used to encrypt entire disks or volumes, protecting the
data stored on them. This is commonly used in scenarios where data security is paramount, such
as in enterprise environments or for personal data protection.
• Authentication: Symmetric encryption can be used in authentication protocols for securely
exchanging authentication tokens or credentials between parties.
Asymmetric Key Cryptography
 Asymmetric cryptography, also known as public-key cryptography, is a process that uses
a pair of related keys -- one public key and one private key -- to encrypt and decrypt a
message and protect it from unauthorized access or use.
 A public key is a cryptographic key that can be used by any person to encrypt a message
so that it can only be decrypted by the intended recipient with their private key. A private
key -- also known as a secret key -- is shared only with key's initiator.
 When someone wants to send an encrypted message, they can pull the intended
recipient's public key from a public directory and use it to encrypt the message before
sending it. The recipient of the message can then decrypt the message using their
related private key.
 If the sender encrypts the message using their private key, the message can be
decrypted only using that sender's public key, thus authenticating the sender. These
encryption and decryption processes happen automatically; users do not need to
physically lock and unlock the message.
 Many protocols rely on asymmetric cryptography, including the transport layer security
(TLS) and secure sockets layer (SSL) protocols, which make HTTPS possible.
Asymmetric Key Cryptography
Where to use Asymmetric Encryption
• Key Exchange: Asymmetric encryption is primarily used for key exchange and digital signatures in
secure communication protocols. For example, it's used during the initial handshake phase in
SSL/TLS to establish a secure connection between a client and a server.
• Digital Signatures: Asymmetric encryption is used to create digital signatures, which provide a
way to verify the authenticity and integrity of digital documents or messages. This is crucial in
applications like digital contracts, software distribution, and secure email communication.
• Secure Email Communication: Asymmetric encryption is commonly used in secure email
protocols like OpenPGP and S/MIME for encrypting email messages and attachments, ensuring
that only the intended recipients can decrypt and read the content.
• Secure File Transfer: Asymmetric encryption can be used for secure file transfer protocols like SSH
(Secure Shell) and SFTP (SSH File Transfer Protocol), providing secure authentication and
encrypted data transfer between client and server.
• Public Key Infrastructure (PKI): Asymmetric encryption is a foundational technology in PKI, used
for generating and managing digital certificates, which are used to verify the identities of users
and entities in secure communication.
Advantages of Asymmetric Encryption
 Key distribution: Eliminates the need for key exchange.
 Security: Private keys are never sent or disclosed, making it difficult for unauthorized
users to access data.
 Digital signatures: Enables recipients to confirm the origin of a message.
 Authentication: Provides authentication and non-repudiation.
 Key management: Simplifies key management because each party can keep their own
private key secure and share their public key freely.
 Secure key exchange: Allows parties to use each other's public keys to encrypt and
share their symmetric keys.
RSA Algorithm
 RSA algorithm is an asymmetric cryptography algorithm. Asymmetric actually means that
it works on two different keys i.e. Public Key and Private Key. As the name describes that
the Public Key is given to everyone and the Private key is kept private.
 RSA is invented by Rivest, Shamir and Adleman of MIT.
 It is most widely used for secure data transmission.
 RSA algorithm is known as Public key Cryptography.
 RSA algorithm consists of following steps:
 Key generation.
 Encryption
 Decryption
RSA Algorithm
Encryption formula:
 𝑪 = 𝑷𝒆
𝒎𝒐𝒅 𝒏, 𝒊𝒕 𝒔𝒉𝒐𝒖𝒍𝒅 𝒃𝒆 𝑷 < 𝒏.
 𝒘𝒉𝒆𝒓𝒆, 𝑪 = 𝑪𝒊𝒑𝒉𝒆𝒓𝒕𝒆𝒙𝒕, 𝑷 = 𝑷𝒍𝒂𝒊𝒏𝒕𝒆𝒙𝒕, 𝒆 = 𝒑𝒖𝒃𝒍𝒊𝒄 𝒌𝒆𝒚, 𝒂𝒏𝒅 𝒏 =
𝒎𝒖𝒍𝒊𝒑𝒍𝒊𝒄𝒂𝒕𝒊𝒐𝒏 𝒐𝒇 𝒕𝒘𝒐 𝒑𝒓𝒊𝒎𝒆 𝒏𝒖𝒎𝒃𝒆𝒓𝒔.
Decryption formula:
 𝑷 = 𝑪𝒅
𝒎𝒐𝒅 𝒏, 𝒊𝒕 𝒔𝒉𝒐𝒖𝒍𝒅 𝒃𝒆 𝑪 < 𝒏 .
 𝒘𝒉𝒆𝒓𝒆, 𝑪 = 𝑪𝒊𝒑𝒉𝒆𝒓𝒕𝒆𝒙𝒕, 𝑷 = 𝑷𝒍𝒂𝒊𝒏𝒕𝒆𝒙𝒕, 𝒅 = 𝒑𝒓𝒊𝒗𝒂𝒕𝒆 𝒌𝒆𝒚, 𝒂𝒏𝒅 𝒏 =
𝒎𝒖𝒍𝒊𝒑𝒍𝒊𝒄𝒂𝒕𝒊𝒐𝒏 𝒐𝒇 𝒕𝒘𝒐 𝒑𝒓𝒊𝒎𝒆 𝒏𝒖𝒎𝒃𝒆𝒓𝒔.
𝑷𝒖𝒃𝒍𝒊𝒄 𝒌𝒆𝒚 = {𝒆, 𝒏}
𝑷𝒓𝒊𝒗𝒂𝒕𝒆 𝒌𝒆𝒚 = {𝒅, 𝒏}
RSA Algorithm Key Generations
Select two large prime numbers. Suppose P and Q.
Calculate the value of, n = P*Q.
Calculate Φ(n) = (P-1)(Q-1). Where, Φ(n) Euler's Toient Function.
Choose the value of ‘e’ such that GCD(e, Φ(n))=1 and 1<e<Φ(n).
Calculate the value of ‘d’ using {(Φ(n) * k) + 1} / e
Examples
Key generations
1. Two prime numbers: P=3, Q=5
2. The value of n=P*Q = 3 * 5 = 15
3. Φ(n) = (P-1)(Q-1) = 2 * 4 = 8
4. Assuming e such that GCD(e, Φ(n))=1 and 1<e<Φ(n). So, e=3
5. Finding d using {(Φ(n) * k) + 1} / e, so, d=3
Now public key = {3, 15}, and Private key = {3, 15}
Encryption:
Consider Plaintext, P = 8
𝑪 = 𝑷𝒆
𝒎𝒐𝒅 𝒏
= 𝟖𝟑𝒎𝒐𝒅 𝟏𝟓
= 𝟓𝟏𝟐 𝒎𝒐𝒅 𝟏𝟓
𝑪 = 𝟐
Examples
Decryption:
𝑷 = 𝑪𝒅𝒎𝒐𝒅 𝒏
= 𝟐𝟑𝒎𝒐𝒅 𝟏𝟓
= 𝟖 𝒎𝒐𝒅 𝟏𝟓
𝑷 = 𝟖
Question
In an RSA cryptosystem, a particular A uses two prime numbers, 3 and 7, to generate
the public and private keys. If the value of a plain-text is P=4 then show the
encryption and decryption process.
Thank You

More Related Content

PPTX
Computer Introduction (Data Encryption)-Lecture05
PPTX
incentive plans and executive compensation analysis.pptx
PPTX
Cryptography and Network Security Principles.pptx
PPTX
Encryption in Cryptography
PDF
Achieving data integrity by forming the digital signature using RSA and SHA-1...
PPTX
Encrytion ppt
PPT
Cryptography
PPTX
CRYPTOGRAPHY IN CLOUD COMPUTING Presentation
Computer Introduction (Data Encryption)-Lecture05
incentive plans and executive compensation analysis.pptx
Cryptography and Network Security Principles.pptx
Encryption in Cryptography
Achieving data integrity by forming the digital signature using RSA and SHA-1...
Encrytion ppt
Cryptography
CRYPTOGRAPHY IN CLOUD COMPUTING Presentation

Similar to Fundamental Concept of Cryptography in Computer Security (20)

PPTX
Encryption by fastech
PPTX
Lec # 7 Symmetric and asymmetric cryptography.pptx
PDF
PPTX
IT235 POC - Unit I priciples of cryptography
PPTX
CN GP 4 Cryptogaraphy.pptx
PPTX
big data and Iot , its security part ,hoe yoy help this
PPT
Info security & crypto
PDF
Tokenization vs Encryption Difference Explained.pdf
PPT
MOBILE & WIRELESS SECURITY And MOBILE & WIRELESS SECURITY
PPTX
Cryptography
PDF
Performance Comparison of File Security System using TEA and Blowfish Algorithms
PPT
Cyber security Unit 3 Cryptography and Network security
PDF
A Survey on Cryptographic Techniques for Network Security.pdf
PPTX
Cryptography and Network Security-ch1-4.pptx
PDF
chapter 1-4.pdf
PDF
information technology cryptography Msc chapter 1-4.pdf
PDF
Analysis of Cryptographic Algorithms for Network Security
PDF
Analysis of Cryptography Techniques
PPTX
CRYPTOGRAPHY crytopgraphy wh is sd wkd ,w d .pptx
Encryption by fastech
Lec # 7 Symmetric and asymmetric cryptography.pptx
IT235 POC - Unit I priciples of cryptography
CN GP 4 Cryptogaraphy.pptx
big data and Iot , its security part ,hoe yoy help this
Info security & crypto
Tokenization vs Encryption Difference Explained.pdf
MOBILE & WIRELESS SECURITY And MOBILE & WIRELESS SECURITY
Cryptography
Performance Comparison of File Security System using TEA and Blowfish Algorithms
Cyber security Unit 3 Cryptography and Network security
A Survey on Cryptographic Techniques for Network Security.pdf
Cryptography and Network Security-ch1-4.pptx
chapter 1-4.pdf
information technology cryptography Msc chapter 1-4.pdf
Analysis of Cryptographic Algorithms for Network Security
Analysis of Cryptography Techniques
CRYPTOGRAPHY crytopgraphy wh is sd wkd ,w d .pptx
Ad

Recently uploaded (20)

PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Complications of Minimal Access Surgery at WLH
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Cell Structure & Organelles in detailed.
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Business Ethics Teaching Materials for college
PDF
Pre independence Education in Inndia.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Complications of Minimal Access Surgery at WLH
Microbial disease of the cardiovascular and lymphatic systems
Cell Structure & Organelles in detailed.
STATICS OF THE RIGID BODIES Hibbelers.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Renaissance Architecture: A Journey from Faith to Humanism
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
VCE English Exam - Section C Student Revision Booklet
2.FourierTransform-ShortQuestionswithAnswers.pdf
Business Ethics Teaching Materials for college
Pre independence Education in Inndia.pdf
O7-L3 Supply Chain Operations - ICLT Program
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Anesthesia in Laparoscopic Surgery in India
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Ad

Fundamental Concept of Cryptography in Computer Security

  • 2. CIA TRIAD The CIA triad is a model for information security that combines three key principles and computer security mainly concerned with these three main areas: Confidentiality, Integrity, and Availability. The CIA triad is a common model that forms the basis for the development of security systems. • Confidentiality: Confidentiality means that only authorized individuals/systems can view sensitive or classified information. The data being sent over the network should not be accessed by unauthorized individuals. The attacker may try to capture the data using different tools available on the Internet and gain access to your information. A primary way to avoid this is to use encryption techniques to safeguard your data so that even if the attacker gains access to your data, he/she will not be able to decrypt it.
  • 3. CIA TRIAD Integrity: • Integrity refers to the process of verifying that data has not been altered, therefore establishing its reliability. It is correct, authentic, and reliable. • Ecommerce customers, for example, expect product and pricing information to be accurate, and that quantity, pricing, availability, and other information will not be altered after they place an order. • Ensuring integrity involves protecting data in use, in transit (such as when sending an email or uploading or downloading a file), and when it is stored, whether on a laptop, a portable storage device, in the data center, or in the cloud.
  • 4. CIA TRIAD Availability: • Simply, availability means that networks, systems, and applications are up and running. It ensures that authorized users have timely, reliable access to resources when they are needed. • Many things can jeopardize availability, including hardware or software failure, power failure, natural disasters, and human error. Perhaps the most well-known attack that threatens availability is the Denial-of-service attack. • In Denial Of service attack the performance of a system, website, web-based application, or web- based service is intentionally and maliciously degraded, or the system becomes completely unreachable. • To prevent data loss from such occurrences, a backup copy may be stored in a geographically isolated location, perhaps even in a fireproof, waterproof safe.
  • 5. Introduction of Cryptography • Cryptography is technique of securing information and communications through use of codes so that only those person for whom the information is intended can understand it and process it. Thus preventing unauthorized access to information.
  • 6. Some terminology of Cryptography • Encryption: Encryption is a fundamental concept in computer security that involves the transformation of information or data into a coded form to prevent unauthorized access or interception. The purpose of encryption is to ensure the confidentiality and integrity of sensitive data as it is transmitted or stored. It is a crucial component in securing communication channels and protecting information from being accessed by unauthorized parties. • Ciphertext: In cryptography, ciphertext is a series of random letters and numbers that result from encrypting text. It's also known as encrypted or encoded information. • Decryption: Decryption is the process of converting encrypted data back into its original, human- readable form. It's the reverse process of encryption. • Key: A Key is a numeric or alpha numeric text or can be a unique symbol. The Key can be used at the time of encryption takes place on the Plain Text and at the time of decryption create place on the Cipher Text.
  • 8. Symmetric Key Cryptography Symmetric Key Cryptography also known as Symmetric Encryption is a type of encryption where only one key (a secret key) is used to both encrypt and decrypt electronic data. The entities communicating via symmetric encryption must exchange the key so that it can be used in the decryption process. The success of this approach depends on the strength of the random number generator that is used to create the secret key. Symmetric Key Cryptography is widely used in today's Internet and primarily consists of two types of algorithms, Block and Stream. Some common encryption algorithms include the Advanced Encryption Standard (AES) and the Data Encryption Standard (DES). This form of encryption is traditionally faster than Asymmetric however it requires both the sender and the recipient of the data to have the secret key. The primary benefit of symmetric cryptography is its speed compared to asymmetric cryptography. However, the major drawbacks of symmetric encryption include challenges in key distribution and key management. As the number of users increases, the number of necessary keys also rises. Handling the growing count of secret keys evolves into what's known as the "key management problem”.
  • 10. Where to use Symmetric Encryption • Bulk Data Encryption: Symmetric encryption is efficient for encrypting large amounts of data, making it suitable for scenarios where speed and performance are crucial, such as encrypting files or streaming media. Bulk data encryption is a method that encrypts multiple data streams together, making it more secure for large amounts of data. • Secure Communication: Symmetric encryption is often used to secure communication channels between entities that share a secret key. This includes protocols like SSL/TLS for secure web browsing and secure email communication. • Storage Encryption: Symmetric encryption is employed to encrypt data stored on devices or in databases, ensuring that sensitive information remains confidential, even if the storage medium is compromised. • Disk Encryption: Symmetric encryption is used to encrypt entire disks or volumes, protecting the data stored on them. This is commonly used in scenarios where data security is paramount, such as in enterprise environments or for personal data protection. • Authentication: Symmetric encryption can be used in authentication protocols for securely exchanging authentication tokens or credentials between parties.
  • 11. Asymmetric Key Cryptography  Asymmetric cryptography, also known as public-key cryptography, is a process that uses a pair of related keys -- one public key and one private key -- to encrypt and decrypt a message and protect it from unauthorized access or use.  A public key is a cryptographic key that can be used by any person to encrypt a message so that it can only be decrypted by the intended recipient with their private key. A private key -- also known as a secret key -- is shared only with key's initiator.  When someone wants to send an encrypted message, they can pull the intended recipient's public key from a public directory and use it to encrypt the message before sending it. The recipient of the message can then decrypt the message using their related private key.  If the sender encrypts the message using their private key, the message can be decrypted only using that sender's public key, thus authenticating the sender. These encryption and decryption processes happen automatically; users do not need to physically lock and unlock the message.  Many protocols rely on asymmetric cryptography, including the transport layer security (TLS) and secure sockets layer (SSL) protocols, which make HTTPS possible.
  • 13. Where to use Asymmetric Encryption • Key Exchange: Asymmetric encryption is primarily used for key exchange and digital signatures in secure communication protocols. For example, it's used during the initial handshake phase in SSL/TLS to establish a secure connection between a client and a server. • Digital Signatures: Asymmetric encryption is used to create digital signatures, which provide a way to verify the authenticity and integrity of digital documents or messages. This is crucial in applications like digital contracts, software distribution, and secure email communication. • Secure Email Communication: Asymmetric encryption is commonly used in secure email protocols like OpenPGP and S/MIME for encrypting email messages and attachments, ensuring that only the intended recipients can decrypt and read the content. • Secure File Transfer: Asymmetric encryption can be used for secure file transfer protocols like SSH (Secure Shell) and SFTP (SSH File Transfer Protocol), providing secure authentication and encrypted data transfer between client and server. • Public Key Infrastructure (PKI): Asymmetric encryption is a foundational technology in PKI, used for generating and managing digital certificates, which are used to verify the identities of users and entities in secure communication.
  • 14. Advantages of Asymmetric Encryption  Key distribution: Eliminates the need for key exchange.  Security: Private keys are never sent or disclosed, making it difficult for unauthorized users to access data.  Digital signatures: Enables recipients to confirm the origin of a message.  Authentication: Provides authentication and non-repudiation.  Key management: Simplifies key management because each party can keep their own private key secure and share their public key freely.  Secure key exchange: Allows parties to use each other's public keys to encrypt and share their symmetric keys.
  • 15. RSA Algorithm  RSA algorithm is an asymmetric cryptography algorithm. Asymmetric actually means that it works on two different keys i.e. Public Key and Private Key. As the name describes that the Public Key is given to everyone and the Private key is kept private.  RSA is invented by Rivest, Shamir and Adleman of MIT.  It is most widely used for secure data transmission.  RSA algorithm is known as Public key Cryptography.  RSA algorithm consists of following steps:  Key generation.  Encryption  Decryption
  • 16. RSA Algorithm Encryption formula:  𝑪 = 𝑷𝒆 𝒎𝒐𝒅 𝒏, 𝒊𝒕 𝒔𝒉𝒐𝒖𝒍𝒅 𝒃𝒆 𝑷 < 𝒏.  𝒘𝒉𝒆𝒓𝒆, 𝑪 = 𝑪𝒊𝒑𝒉𝒆𝒓𝒕𝒆𝒙𝒕, 𝑷 = 𝑷𝒍𝒂𝒊𝒏𝒕𝒆𝒙𝒕, 𝒆 = 𝒑𝒖𝒃𝒍𝒊𝒄 𝒌𝒆𝒚, 𝒂𝒏𝒅 𝒏 = 𝒎𝒖𝒍𝒊𝒑𝒍𝒊𝒄𝒂𝒕𝒊𝒐𝒏 𝒐𝒇 𝒕𝒘𝒐 𝒑𝒓𝒊𝒎𝒆 𝒏𝒖𝒎𝒃𝒆𝒓𝒔. Decryption formula:  𝑷 = 𝑪𝒅 𝒎𝒐𝒅 𝒏, 𝒊𝒕 𝒔𝒉𝒐𝒖𝒍𝒅 𝒃𝒆 𝑪 < 𝒏 .  𝒘𝒉𝒆𝒓𝒆, 𝑪 = 𝑪𝒊𝒑𝒉𝒆𝒓𝒕𝒆𝒙𝒕, 𝑷 = 𝑷𝒍𝒂𝒊𝒏𝒕𝒆𝒙𝒕, 𝒅 = 𝒑𝒓𝒊𝒗𝒂𝒕𝒆 𝒌𝒆𝒚, 𝒂𝒏𝒅 𝒏 = 𝒎𝒖𝒍𝒊𝒑𝒍𝒊𝒄𝒂𝒕𝒊𝒐𝒏 𝒐𝒇 𝒕𝒘𝒐 𝒑𝒓𝒊𝒎𝒆 𝒏𝒖𝒎𝒃𝒆𝒓𝒔. 𝑷𝒖𝒃𝒍𝒊𝒄 𝒌𝒆𝒚 = {𝒆, 𝒏} 𝑷𝒓𝒊𝒗𝒂𝒕𝒆 𝒌𝒆𝒚 = {𝒅, 𝒏}
  • 17. RSA Algorithm Key Generations Select two large prime numbers. Suppose P and Q. Calculate the value of, n = P*Q. Calculate Φ(n) = (P-1)(Q-1). Where, Φ(n) Euler's Toient Function. Choose the value of ‘e’ such that GCD(e, Φ(n))=1 and 1<e<Φ(n). Calculate the value of ‘d’ using {(Φ(n) * k) + 1} / e
  • 18. Examples Key generations 1. Two prime numbers: P=3, Q=5 2. The value of n=P*Q = 3 * 5 = 15 3. Φ(n) = (P-1)(Q-1) = 2 * 4 = 8 4. Assuming e such that GCD(e, Φ(n))=1 and 1<e<Φ(n). So, e=3 5. Finding d using {(Φ(n) * k) + 1} / e, so, d=3 Now public key = {3, 15}, and Private key = {3, 15} Encryption: Consider Plaintext, P = 8 𝑪 = 𝑷𝒆 𝒎𝒐𝒅 𝒏 = 𝟖𝟑𝒎𝒐𝒅 𝟏𝟓 = 𝟓𝟏𝟐 𝒎𝒐𝒅 𝟏𝟓 𝑪 = 𝟐
  • 19. Examples Decryption: 𝑷 = 𝑪𝒅𝒎𝒐𝒅 𝒏 = 𝟐𝟑𝒎𝒐𝒅 𝟏𝟓 = 𝟖 𝒎𝒐𝒅 𝟏𝟓 𝑷 = 𝟖
  • 20. Question In an RSA cryptosystem, a particular A uses two prime numbers, 3 and 7, to generate the public and private keys. If the value of a plain-text is P=4 then show the encryption and decryption process.