SlideShare a Scribd company logo
International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015]
ISSN: 2349-6495
Page | 15
RSA and Modified RSA algorithm using C
Programming
M.Puneeth, Jasmine shafi Farha, N.Sandhya, M.Yamini
Department of ECE, Kluniversity, Vijayawada, India
Abstract—RSA algorithm is a process of encrypting
plain text in blocks, every block has a binary value lesser
than some n number. The size of block should be less than
log (n) or equal to log (n), public-key cryptosystem was
implemented by RSA algorithm In this Journal we are
going to implement a RSA and modified RSA algorithm
using c programing, modified RSA algorithm is somewhat
slower than RSA but it is more secure
Keywords—decryption,digitalsignatures,encryption, key,
RSA,
I. INTRODUCTION
Diffie and Hellman introduced the RSA algorithm at the
time when electronic mail was expected to arise soon.
Public key cryptography uses the algorithms that are
mathematical relationships based. Though it is
uncomplicated for the receiver for generating public key
and private key, for decryption of the message with the
help of private key, and simple for a sender for the
encryption of the message with the help of public key, so
it is too difficult for any person for the derivation of
private key, when only public key is known. For signature
verification purposes, generally, only a hash of the
message is usually encrypted. Public-key cryptography is
a basic, vital, and technology that which is used widely. It
is used by many cryptosystems and cryptographic
algorithms [3]. The encryption technique which is used to
convert original (plain text) data to cipher text. The plain
text is also called the clear text. The plain text is easily
read by anyone. Second technique is decryption which is
used to convert cipher text to plaintext (readable
format).cipher text is also called the unreadable form [4]
RSA algorithm is having the important parameters of
affecting its security level and speed. With the increase of
modulus length it plays important role of increasing the
difficulty level for the decomposition of that into its
required factors. This increases private key length and
hence it is very difficult to decrypt without having the
decryption key [1]
The algorithm RSA, at present is the most successful use
for ciphering keys and passwords or counts [2]
The two important ideas of RSA are:
1.1. Public-key encryption: In RSA algorithm the keys
that are required to encrypt the data are public whereas
the keys for decryption are not.so the person only who
has the original decryption key only can decrypt the
message. The decryption key should be done in such a
manner that no other key should match public key of
encryption to decrypt the message
1.1.1. Plain text: Plain text is the text that which can be
readable by everyone
1.1.2: Encryption Algorithm: The encryption algorithm is
an algorithm that which is used for performing several
transformations on the plain text
1.1.3:Public and Private keys: Public and Private keys are
pair of keys that which are selected for using one key for
encryption and other for decryption
1.1.4. Cipher Text: Cipher text is a scrambled text that
which is produced by using mathematical logics on plain
text
1.1.5: Decryption Algorithm: Decryption algorithm is an
algorithm that which is used for accepting matching key
and cipher text that which is used for producing plain text
1.2: Digital signatures: The receiver wanted to verify that
the message was sent by sender and not just came from
authentication. This can be done using senders decryption
key and the using public key of encryption anyone can
verify it later. This RSA algorithm is used to secure
electronic mail and also for electronic transmissions and
transactions
II. PUBLIC KEY CRYPTOSYSTEMS
Each and every user has his own procedure of encrypting
and decrypting the message. These encryption and the
decryption process were belonged to keys. In RSA
algorithm there are two numbers as a set. The message is
symbolized as “P” which is for encryption .There are four
types of procedures which are essential to public key
crypto systems:
2.1. Procedures of public key crypto systems:
2.1.1. Deciphering the enciphered message gives the
original message
D (E (P)) = P
2.1.2. Reversing of procedure will return P
E (D (P)) = P
2.1.3. (E) and (D) are easy for computing
International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015]
ISSN: 2349-6495
Page | 16
2.1.4. The publicity of encryption key does not affect the
decryption that is it is not that much easy to find out
decryption key (D) from (E)
If cipher text = C+E (P) then if somebody are trying to
find out D by trying to match P in E (P) = C is complex.
If he tries to match with number of messages then the
number is large
E satisfies 2.1.1, 2.1.3 and 2.1.4 is called as “trapped door
permutation” or it is also called as “trapped door
function”
It is called as trap door because it’s inverse of decryption
(D) is easy for computing if certain information of trap
door is available ,on other hand it is hard .It is also a one
way because it is easy for computing in one perspective
but it is very hard in other perspective. It is also a
permutation because it satisfies 2.1.2, it means that
potential message is due to cipher text, every message
may be a cipher text of some other message.2.1.2 is used
for signatures
2.2. Privacy: The encryption process is done for providing
privacy for the plain text. It should be make sure that
intruder cannot bypass the cipher text. Without 2.4
property, the encryption process is not a public key still,
which is similar to NBS standard.
Fig. 1 Privacy
Suppose if Puneeth want’s send a private message to
Jasmine .From the public file EA will be retrieved by him,
P will be encoded and C= EA(P) will be obtained, Jasmine
decodes it by using her DA, the cipher text will be
decrypted by her only because of property (2.1.4)
2.3. Signatures: To ensure that message is sent by sender
and it has not being sent by the third party. Who uses
same type of encryption key. So that a digital signature is
used to avoid this. Signature cannot be changed or
modified so that there will be a good confidentiality
between sender and receiver
Fig. 2 Encryption and authentication of public key
cryptosystems
Suppose if Puneeth wanted to send a private message for
Jasmine, the document will be signed by assuming that
RSA algorithm is a reliable and quick, it is obtained
mostly by the property (2.1.3).The message will be
decrypted by Puneeth’s key in which it allows the
properties (2.1.1) and (2.1.2).It shows that every message
will be a cipher text of other message
DB (P) =J
Then J will be encrypted by encryption key of Jasmine
EA (J) =EA (DB (P))
In this way we are confident that document will be
decrypted by Jasmine only. When she encrypts the
message, she will get the signature by
DA (EA (DB (P)) =J.
Now she will know that message is sent by Puneeth,
Since the decryption key of Puneeth only computes the
signature, separately the message will not be sent because
By using Puneeth’s public key of encryption Jasmine can
deduce the message with signature. Encryption key of
Puneeth can be given as
International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015]
ISSN: 2349-6495
Page | 16
2.1.4. The publicity of encryption key does not affect the
decryption that is it is not that much easy to find out
decryption key (D) from (E)
If cipher text = C+E (P) then if somebody are trying to
find out D by trying to match P in E (P) = C is complex.
If he tries to match with number of messages then the
number is large
E satisfies 2.1.1, 2.1.3 and 2.1.4 is called as “trapped door
permutation” or it is also called as “trapped door
function”
It is called as trap door because it’s inverse of decryption
(D) is easy for computing if certain information of trap
door is available ,on other hand it is hard .It is also a one
way because it is easy for computing in one perspective
but it is very hard in other perspective. It is also a
permutation because it satisfies 2.1.2, it means that
potential message is due to cipher text, every message
may be a cipher text of some other message.2.1.2 is used
for signatures
2.2. Privacy: The encryption process is done for providing
privacy for the plain text. It should be make sure that
intruder cannot bypass the cipher text. Without 2.4
property, the encryption process is not a public key still,
which is similar to NBS standard.
Fig. 1 Privacy
Suppose if Puneeth want’s send a private message to
Jasmine .From the public file EA will be retrieved by him,
P will be encoded and C= EA(P) will be obtained, Jasmine
decodes it by using her DA, the cipher text will be
decrypted by her only because of property (2.1.4)
2.3. Signatures: To ensure that message is sent by sender
and it has not being sent by the third party. Who uses
same type of encryption key. So that a digital signature is
used to avoid this. Signature cannot be changed or
modified so that there will be a good confidentiality
between sender and receiver
Fig. 2 Encryption and authentication of public key
cryptosystems
Suppose if Puneeth wanted to send a private message for
Jasmine, the document will be signed by assuming that
RSA algorithm is a reliable and quick, it is obtained
mostly by the property (2.1.3).The message will be
decrypted by Puneeth’s key in which it allows the
properties (2.1.1) and (2.1.2).It shows that every message
will be a cipher text of other message
DB (P) =J
Then J will be encrypted by encryption key of Jasmine
EA (J) =EA (DB (P))
In this way we are confident that document will be
decrypted by Jasmine only. When she encrypts the
message, she will get the signature by
DA (EA (DB (P)) =J.
Now she will know that message is sent by Puneeth,
Since the decryption key of Puneeth only computes the
signature, separately the message will not be sent because
By using Puneeth’s public key of encryption Jasmine can
deduce the message with signature. Encryption key of
Puneeth can be given as
International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015]
ISSN: 2349-6495
Page | 18
V. APPLICATIONS OF RSA
RSA algorithm is used in electronic fund transmission
why because the information of finance needs the high
security This RSA algorithm can be used in electronic
mail transformation, online shopping and electronic
money transactions
VI. ATTACKS ON RSA
There are four possible attacks on RSA algorithm the
following are the attacks that possible on RSA
6.1.1: Brute-force attack: Brute-force attack is an attack
that which involves in trying all the possible private keys
6.1.2: Mathematical attacks: The mathematical attack is
the attack that which defines there are several type of
approaches all the equivalent in effort for factorizing
product of the two prime numbers
6.1.3: Timing attacks:timing attacks depend upon the time
that which is taken to decrypt the algorithm.
6.1.4.chosen cipher text attacks:this type attack exploits
RSA algorithm properties
VII. CONCLUSION
We have obtained results of RSA and modified RSA
using c programming we have encrypted and decrypted
using the RSA algorithm
VIII. RESULTS
8.1: RSA results
Fig. 4 If a non-prime number is entered then
It shows wrong input
Fig. 5 Two prime numbers and plain text
Fig. 6 Encrypted and decrypted messages
Fig. 7Another plain text with different prime
numbers
International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015]
ISSN: 2349-6495
Page | 19
Fig. 8 The encrypted and decrypted messages of
Second Plain text
8.2: Modified RSA results:
Fig. 9 Plain text of modified RSA
Fig. 10 The encrypted and decrypted messages of
Modified RSA
Fig. 11 Second plain text of Modified RSA
Fig. 12 The encrypted and decrypted messages of second
plain text in modified RSA
International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015]
ISSN: 2349-6495
Page | 20
REFERENCES
[1] Sonal sharma,Jitendra Singh Yadav,Prasanth
Sharma “Modified RSA Public Key Cryptosystem
Using Short Range Natural Number Algorithm”
International Journal of Advanced Research in
Computer Science and Software Engineering,
Volume 2, Issue 8, August 2012
[2] Samoud Ali, Cherif Adnen. “RSA ALGORITHM
IMPLEMENTATION FOR CIPHERING
MEDICAL IMAGING “International Journal of
Computer and Electronics Research, Volume 1,
Issue 2, August 2012
[3] Amare Anagaw Ayele1 Dr. Vuda Sreenivasarao“A
Modified RSA Encryption Technique Based on
Multiple public keys” International Journal of
Innovative Research in Computer and
Communication Engineering, Vol. 1, Issue 4, June
2013
[4] B.Persis Urbana Ivy, Purshotam Mandiwa. Mukesh
Kumar“ A modified RSA cryptosystem based on ‘n’
prime numbers”Intenational journal of Engineering
and science,volume1 ,issue2,Nov,2012
Ad

