SlideShare a Scribd company logo
1 of 3
Download to read offline
International Journal of Trend in Scientific Research and Development (IJTSRD)
Volume 4 Issue 6, September-October 2020 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470
@ IJTSRD | Unique Paper ID – IJTSRD35752 | Volume – 4 | Issue – 6 | September-October 2020 Page 1708
RSA Cryptosystem using Python
Dr. C. Umarani1, Aditi Badnore2
1Assistance Professor, 2Student,
1,2Masters in Computer Applications, Jain (Deemed-to-be) University, Bangalore, Karnataka, India
ABSTRACT
Cryptography is a technique or method for securing communicationsbyusing
codes, so that the third parties cannot use that sensitive information and only
intended users can read and process it. To avoid such things encryption and
decryption is the solution for the same, which will ensure confidentiality,
integrity, prevent information fromtampering,forgeryandcounterfeiting.For
encryption decryption process, we require a key it is mandatory that key
should not be leaked, hence for this purpose we use private and public key
which is only known by the receiver and sender. This paper proposes
complete implementation of RSA text encryption/decryption aswell asimage
encryption/decryption.
How to cite this paper: Dr. C. Umarani |
Aditi Badnore "RSA Cryptosystem using
Python" Published in
International Journal
of Trend in Scientific
Research and
Development(ijtsrd),
ISSN: 2456-6470,
Volume-4 | Issue-6,
October 2020,
pp.1708-1710, URL:
www.ijtsrd.com/papers/ijtsrd35752.pdf
Copyright © 2020 by author(s) and
International Journal ofTrendinScientific
Research and Development Journal. This
is an Open Access article distributed
under the terms of
the Creative
CommonsAttribution
License (CC BY 4.0)
(http://creativecommons.org/licenses/by/4.0)
I. INTRODUCTION
The Rivest-Shamir-Adleman (RSA) was publicallydescribed
in 1977, which is used by modern computers to encrypt and
decrypt the messages. It is an asymmetric
cryptographic algorithm. As two different keys are used in
this algorithm hence the name asymmetric. One key is
shared to anyone therefore it is also called public key
cryptography. Public key cryptography is largely used for
authentication, non-repudiation, and key exchange. RSA is a
relatively slow algorithm. Due to this limitation, it is not
commonly used to directly encrypt data. RSA is used to
transmit shared keys, which are then used for bulk
encryption-decryption. RSA involves four steps for the
complete process which are keygeneration,keydistribution,
encryption, and decryption. All steps are mentioned below.
II. WORKING OF RSA
1. Key Generation: Each person or a party who desires to
participate in communication using encryptionneedsto
generate a pair of keys, namely public key and private
key.
A. Generating the RSA modulus (n)
B. Finding Derived Number (e)
C. Forming the public key
D. Forming the private key
Fig1: RSA Public Key and Private Key Generation
Method
2. Key Distribution: If a message is sent from one end to
the other using RSA, one person will have the public key
which is used for encryption (n, e) and other personwill
have the private key which will be used for decryption
(d) and won’t be distributed.
Fig2: Example of Key Distribution
IJTSRD35752
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD35752 | Volume – 4 | Issue – 6 | September-October 2020 Page 1709
3. Encryption: Message is encrypted using a public key
(n, e). To encrypt the first plaintext P, this is modulo n.
Mathematical step for encryption is − C = Pe mod n
Ciphertext C is equal to the plaintext P multiplied by
itself e times and then reduced modulo n.
4. Decryption: Message is decrypted using private key by
the receiver. The receiver has received a ciphertext.
Plaintext = Cd mod n
Fig3: Encryption and Decryption in RSA
III. CURRENT USAGE OF RSA
RSA is one of the most widely used algorithms amongst
public key cryptography. RSA has a main advantage and is
preferably known for secure communications. Earlieritwas
used in TLS and also in PGP encryption. At present, RSA is
used in VPN, emails, web browsers. Recently, SSL also used
RSA algorithm accompanied by File transfer Protocol (FTP),
HTTP, Network News Transfer Protocol (NNTP) which
established a key during SSL communication between the
server and the client. Also, RSA can be used in employee
verification. Smart card chips can be developed using this
algorithm.
IV. FLOWCHART
To encrypt a plaintext M using an RSA public key we simply
represent the plaintext as a number between 0 and N-1 and
then compute the ciphertext C as:
C = Me mod N.
To decrypt a ciphertext C using an RSA public key wesimply
compute the plaintext M as:
M = Cd mod N.
V. IMAGE ENCRYPTION AND DECRYPTION
Example can be Core banking which is a set of services
provided by the group of networked bank branches. These
days Internet multimedia is on highest demand.
The below pictures tell theoriginal imagewhichisencrypted
and then again decrypted.
Fig4: Original image
Fig5: Encrypted image
Fig6: Decrypted image
VI. CONCLUSION
Though, RSA is most used algorithm these days, still it has
some limitations which are getting replaced by further
versions of RSA. In today’s digital world the most important
thing is to encrypt the image due to various types of attacks
and misusing of the same. Image encryption using RSA is
proved to be efficient enough and highly securable.
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD35752 | Volume – 4 | Issue – 6 | September-October 2020 Page 1710
VII. REFERENCES
[1] https://ieeexplore.ieee.org/document/6021216/figu
res#figures
[2] https://www.tutorialspoint.com/cryptography/publi
c_key_encryption.htm
[3] http://www.ijcset.net/docs/Volumes/volume5issue9
/ijcset2015050902.pdf
[4] http://www.isg.rhul.ac.uk/static/msc/teaching/ic2/d
emo/42.htm
[5] https://en.wikipedia.org/wiki/RSA_(cryptosystem)
[6] https://www.geeksforgeeks.org/rsa-algorithm-
cryptography/
[7] https://www.di-mgt.com.au/rsa_alg.html

More Related Content

What's hot

Basic concept of pki
Basic concept of pkiBasic concept of pki
Basic concept of pki
Prabhat Goel
 
10 system.security.cryptography
10 system.security.cryptography10 system.security.cryptography
10 system.security.cryptography
Mohammad Alyan
 
Cryptoandnetworksecuritylitreview
CryptoandnetworksecuritylitreviewCryptoandnetworksecuritylitreview
Cryptoandnetworksecuritylitreview
Faith Nweke
 

What's hot (20)

Achieving data integrity by forming the digital signature using RSA and SHA-1...
Achieving data integrity by forming the digital signature using RSA and SHA-1...Achieving data integrity by forming the digital signature using RSA and SHA-1...
Achieving data integrity by forming the digital signature using RSA and SHA-1...
 
Basic concept of pki
Basic concept of pkiBasic concept of pki
Basic concept of pki
 
Pgp
PgpPgp
Pgp
 
cryptography
cryptographycryptography
cryptography
 
Introduction To PKI Technology
Introduction To PKI TechnologyIntroduction To PKI Technology
Introduction To PKI Technology
 
Encryption by fastech
Encryption by fastechEncryption by fastech
Encryption by fastech
 
Encryption ppt
Encryption pptEncryption ppt
Encryption ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
Pgp
PgpPgp
Pgp
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Encryption Primer por Cathy Nolan
Encryption Primer por Cathy NolanEncryption Primer por Cathy Nolan
Encryption Primer por Cathy Nolan
 
10 system.security.cryptography
10 system.security.cryptography10 system.security.cryptography
10 system.security.cryptography
 
Digital Signatures in the Cloud: A B2C Case Study
Digital Signatures in the Cloud: A B2C Case StudyDigital Signatures in the Cloud: A B2C Case Study
Digital Signatures in the Cloud: A B2C Case Study
 
Pgp
PgpPgp
Pgp
 
Network security unit 1,2,3
Network security unit 1,2,3 Network security unit 1,2,3
Network security unit 1,2,3
 
fucking shit
fucking shitfucking shit
fucking shit
 
Security
SecuritySecurity
Security
 
Cryptoandnetworksecuritylitreview
CryptoandnetworksecuritylitreviewCryptoandnetworksecuritylitreview
Cryptoandnetworksecuritylitreview
 
Pretty good privacy
Pretty good privacyPretty good privacy
Pretty good privacy
 
Skyriver Communications – Fixed Wireless Security
Skyriver Communications – Fixed Wireless SecuritySkyriver Communications – Fixed Wireless Security
Skyriver Communications – Fixed Wireless Security
 

Similar to RSA Cryptosystem using Python

Encryption in Cryptography
Encryption in CryptographyEncryption in Cryptography
Encryption in Cryptography
Uttara University
 
Give a clear explanation of RSA cryptography and why it works.So.pdf
Give a clear explanation of RSA cryptography and why it works.So.pdfGive a clear explanation of RSA cryptography and why it works.So.pdf
Give a clear explanation of RSA cryptography and why it works.So.pdf
SALES97
 

Similar to RSA Cryptosystem using Python (20)

Image Cryptography using RSA Algorithm
Image Cryptography using RSA AlgorithmImage Cryptography using RSA Algorithm
Image Cryptography using RSA Algorithm
 
Encryption in Cryptography
Encryption in CryptographyEncryption in Cryptography
Encryption in Cryptography
 
Design of Hybrid Cryptography Algorithm for Secure Communication
Design of Hybrid Cryptography Algorithm for Secure CommunicationDesign of Hybrid Cryptography Algorithm for Secure Communication
Design of Hybrid Cryptography Algorithm for Secure Communication
 
International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)International Refereed Journal of Engineering and Science (IRJES)
International Refereed Journal of Engineering and Science (IRJES)
 
