SlideShare a Scribd company logo
1 of 8
RSA Encryption
• RSA is an asymmetric cryptography algorithm.
 Key Generation: Generating the keys to be used for encrypting and decrypting the data to be exchanged.
 Encryption/Decryption Function: The steps that need to be run when scrambling and recovering the data.
RSA Digital Signature
Digital signatures are used to verify the authenticity of the message sent electronically.
RSA – Rivest, Shamir, Adleman
What Is Asymmetric Encryption?
Public/Private Key Generation
• Public Key: Select two prime no's. Suppose P = 53 and Q = 59.
Now First part of the Public key : n = P*Q = 3127
Now z = (p-1)(q-1), Choose a number e where 1 < e < z. Let us now consider e as 3
c = (PQ^e) mod n
Our Public Key is made of n and e
• Private Key: We need to calculate Φ(n) :
Such that Φ(n) = (P-1)(Q-1)
so, Φ(n) = (53-1)(59-1)=(52)(58)=3016
Now calculate Private Key, d :
d = (k*Φ(n) + 1) / e for some integer k
For k = 2, d = (2*3016+1)/3 = (6032+1)/3 = (6033)/3 = 2011
value of d is 2011.
Let us encrypt/decrypt…
Now we are ready with our – Public Key ( n = 3127 and e = 3) and Private Key(d = 2011)
• Let us encrypt “HI”:
Convert letters to numbers : H = 8 and I = 9
Encrypted Data c = (ab^e) mod n
Encrypted Data c = (89e)mod n = (89*89*89)mod 3127 = (704969) mod 3127
Encrypted Data comes out to be 1394
• Now we will decrypt 1394 :
Decrypted Data = (c^d)mod n
Decrypted Data = (1394^d) mod 3127 = 89
Encrypted Data comes out to be 89
8 = H and I = 9 i.e. "HI".
RSA Digital Signature
RSA Digital Signature…
Code pointers
• integ_rsa_encrypt.c
• integ_rsa_decrypt.c
• integ_rsa_keygen.c
typedef struct _CpaCyRsaKeyGenOpData {
CpaFlatBuffer prime1P;
CpaFlatBuffer prime2Q;
Cpa32U modulusLenInBytes;
CpaCyRsaVersion version;
CpaCyRsaPrivateKeyRepType privateKeyRepType;
CpaFlatBuffer publicExponentE;
} CpaCyRsaKeyGenOpData;
Integ code
isg_cid_qat_sal/me_acceleration_layer/access_layer/look_aside_acceleration/integ_test/common/crypto/asym/rsa
typedef struct _CpaCyRsaEncryptOpData {
CpaCyRsaPublicKey *pPublicKey;
/**< Pointer to the public key. */
CpaFlatBuffer inputData;
/**< The input data that the RSA encryption primitive operation is
* performed on. The data pointed to is an integer that MUST be in big-
* endian order. The value MUST be between 0 and the modulus n - 1. */
} CpaCyRsaEncryptOpData;
typedef struct _CpaCyRsaDecryptOpData {
CpaCyRsaPrivateKey *pRecipientPrivateKey;
/**< Pointer to the recipient's RSA private key. */
CpaFlatBuffer inputData;
/**< The input data that the RSA decryption primitive operation is
* performed on. The data pointed to is an integer that MUST be in big-
* endian order. The value MUST be between 0 and the modulus n - 1. */
} CpaCyRsaDecryptOpData;
Code pointers…
Key Generation
LacIntegRsa_AllocKeyGenData
-LacIntegPke_CreatePrivateKey
-LacIntegPke_CreatePublicKey
LacIntegRsa_KeySendReq
-LacIntegRsa_KeySend
-cpaCyRsaGenKey -> SAL code
Encryption
LacIntegRsa_EncryptInt/LacIntegRsa_EncPerfTestInt
-LacIntegRsa_AllocEncData
-LacIntegPke_CreatePublicKey
-LacIntegPke_PopulateFlatBuffer
LacIntegRsa_EncPerfTestInt
-LacIntegRsa_EncSendReq
-LacIntegRsa_EncSend
-cpaCyRsaEncrypt ->SAL code
Decryption
LacIntegRsa_Decrypt1Int
->LacIntegRsa_AllocDec1Data
->LacIntegPke_CreatePrivateKey1
->LacIntegPke_PopulateFlatBuffer
LacIntegRsa_DecPerfTestInt
LacIntegRsa_DecSendReq
->LacIntegRsa_DecSend
->cpaCyRsaDecrypt -> SAL code

More Related Content

Similar to RSA.pptx (20)

3 pkc+rsa
3 pkc+rsa3 pkc+rsa
3 pkc+rsa
 
RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2RSA-W7(rsa) d1-d2
RSA-W7(rsa) d1-d2
 
Rsa
RsaRsa
Rsa
 
Cloud computing and security 03
Cloud computing and security 03Cloud computing and security 03
Cloud computing and security 03
 
Ch09
Ch09Ch09
Ch09
 
PKC&RSA
PKC&RSAPKC&RSA
PKC&RSA
 
New ppt.ppt
New ppt.pptNew ppt.ppt
New ppt.ppt
 
Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
 
PUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.pptPUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.ppt
 
Computer Security Lecture 7: RSA
Computer Security Lecture 7: RSAComputer Security Lecture 7: RSA
Computer Security Lecture 7: RSA
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
Rsa
RsaRsa
Rsa
 
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
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
 
Ch9
Ch9Ch9
Ch9
 
Final ss2-digital-signature-group5
Final ss2-digital-signature-group5Final ss2-digital-signature-group5
Final ss2-digital-signature-group5
 
Research on RSA
Research on RSAResearch on RSA
Research on RSA
 
rsa-1
rsa-1rsa-1
rsa-1
 
rsa-1
rsa-1rsa-1
rsa-1
 
rsa-1
rsa-1rsa-1
rsa-1
 

Recently uploaded

Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 

Recently uploaded (20)

Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 

RSA.pptx

  • 1. RSA Encryption • RSA is an asymmetric cryptography algorithm.  Key Generation: Generating the keys to be used for encrypting and decrypting the data to be exchanged.  Encryption/Decryption Function: The steps that need to be run when scrambling and recovering the data. RSA Digital Signature Digital signatures are used to verify the authenticity of the message sent electronically. RSA – Rivest, Shamir, Adleman
  • 2. What Is Asymmetric Encryption?
  • 3. Public/Private Key Generation • Public Key: Select two prime no's. Suppose P = 53 and Q = 59. Now First part of the Public key : n = P*Q = 3127 Now z = (p-1)(q-1), Choose a number e where 1 < e < z. Let us now consider e as 3 c = (PQ^e) mod n Our Public Key is made of n and e • Private Key: We need to calculate Φ(n) : Such that Φ(n) = (P-1)(Q-1) so, Φ(n) = (53-1)(59-1)=(52)(58)=3016 Now calculate Private Key, d : d = (k*Φ(n) + 1) / e for some integer k For k = 2, d = (2*3016+1)/3 = (6032+1)/3 = (6033)/3 = 2011 value of d is 2011.
  • 4. Let us encrypt/decrypt… Now we are ready with our – Public Key ( n = 3127 and e = 3) and Private Key(d = 2011) • Let us encrypt “HI”: Convert letters to numbers : H = 8 and I = 9 Encrypted Data c = (ab^e) mod n Encrypted Data c = (89e)mod n = (89*89*89)mod 3127 = (704969) mod 3127 Encrypted Data comes out to be 1394 • Now we will decrypt 1394 : Decrypted Data = (c^d)mod n Decrypted Data = (1394^d) mod 3127 = 89 Encrypted Data comes out to be 89 8 = H and I = 9 i.e. "HI".
  • 7. Code pointers • integ_rsa_encrypt.c • integ_rsa_decrypt.c • integ_rsa_keygen.c typedef struct _CpaCyRsaKeyGenOpData { CpaFlatBuffer prime1P; CpaFlatBuffer prime2Q; Cpa32U modulusLenInBytes; CpaCyRsaVersion version; CpaCyRsaPrivateKeyRepType privateKeyRepType; CpaFlatBuffer publicExponentE; } CpaCyRsaKeyGenOpData; Integ code isg_cid_qat_sal/me_acceleration_layer/access_layer/look_aside_acceleration/integ_test/common/crypto/asym/rsa typedef struct _CpaCyRsaEncryptOpData { CpaCyRsaPublicKey *pPublicKey; /**< Pointer to the public key. */ CpaFlatBuffer inputData; /**< The input data that the RSA encryption primitive operation is * performed on. The data pointed to is an integer that MUST be in big- * endian order. The value MUST be between 0 and the modulus n - 1. */ } CpaCyRsaEncryptOpData; typedef struct _CpaCyRsaDecryptOpData { CpaCyRsaPrivateKey *pRecipientPrivateKey; /**< Pointer to the recipient's RSA private key. */ CpaFlatBuffer inputData; /**< The input data that the RSA decryption primitive operation is * performed on. The data pointed to is an integer that MUST be in big- * endian order. The value MUST be between 0 and the modulus n - 1. */ } CpaCyRsaDecryptOpData;
  • 8. Code pointers… Key Generation LacIntegRsa_AllocKeyGenData -LacIntegPke_CreatePrivateKey -LacIntegPke_CreatePublicKey LacIntegRsa_KeySendReq -LacIntegRsa_KeySend -cpaCyRsaGenKey -> SAL code Encryption LacIntegRsa_EncryptInt/LacIntegRsa_EncPerfTestInt -LacIntegRsa_AllocEncData -LacIntegPke_CreatePublicKey -LacIntegPke_PopulateFlatBuffer LacIntegRsa_EncPerfTestInt -LacIntegRsa_EncSendReq -LacIntegRsa_EncSend -cpaCyRsaEncrypt ->SAL code Decryption LacIntegRsa_Decrypt1Int ->LacIntegRsa_AllocDec1Data ->LacIntegPke_CreatePrivateKey1 ->LacIntegPke_PopulateFlatBuffer LacIntegRsa_DecPerfTestInt LacIntegRsa_DecSendReq ->LacIntegRsa_DecSend ->cpaCyRsaDecrypt -> SAL code