Recommended

Vtu network security(10 ec832) unit 3 notes.
Vtu network security(10 ec832) unit 3 notes.
Jayanth Dwijesh H P
 
Generate an Encryption Key by using Biometric Cryptosystems to secure transfe...
Generate an Encryption Key by using Biometric Cryptosystems to secure transfe...
IOSR Journals
 
Public Key Cryptosystem
Public Key Cryptosystem
Devakumar Kp
 
Enhanced RSA Cryptosystem based on Multiplicity of Public and Private Keys
Enhanced RSA Cryptosystem based on Multiplicity of Public and Private Keys
IJECEIAES
 
Authentication in Different Scenarios
Authentication in Different Scenarios
Raj Sikarwar
 
C0281010016
C0281010016
inventionjournals
 
Authentication in Different Scenarios
Authentication in Different Scenarios
Raj Sikarwar
 
MULTI-STAGE ENCRYPTION USING SEEDED SDES
MULTI-STAGE ENCRYPTION USING SEEDED SDES
Eswar Publications
 
COUNTERMEASURE TOOL - CARAPACE FOR NETWORK SECURITY
COUNTERMEASURE TOOL - CARAPACE FOR NETWORK SECURITY
IJNSA Journal
 
IRJET- Comparative Analysis of Encryption Techniques
IRJET- Comparative Analysis of Encryption Techniques
IRJET Journal
 