Literature Survey: Secure transmitting of data using RSA public key implement...
Literature Survey: Secure transmitting of data using RSA public key implement...Literature Survey: Secure transmitting of data using RSA public key implement...
Literature Survey: Secure transmitting of data using RSA public key implement...
 
Rsa Crptosystem
Rsa CrptosystemRsa Crptosystem
Rsa Crptosystem
 
Time Performance Analysis of RSA and Elgamal Public Key Cryptosystems
Time Performance Analysis of RSA and Elgamal Public Key CryptosystemsTime Performance Analysis of RSA and Elgamal Public Key Cryptosystems
Time Performance Analysis of RSA and Elgamal Public Key Cryptosystems
 
ANALYSIS OF RSA ALGORITHM USING GPU PROGRAMMING
ANALYSIS OF RSA ALGORITHM USING GPU PROGRAMMINGANALYSIS OF RSA ALGORITHM USING GPU PROGRAMMING
ANALYSIS OF RSA ALGORITHM USING GPU PROGRAMMING
 
Analysis of rsa algorithm using gpu
Analysis of rsa algorithm using gpuAnalysis of rsa algorithm using gpu
Analysis of rsa algorithm using gpu
 
Give a clear explanation of RSA cryptography and why it works.So.pdf
Give a clear explanation of RSA cryptography and why it works.So.pdfGive a clear explanation of RSA cryptography and why it works.So.pdf
Give a clear explanation of RSA cryptography and why it works.So.pdf
 