Network Security CS2
Network Security CS2
Infinity Tech Solutions
 
Analysis of rsa algorithm using gpu
Analysis of rsa algorithm using gpu
IJNSA Journal
 
Unlimited Length Random Passwords for Exponentially Increased Security
Unlimited Length Random Passwords for Exponentially Increased Security
IJCSEA Journal
 
RSA 32-bit Implementation Technique
RSA 32-bit Implementation Technique
Universitas Pembangunan Panca Budi
 
Securing the cloud computing systems with matrix vector and multi-key using l...
Securing the cloud computing systems with matrix vector and multi-key using l...
eSAT Publishing House
 
Is unit-4-part-1
Is unit-4-part-1
vmuniraja
 
IRJET - Deep Learning based Chatbot
IRJET - Deep Learning based Chatbot
IRJET Journal
 
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
Qualcomm
 
A Survey of Source Authentication Schemes for Multicast transfer in Adhoc Net...
A Survey of Source Authentication Schemes for Multicast transfer in Adhoc Net...
ijsrd.com
 
IRJET- A Work Paper on Email Server using 3DES
IRJET- A Work Paper on Email Server using 3DES
IRJET Journal
 
Survey of the end to end secure communication in ADHOC networks
Survey of the end to end secure communication in ADHOC networks
Ahmad Sharifi
 
Confidentiality & Authentication Mechanism for Biometric Information Transmit...
Confidentiality & Authentication Mechanism for Biometric Information Transmit...
IJNSA Journal
 
Securing Group Communication in Partially Distributed Systems
Securing Group Communication in Partially Distributed Systems
IOSR Journals
 
Implementation Secure Authentication Using Elliptic Curve Cryptography
Implementation Secure Authentication Using Elliptic Curve Cryptography
AM Publications
 
Security analysis of fbdk block cipher for digital images
Security analysis of fbdk block cipher for digital images
eSAT Journals
 
Mini Project on Data Encryption & Decryption in JAVA
Mini Project on Data Encryption & Decryption in JAVA
chovatiyabhautik
 
IRJET- Data Security in Network Flow using Obfuscation Technique
IRJET- Data Security in Network Flow using Obfuscation Technique
IRJET Journal
 
Comprehensive Study of Counter-acting Security Threats in Mobile Ad Hoc Networks
Comprehensive Study of Counter-acting Security Threats in Mobile Ad Hoc Networks
drsrinivasanvenkataramani
 
2012 5配套
2012 5配套
jayisbest
 
Help Them Help You: Good Managers Inspire Good Employee Performance
Help Them Help You: Good Managers Inspire Good Employee Performance
Flevy.com Best Practices
 

More Related Content

What's hot (20)

COUNTERMEASURE TOOL - CARAPACE FOR NETWORK SECURITY
COUNTERMEASURE TOOL - CARAPACE FOR NETWORK SECURITY
IJNSA Journal
 
IRJET- Comparative Analysis of Encryption Techniques
IRJET- Comparative Analysis of Encryption Techniques
IRJET Journal
 
Network Security CS2
Network Security CS2
Infinity Tech Solutions
 
Analysis of rsa algorithm using gpu
Analysis of rsa algorithm using gpu
IJNSA Journal
 
Unlimited Length Random Passwords for Exponentially Increased Security
Unlimited Length Random Passwords for Exponentially Increased Security
IJCSEA Journal
 
RSA 32-bit Implementation Technique
RSA 32-bit Implementation Technique
Universitas Pembangunan Panca Budi
 
Securing the cloud computing systems with matrix vector and multi-key using l...
Securing the cloud computing systems with matrix vector and multi-key using l...
eSAT Publishing House
 
Is unit-4-part-1
Is unit-4-part-1
vmuniraja
 
IRJET - Deep Learning based Chatbot
IRJET - Deep Learning based Chatbot
IRJET Journal
 
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
Qualcomm
 
A Survey of Source Authentication Schemes for Multicast transfer in Adhoc Net...
A Survey of Source Authentication Schemes for Multicast transfer in Adhoc Net...
ijsrd.com
 
IRJET- A Work Paper on Email Server using 3DES
IRJET- A Work Paper on Email Server using 3DES
IRJET Journal
 
Survey of the end to end secure communication in ADHOC networks
Survey of the end to end secure communication in ADHOC networks
Ahmad Sharifi
 
Confidentiality & Authentication Mechanism for Biometric Information Transmit...
Confidentiality & Authentication Mechanism for Biometric Information Transmit...
IJNSA Journal
 
Securing Group Communication in Partially Distributed Systems
Securing Group Communication in Partially Distributed Systems
IOSR Journals
 
Implementation Secure Authentication Using Elliptic Curve Cryptography
Implementation Secure Authentication Using Elliptic Curve Cryptography
AM Publications
 
Security analysis of fbdk block cipher for digital images
Security analysis of fbdk block cipher for digital images
eSAT Journals
 