RSA 32-bit Implementation Technique
RSA 32-bit Implementation TechniqueRSA 32-bit Implementation Technique
RSA 32-bit Implementation Technique
 
Email Encryption using Tri-Cryptosystem Based on Android
Email Encryption using Tri-Cryptosystem Based on AndroidEmail Encryption using Tri-Cryptosystem Based on Android
Email Encryption using Tri-Cryptosystem Based on Android
 
DES- Data Encryption Standard
DES- Data Encryption StandardDES- Data Encryption Standard
DES- Data Encryption Standard
 
A Survey on Generation and Evolution of Various Cryptographic Techniques
A Survey on Generation and Evolution of Various Cryptographic TechniquesA Survey on Generation and Evolution of Various Cryptographic Techniques
A Survey on Generation and Evolution of Various Cryptographic Techniques
 
State of the art realistic cryptographic
State of the art realistic cryptographicState of the art realistic cryptographic
State of the art realistic cryptographic
 
A REVIEW STUDY OF CRYPTOGRAPHY TECHNIQUES
A REVIEW STUDY OF CRYPTOGRAPHY TECHNIQUESA REVIEW STUDY OF CRYPTOGRAPHY TECHNIQUES
A REVIEW STUDY OF CRYPTOGRAPHY TECHNIQUES
 
Mj3422172221
Mj3422172221Mj3422172221
Mj3422172221
 
Enhanced RSA Cryptosystem based on Multiplicity of Public and Private Keys
Enhanced RSA Cryptosystem based on Multiplicity of Public and Private Keys Enhanced RSA Cryptosystem based on Multiplicity of Public and Private Keys
Enhanced RSA Cryptosystem based on Multiplicity of Public and Private Keys
 
Data Security With Colors Using Rsa
Data Security With Colors Using RsaData Security With Colors Using Rsa
Data Security With Colors Using Rsa
 
Cryptography & Security
Cryptography & SecurityCryptography & Security
Cryptography & Security
 

More from ijtsrd

‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementation‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementation
ijtsrd
 
Dynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and ProspectsDynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and Prospects
ijtsrd
 
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
ijtsrd
 
The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...
ijtsrd
 
Problems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A StudyProblems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A Study
ijtsrd
 
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
ijtsrd
 