Mini Project on Data Encryption & Decryption in JAVA
Mini Project on Data Encryption & Decryption in JAVA
chovatiyabhautik
 
IRJET- Data Security in Network Flow using Obfuscation Technique
IRJET- Data Security in Network Flow using Obfuscation Technique
IRJET Journal
 
Comprehensive Study of Counter-acting Security Threats in Mobile Ad Hoc Networks
Comprehensive Study of Counter-acting Security Threats in Mobile Ad Hoc Networks
drsrinivasanvenkataramani
 
COUNTERMEASURE TOOL - CARAPACE FOR NETWORK SECURITY
COUNTERMEASURE TOOL - CARAPACE FOR NETWORK SECURITY
IJNSA Journal
 
IRJET- Comparative Analysis of Encryption Techniques
IRJET- Comparative Analysis of Encryption Techniques
IRJET Journal
 
Analysis of rsa algorithm using gpu
Analysis of rsa algorithm using gpu
IJNSA Journal
 
Unlimited Length Random Passwords for Exponentially Increased Security
Unlimited Length Random Passwords for Exponentially Increased Security
IJCSEA Journal
 
Securing the cloud computing systems with matrix vector and multi-key using l...
Securing the cloud computing systems with matrix vector and multi-key using l...
eSAT Publishing House
 
Is unit-4-part-1
Is unit-4-part-1
vmuniraja
 
IRJET - Deep Learning based Chatbot
IRJET - Deep Learning based Chatbot
IRJET Journal
 
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
RSA - ENCRYPTION ALGORITHM CRYPTOGRAPHY
Qualcomm
 
A Survey of Source Authentication Schemes for Multicast transfer in Adhoc Net...
A Survey of Source Authentication Schemes for Multicast transfer in Adhoc Net...
ijsrd.com
 
IRJET- A Work Paper on Email Server using 3DES
IRJET- A Work Paper on Email Server using 3DES
IRJET Journal
 
Survey of the end to end secure communication in ADHOC networks
Survey of the end to end secure communication in ADHOC networks
Ahmad Sharifi
 
Confidentiality & Authentication Mechanism for Biometric Information Transmit...
Confidentiality & Authentication Mechanism for Biometric Information Transmit...
IJNSA Journal
 
Securing Group Communication in Partially Distributed Systems
Securing Group Communication in Partially Distributed Systems
IOSR Journals
 
Implementation Secure Authentication Using Elliptic Curve Cryptography
Implementation Secure Authentication Using Elliptic Curve Cryptography
AM Publications
 
Security analysis of fbdk block cipher for digital images
Security analysis of fbdk block cipher for digital images
eSAT Journals
 
Mini Project on Data Encryption & Decryption in JAVA
Mini Project on Data Encryption & Decryption in JAVA
chovatiyabhautik
 
IRJET- Data Security in Network Flow using Obfuscation Technique
IRJET- Data Security in Network Flow using Obfuscation Technique
IRJET Journal
 
Comprehensive Study of Counter-acting Security Threats in Mobile Ad Hoc Networks
Comprehensive Study of Counter-acting Security Threats in Mobile Ad Hoc Networks
drsrinivasanvenkataramani
 

Viewers also liked (8)

2012 5配套
2012 5配套
jayisbest
 
Help Them Help You: Good Managers Inspire Good Employee Performance
Help Them Help You: Good Managers Inspire Good Employee Performance
Flevy.com Best Practices
 
Family History Project pt.2 interview
Family History Project pt.2 interview
elite1080
 
τα κινήματα στην τέχνη
τα κινήματα στην τέχνη
Expertin- Lagada
 
Ανανεώσιμες πηγές ενέργειας
Ανανεώσιμες πηγές ενέργειας
Εύα Ζαρκογιάννη
 
Cross industry
Cross industry
Diana Sofia Moreno Rodriguez
 
IBM Spectrum Storage Suite
IBM Spectrum Storage Suite
Diana Sofia Moreno Rodriguez
 
Ad

Similar to 2 IJAERS-JUN-2015-6-RSA and Modified RSA algorithm using C Programming (20)

Unit-III_3R-CRYPTO_2021-22_VSM.pptx
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
VishwanathMahalle
 
3 public key cryptography
3 public key cryptography
Rutvik Mehta
 
Public key algorithm
Public key algorithm
Prateek Pandey
 
Cryptography
Cryptography
Rutuja Solkar
 
Pooguzhali
Pooguzhali
NIVEDHINIMANIVANNAN
 
Module2.pptx
Module2.pptx
ShilpaShettyA1
 
international security system data threats
international security system data threats
gacop74666
 
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PRINCIPLES OF INFORMATION SYSTEM SECURITY
gacop74666
 
CNS 3RD UNIT PPT.pptx
CNS 3RD UNIT PPT.pptx
pjeraids
 
Network and Information Security unit2.ppt.ppt
Network and Information Security unit2.ppt.ppt
Vivekananda Gn
 
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsa
Mazin Alwaaly
 
CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdf
BhuvanaR13
 
PUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.ppt
RizwanBasha12
 
Rsa diffi-network security-itt
Rsa diffi-network security-itt
rameshvvv
 
2. public key cryptography and RSA
2. public key cryptography and RSA
Dr.Florence Dayana
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
Indra97065
 
Ch34508510
Ch34508510
IJERA Editor
 
Principles of public key cryptography and its Uses
Principles of public key cryptography and its Uses
Mohsin Ali
 
Unit 3(1)
Unit 3(1)
Vinod Kumar Gorrepati
 
Rsa
Rsa
Navneet Sharma
 
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
Unit-III_3R-CRYPTO_2021-22_VSM.pptx
VishwanathMahalle
 
3 public key cryptography
3 public key cryptography
Rutvik Mehta
 
international security system data threats
international security system data threats
gacop74666
 
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PRINCIPLES OF INFORMATION SYSTEM SECURITY
gacop74666
 
CNS 3RD UNIT PPT.pptx
CNS 3RD UNIT PPT.pptx
pjeraids
 
Network and Information Security unit2.ppt.ppt
Network and Information Security unit2.ppt.ppt
Vivekananda Gn
 
Information and data security public key cryptography and rsa
Information and data security public key cryptography and rsa
Mazin Alwaaly
 
CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdf
BhuvanaR13
 
PUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.ppt
RizwanBasha12
 
Rsa diffi-network security-itt
Rsa diffi-network security-itt
rameshvvv
 
2. public key cryptography and RSA
2. public key cryptography and RSA
Dr.Florence Dayana
 
Public Key Cryptography and RSA algorithm
Public Key Cryptography and RSA algorithm
Indra97065
 
Principles of public key cryptography and its Uses
Principles of public key cryptography and its Uses
Mohsin Ali
 
Ad