A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...
ijtsrd
 
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
ijtsrd
 
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
ijtsrd
 
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. SadikuSustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
ijtsrd
 
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
ijtsrd
 
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
ijtsrd
 
Activating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment MapActivating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment Map
ijtsrd
 
Educational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger SocietyEducational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger Society
ijtsrd
 
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
ijtsrd
 

More from ijtsrd (20)

‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementation‘Six Sigma Technique’ A Journey Through its Implementation
‘Six Sigma Technique’ A Journey Through its Implementation
 
Edge Computing in Space Enhancing Data Processing and Communication for Space...
Edge Computing in Space Enhancing Data Processing and Communication for Space...Edge Computing in Space Enhancing Data Processing and Communication for Space...
Edge Computing in Space Enhancing Data Processing and Communication for Space...
 
Dynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and ProspectsDynamics of Communal Politics in 21st Century India Challenges and Prospects
Dynamics of Communal Politics in 21st Century India Challenges and Prospects
 
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
Assess Perspective and Knowledge of Healthcare Providers Towards Elehealth in...
 
The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...The Impact of Digital Media on the Decentralization of Power and the Erosion ...
The Impact of Digital Media on the Decentralization of Power and the Erosion ...
 
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
Online Voices, Offline Impact Ambedkars Ideals and Socio Political Inclusion ...
 
Problems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A StudyProblems and Challenges of Agro Entreprenurship A Study
Problems and Challenges of Agro Entreprenurship A Study
 
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
Comparative Analysis of Total Corporate Disclosure of Selected IT Companies o...
 
The Impact of Educational Background and Professional Training on Human Right...
The Impact of Educational Background and Professional Training on Human Right...The Impact of Educational Background and Professional Training on Human Right...
The Impact of Educational Background and Professional Training on Human Right...
 
A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...A Study on the Effective Teaching Learning Process in English Curriculum at t...
A Study on the Effective Teaching Learning Process in English Curriculum at t...
 
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
The Role of Mentoring and Its Influence on the Effectiveness of the Teaching ...
 
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
Design Simulation and Hardware Construction of an Arduino Microcontroller Bas...
 
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. SadikuSustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
Sustainable Energy by Paul A. Adekunte | Matthew N. O. Sadiku | Janet O. Sadiku
 
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
Concepts for Sudan Survey Act Implementations Executive Regulations and Stand...
 
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
Towards the Implementation of the Sudan Interpolated Geoid Model Khartoum Sta...
 
Activating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment MapActivating Geospatial Information for Sudans Sustainable Investment Map
Activating Geospatial Information for Sudans Sustainable Investment Map
 
Educational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger SocietyEducational Unity Embracing Diversity for a Stronger Society
Educational Unity Embracing Diversity for a Stronger Society
 
Integration of Indian Indigenous Knowledge System in Management Prospects and...
Integration of Indian Indigenous Knowledge System in Management Prospects and...Integration of Indian Indigenous Knowledge System in Management Prospects and...
Integration of Indian Indigenous Knowledge System in Management Prospects and...
 
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
DeepMask Transforming Face Mask Identification for Better Pandemic Control in...
 
Streamlining Data Collection eCRF Design and Machine Learning
Streamlining Data Collection eCRF Design and Machine LearningStreamlining Data Collection eCRF Design and Machine Learning
Streamlining Data Collection eCRF Design and Machine Learning
 

Recently uploaded

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 

Recently uploaded (20)

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
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
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 

RSA Cryptosystem using Python

  • 1. International Journal of Trend in Scientific Research and Development (IJTSRD) Volume 4 Issue 6, September-October 2020 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470 @ IJTSRD | Unique Paper ID – IJTSRD35752 | Volume – 4 | Issue – 6 | September-October 2020 Page 1708 RSA Cryptosystem using Python Dr. C. Umarani1, Aditi Badnore2 1Assistance Professor, 2Student, 1,2Masters in Computer Applications, Jain (Deemed-to-be) University, Bangalore, Karnataka, India ABSTRACT Cryptography is a technique or method for securing communicationsbyusing codes, so that the third parties cannot use that sensitive information and only intended users can read and process it. To avoid such things encryption and decryption is the solution for the same, which will ensure confidentiality, integrity, prevent information fromtampering,forgeryandcounterfeiting.For encryption decryption process, we require a key it is mandatory that key should not be leaked, hence for this purpose we use private and public key which is only known by the receiver and sender. This paper proposes complete implementation of RSA text encryption/decryption aswell asimage encryption/decryption. How to cite this paper: Dr. C. Umarani | Aditi Badnore "RSA Cryptosystem using Python" Published in International Journal of Trend in Scientific Research and Development(ijtsrd), ISSN: 2456-6470, Volume-4 | Issue-6, October 2020, pp.1708-1710, URL: www.ijtsrd.com/papers/ijtsrd35752.pdf Copyright © 2020 by author(s) and International Journal ofTrendinScientific Research and Development Journal. This is an Open Access article distributed under the terms of the Creative CommonsAttribution License (CC BY 4.0) (http://creativecommons.org/licenses/by/4.0) I. INTRODUCTION The Rivest-Shamir-Adleman (RSA) was publicallydescribed in 1977, which is used by modern computers to encrypt and decrypt the messages. It is an asymmetric cryptographic algorithm. As two different keys are used in this algorithm hence the name asymmetric. One key is shared to anyone therefore it is also called public key cryptography. Public key cryptography is largely used for authentication, non-repudiation, and key exchange. RSA is a relatively slow algorithm. Due to this limitation, it is not commonly used to directly encrypt data. RSA is used to transmit shared keys, which are then used for bulk encryption-decryption. RSA involves four steps for the complete process which are keygeneration,keydistribution, encryption, and decryption. All steps are mentioned below. II. WORKING OF RSA 1. Key Generation: Each person or a party who desires to participate in communication using encryptionneedsto generate a pair of keys, namely public key and private key. A. Generating the RSA modulus (n) B. Finding Derived Number (e) C. Forming the public key D. Forming the private key Fig1: RSA Public Key and Private Key Generation Method 2. Key Distribution: If a message is sent from one end to the other using RSA, one person will have the public key which is used for encryption (n, e) and other personwill have the private key which will be used for decryption (d) and won’t be distributed. Fig2: Example of Key Distribution IJTSRD35752
  • 2. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD35752 | Volume – 4 | Issue – 6 | September-October 2020 Page 1709 3. Encryption: Message is encrypted using a public key (n, e). To encrypt the first plaintext P, this is modulo n. Mathematical step for encryption is − C = Pe mod n Ciphertext C is equal to the plaintext P multiplied by itself e times and then reduced modulo n. 4. Decryption: Message is decrypted using private key by the receiver. The receiver has received a ciphertext. Plaintext = Cd mod n Fig3: Encryption and Decryption in RSA III. CURRENT USAGE OF RSA RSA is one of the most widely used algorithms amongst public key cryptography. RSA has a main advantage and is preferably known for secure communications. Earlieritwas used in TLS and also in PGP encryption. At present, RSA is used in VPN, emails, web browsers. Recently, SSL also used RSA algorithm accompanied by File transfer Protocol (FTP), HTTP, Network News Transfer Protocol (NNTP) which established a key during SSL communication between the server and the client. Also, RSA can be used in employee verification. Smart card chips can be developed using this algorithm. IV. FLOWCHART To encrypt a plaintext M using an RSA public key we simply represent the plaintext as a number between 0 and N-1 and then compute the ciphertext C as: C = Me mod N. To decrypt a ciphertext C using an RSA public key wesimply compute the plaintext M as: M = Cd mod N. V. IMAGE ENCRYPTION AND DECRYPTION Example can be Core banking which is a set of services provided by the group of networked bank branches. These days Internet multimedia is on highest demand. The below pictures tell theoriginal imagewhichisencrypted and then again decrypted. Fig4: Original image Fig5: Encrypted image Fig6: Decrypted image VI. CONCLUSION Though, RSA is most used algorithm these days, still it has some limitations which are getting replaced by further versions of RSA. In today’s digital world the most important thing is to encrypt the image due to various types of attacks and misusing of the same. Image encryption using RSA is proved to be efficient enough and highly securable.
  • 3. International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470 @ IJTSRD | Unique Paper ID – IJTSRD35752 | Volume – 4 | Issue – 6 | September-October 2020 Page 1710 VII. REFERENCES [1] https://ieeexplore.ieee.org/document/6021216/figu res#figures [2] https://www.tutorialspoint.com/cryptography/publi c_key_encryption.htm [3] http://www.ijcset.net/docs/Volumes/volume5issue9 /ijcset2015050902.pdf [4] http://www.isg.rhul.ac.uk/static/msc/teaching/ic2/d emo/42.htm [5] https://en.wikipedia.org/wiki/RSA_(cryptosystem) [6] https://www.geeksforgeeks.org/rsa-algorithm- cryptography/ [7] https://www.di-mgt.com.au/rsa_alg.html