2 IJAERS-JUN-2015-6-RSA and Modified RSA algorithm using C Programming

  • 1. International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015] ISSN: 2349-6495 Page | 15 RSA and Modified RSA algorithm using C Programming M.Puneeth, Jasmine shafi Farha, N.Sandhya, M.Yamini Department of ECE, Kluniversity, Vijayawada, India Abstract—RSA algorithm is a process of encrypting plain text in blocks, every block has a binary value lesser than some n number. The size of block should be less than log (n) or equal to log (n), public-key cryptosystem was implemented by RSA algorithm In this Journal we are going to implement a RSA and modified RSA algorithm using c programing, modified RSA algorithm is somewhat slower than RSA but it is more secure Keywords—decryption,digitalsignatures,encryption, key, RSA, I. INTRODUCTION Diffie and Hellman introduced the RSA algorithm at the time when electronic mail was expected to arise soon. Public key cryptography uses the algorithms that are mathematical relationships based. Though it is uncomplicated for the receiver for generating public key and private key, for decryption of the message with the help of private key, and simple for a sender for the encryption of the message with the help of public key, so it is too difficult for any person for the derivation of private key, when only public key is known. For signature verification purposes, generally, only a hash of the message is usually encrypted. Public-key cryptography is a basic, vital, and technology that which is used widely. It is used by many cryptosystems and cryptographic algorithms [3]. The encryption technique which is used to convert original (plain text) data to cipher text. The plain text is also called the clear text. The plain text is easily read by anyone. Second technique is decryption which is used to convert cipher text to plaintext (readable format).cipher text is also called the unreadable form [4] RSA algorithm is having the important parameters of affecting its security level and speed. With the increase of modulus length it plays important role of increasing the difficulty level for the decomposition of that into its required factors. This increases private key length and hence it is very difficult to decrypt without having the decryption key [1] The algorithm RSA, at present is the most successful use for ciphering keys and passwords or counts [2] The two important ideas of RSA are: 1.1. Public-key encryption: In RSA algorithm the keys that are required to encrypt the data are public whereas the keys for decryption are not.so the person only who has the original decryption key only can decrypt the message. The decryption key should be done in such a manner that no other key should match public key of encryption to decrypt the message 1.1.1. Plain text: Plain text is the text that which can be readable by everyone 1.1.2: Encryption Algorithm: The encryption algorithm is an algorithm that which is used for performing several transformations on the plain text 1.1.3:Public and Private keys: Public and Private keys are pair of keys that which are selected for using one key for encryption and other for decryption 1.1.4. Cipher Text: Cipher text is a scrambled text that which is produced by using mathematical logics on plain text 1.1.5: Decryption Algorithm: Decryption algorithm is an algorithm that which is used for accepting matching key and cipher text that which is used for producing plain text 1.2: Digital signatures: The receiver wanted to verify that the message was sent by sender and not just came from authentication. This can be done using senders decryption key and the using public key of encryption anyone can verify it later. This RSA algorithm is used to secure electronic mail and also for electronic transmissions and transactions II. PUBLIC KEY CRYPTOSYSTEMS Each and every user has his own procedure of encrypting and decrypting the message. These encryption and the decryption process were belonged to keys. In RSA algorithm there are two numbers as a set. The message is symbolized as “P” which is for encryption .There are four types of procedures which are essential to public key crypto systems: 2.1. Procedures of public key crypto systems: 2.1.1. Deciphering the enciphered message gives the original message D (E (P)) = P 2.1.2. Reversing of procedure will return P E (D (P)) = P 2.1.3. (E) and (D) are easy for computing
  • 2. International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015] ISSN: 2349-6495 Page | 16 2.1.4. The publicity of encryption key does not affect the decryption that is it is not that much easy to find out decryption key (D) from (E) If cipher text = C+E (P) then if somebody are trying to find out D by trying to match P in E (P) = C is complex. If he tries to match with number of messages then the number is large E satisfies 2.1.1, 2.1.3 and 2.1.4 is called as “trapped door permutation” or it is also called as “trapped door function” It is called as trap door because it’s inverse of decryption (D) is easy for computing if certain information of trap door is available ,on other hand it is hard .It is also a one way because it is easy for computing in one perspective but it is very hard in other perspective. It is also a permutation because it satisfies 2.1.2, it means that potential message is due to cipher text, every message may be a cipher text of some other message.2.1.2 is used for signatures 2.2. Privacy: The encryption process is done for providing privacy for the plain text. It should be make sure that intruder cannot bypass the cipher text. Without 2.4 property, the encryption process is not a public key still, which is similar to NBS standard. Fig. 1 Privacy Suppose if Puneeth want’s send a private message to Jasmine .From the public file EA will be retrieved by him, P will be encoded and C= EA(P) will be obtained, Jasmine decodes it by using her DA, the cipher text will be decrypted by her only because of property (2.1.4) 2.3. Signatures: To ensure that message is sent by sender and it has not being sent by the third party. Who uses same type of encryption key. So that a digital signature is used to avoid this. Signature cannot be changed or modified so that there will be a good confidentiality between sender and receiver Fig. 2 Encryption and authentication of public key cryptosystems Suppose if Puneeth wanted to send a private message for Jasmine, the document will be signed by assuming that RSA algorithm is a reliable and quick, it is obtained mostly by the property (2.1.3).The message will be decrypted by Puneeth’s key in which it allows the properties (2.1.1) and (2.1.2).It shows that every message will be a cipher text of other message DB (P) =J Then J will be encrypted by encryption key of Jasmine EA (J) =EA (DB (P)) In this way we are confident that document will be decrypted by Jasmine only. When she encrypts the message, she will get the signature by DA (EA (DB (P)) =J. Now she will know that message is sent by Puneeth, Since the decryption key of Puneeth only computes the signature, separately the message will not be sent because By using Puneeth’s public key of encryption Jasmine can deduce the message with signature. Encryption key of Puneeth can be given as
  • 3. International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015] ISSN: 2349-6495 Page | 16 2.1.4. The publicity of encryption key does not affect the decryption that is it is not that much easy to find out decryption key (D) from (E) If cipher text = C+E (P) then if somebody are trying to find out D by trying to match P in E (P) = C is complex. If he tries to match with number of messages then the number is large E satisfies 2.1.1, 2.1.3 and 2.1.4 is called as “trapped door permutation” or it is also called as “trapped door function” It is called as trap door because it’s inverse of decryption (D) is easy for computing if certain information of trap door is available ,on other hand it is hard .It is also a one way because it is easy for computing in one perspective but it is very hard in other perspective. It is also a permutation because it satisfies 2.1.2, it means that potential message is due to cipher text, every message may be a cipher text of some other message.2.1.2 is used for signatures 2.2. Privacy: The encryption process is done for providing privacy for the plain text. It should be make sure that intruder cannot bypass the cipher text. Without 2.4 property, the encryption process is not a public key still, which is similar to NBS standard. Fig. 1 Privacy Suppose if Puneeth want’s send a private message to Jasmine .From the public file EA will be retrieved by him, P will be encoded and C= EA(P) will be obtained, Jasmine decodes it by using her DA, the cipher text will be decrypted by her only because of property (2.1.4) 2.3. Signatures: To ensure that message is sent by sender and it has not being sent by the third party. Who uses same type of encryption key. So that a digital signature is used to avoid this. Signature cannot be changed or modified so that there will be a good confidentiality between sender and receiver Fig. 2 Encryption and authentication of public key cryptosystems Suppose if Puneeth wanted to send a private message for Jasmine, the document will be signed by assuming that RSA algorithm is a reliable and quick, it is obtained mostly by the property (2.1.3).The message will be decrypted by Puneeth’s key in which it allows the properties (2.1.1) and (2.1.2).It shows that every message will be a cipher text of other message DB (P) =J Then J will be encrypted by encryption key of Jasmine EA (J) =EA (DB (P)) In this way we are confident that document will be decrypted by Jasmine only. When she encrypts the message, she will get the signature by DA (EA (DB (P)) =J. Now she will know that message is sent by Puneeth, Since the decryption key of Puneeth only computes the signature, separately the message will not be sent because By using Puneeth’s public key of encryption Jasmine can deduce the message with signature. Encryption key of Puneeth can be given as
  • 4. International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015] ISSN: 2349-6495 Page | 18 V. APPLICATIONS OF RSA RSA algorithm is used in electronic fund transmission why because the information of finance needs the high security This RSA algorithm can be used in electronic mail transformation, online shopping and electronic money transactions VI. ATTACKS ON RSA There are four possible attacks on RSA algorithm the following are the attacks that possible on RSA 6.1.1: Brute-force attack: Brute-force attack is an attack that which involves in trying all the possible private keys 6.1.2: Mathematical attacks: The mathematical attack is the attack that which defines there are several type of approaches all the equivalent in effort for factorizing product of the two prime numbers 6.1.3: Timing attacks:timing attacks depend upon the time that which is taken to decrypt the algorithm. 6.1.4.chosen cipher text attacks:this type attack exploits RSA algorithm properties VII. CONCLUSION We have obtained results of RSA and modified RSA using c programming we have encrypted and decrypted using the RSA algorithm VIII. RESULTS 8.1: RSA results Fig. 4 If a non-prime number is entered then It shows wrong input Fig. 5 Two prime numbers and plain text Fig. 6 Encrypted and decrypted messages Fig. 7Another plain text with different prime numbers
  • 5. International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015] ISSN: 2349-6495 Page | 19 Fig. 8 The encrypted and decrypted messages of Second Plain text 8.2: Modified RSA results: Fig. 9 Plain text of modified RSA Fig. 10 The encrypted and decrypted messages of Modified RSA Fig. 11 Second plain text of Modified RSA Fig. 12 The encrypted and decrypted messages of second plain text in modified RSA
  • 6. International Journal of Advanced Engineering Research and Science (IJAERS) [Vol-2, Issue-2, June.- 2015] ISSN: 2349-6495 Page | 20 REFERENCES [1] Sonal sharma,Jitendra Singh Yadav,Prasanth Sharma “Modified RSA Public Key Cryptosystem Using Short Range Natural Number Algorithm” International Journal of Advanced Research in Computer Science and Software Engineering, Volume 2, Issue 8, August 2012 [2] Samoud Ali, Cherif Adnen. “RSA ALGORITHM IMPLEMENTATION FOR CIPHERING MEDICAL IMAGING “International Journal of Computer and Electronics Research, Volume 1, Issue 2, August 2012 [3] Amare Anagaw Ayele1 Dr. Vuda Sreenivasarao“A Modified RSA Encryption Technique Based on Multiple public keys” International Journal of Innovative Research in Computer and Communication Engineering, Vol. 1, Issue 4, June 2013 [4] B.Persis Urbana Ivy, Purshotam Mandiwa. Mukesh Kumar“ A modified RSA cryptosystem based on ‘n’ prime numbers”Intenational journal of Engineering and science,volume1 ,issue2,Nov,2012