0% found this document useful (0 votes)
22 views5 pages

IJERTV2IS70757

This document discusses the implementation of the RSA algorithm for encryption. It describes the basics of RSA, including using a public and private key pair for encryption and decryption. The keys are generated from large prime numbers. The document also outlines the steps for RSA encryption and decryption.

Uploaded by

Dapur Antar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

IJERTV2IS70757

This document discusses the implementation of the RSA algorithm for encryption. It describes the basics of RSA, including using a public and private key pair for encryption and decryption. The keys are generated from large prime numbers. The document also outlines the steps for RSA encryption and decryption.

Uploaded by

Dapur Antar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

International Journal of Engineering Research & Technology (IJERT)

ISSN: 2278-0181
Vol. 2 Issue 7, July - 2013

ARM Based Implementation Of RSA Algorithm

Ms. Hemlata Powar 1, Prof. S. S. Patil2

1,2
Department of Electronics, Tatyasaheb Kore Institute of Engineering & Technology,
Warananagar, India

Abstract
information from tampering. RSA is used in hundreds
The information that are being transferred through of software products and can be used for key exchange,
the network of computers being read by other people digital signatures, or encryption of small blocks of
is very high. We need an efficient way of securing data.RSA uses a variable size encryption block and a
data. Therefore in this paper Implementation of RSA variable size key [2]. The challenge of RSA is to
algorithm is presented, to provide maximum security develop an algorithm in which it is impossible to
for data over the network. RSA is one of the most- determine the private key. RSA gets its security from
RT
common used algorithms for public-key cryptography the difficulty of factoring very large numbers [8]. We
applied for encrypting information. Having two keys used „n‟ prime numbers to provide more security throw
allows initiating secure communication through the networks and it is not easily factorized. Currently, it
IJE

public unprotected channels without the need to pass is suggested that the bit length of N should be at least
the private key to other side. It is involved encryption, 1024 for RSA to be considered secure. . RSA is also
decryption, and key generation. This technique used in some security protocols to ensure security.
provides more efficiency and reliability over the
networks. 2. Literature review
Keywords: public-key cryptography encryption, The idea of RSA algorithm is related with the
decryption, RSA fact that Diffie & Hellman introduced method of
exponential key exchange. The Clifford Cocks,a
mathematician, was made first ever known
1. Introduction description of key exchange system in 1973.but
this system was not used because for
implementation it requires expensive computers. In
In the present scenarios, data security in
1976 Ron Rivest,Adi Shamir & Leonard Adleman,
international network like internet plays a vital role as
are working at MIT on novel of cryptographic
the use of internet goes on increasing day-by-day, the
design. In 1977 they got idea of RSA algorithm for
number of users also simultaneously increasing.
security purpose.
Therefore, it makes sense for all parties involved to
secure the Internet from fraudulent use. Security
problems can occur in any networked environment. 3. RSA: Public Key Cryptography
Secured transmission of data can be achieved by using
encryption algorithm i.e. RSA algorithm.RSA is an RSA was publicly described in 1977 by
algorithm for public-key cryptography suitable for both Rivest, Shamir, and Adleman at MIT [11]. A user
signature/verification and encryption/decryption [1]. of RSA creates and then publishes the product of
The encryption and decryption solution can ensure the two large prime numbers. In this algorithm „n‟
confidentiality of the information, as well as the prime number used which is not easily breakable.
integrity of information and certainty, to prevent In RSA cryptographic algorithm two keys are used

IJERTV2IS70757 www.ijert.org 2096


International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 2 Issue 7, July - 2013

namely private key and public key. The public key  Choose an integer e, 1 < e < φ(n), such
which is not secret key, used for encrypt the that gcd(e, φ(n)) = 1.
messages. The private key is used for decrypt the  Compute the d, 1 < d < φ(n), such that ed ≡ 1
message .Private key is kept secret. In RSA (mod φ(n)), where d is secret component.
algorithm we can encrypt a message without the  Public Key is (n,e) which is used for encryption
need to exchange a secret key separately. Core  Private Key is (n,d) used for decryption.
arithmetic operation in RSA is exponentiation,
which is accomplished by a series of modular 5.2 Encryption:-
multiplications. Therefore, fast modular
multiplication is key to achieving fast execution of We encrypt the message with their public key
RSA cryptosystems [12]. According to number (e,n). Encryption is done by taking an
theory, it is easy to finds two big prime number, exponentiation of the message m with the public
but the factorization of the product of two big key e and then taking a modulus of it [6]. The
prime numbers is very difficult. following steps are done in encryption.
1. Obtain public key (n,e)
4. Implementation Tools of RSA Algorithm 2. Generate plaintext message m, where
m<n
In order to implement RSA we need [4]: 3. Compute the cipher text c = m^e mod n.
4. Send the cipher text „c‟ to the recipient.

 Arbitrary precision arithmetic


Used to handle large numbers & it provides
optimized implementations of arithmetic
5.3 Decryption:-
operations such as modular computation and
exponential computation. Decryption is done using the Private
key. The person who is receiving the encrypted
RT
message uses his own private key to decrypt the
 Pseudo Random Number Generator
message [6]. Decryption is similar to the
(PRNG) encryption except that the keys used are
PRNG is used to provide random numbers different.
IJE

for RSA key generation PRNG takes secret input 1. Recipient uses his private key (n,d) to
samples (noise, seed) into the PRNG and produces compute m = c^d mod n.
random output. This random output of PRNG is 2. Obtain the plaintext „m ‟.
secured with cryptographic function.
6. Key length for RSA
 Prime number generator
Prime number is a positive integer and is
divisible only by itself and 1. Prime numbers are The key length for a secure RSA
found with primality testing. transmission is typically 1024 bits. For more
security use 2048 or even 4096 bits. The longer
your information is needed to be kept secure, the
longer the key you should use. Keep up to date
5. RSA Algorithm with the latest recommendations in the security
journals. To encrypt a 256-bit key with a 1024-bit
RSA algorithm involve following three RSA modulus means we only need a single
steps i.e. Key generation, encryption, decryption. representative message integer.

5.1 Key Generation [5]:- 7. RSA Algorithm Example:-


 Generate two large random primes, p and q.
For security aim, should be of similar bit-
length.
Key Generation
 Compute n=p*q
Where n is called as modulus & its length is  Choose p = 3 and q = 11
required bit length i.e. 1024 bits.  Compute n = p * q = 3 * 11 = 33
 Calculate φ(n) = (p – 1)(q – 1), where φ is  Compute φ(n) = (p - 1) * (q - 1) = 2 * 10 = 20
Euler's totient Function  Choose e such that 1 < e < φ(n) . Let e = 7

IJERTV2IS70757 www.ijert.org 2097


International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 2 Issue 7, July - 2013

 Compute value for d such that (d*e)% φ(n)=1 4. ARM controller interfaced with zigbee.
Select d=3. i.e., d is the multiplicative inverse 5. Send this data to its destination through
of e (modulo φ(n)). network.
 Public key is (e, n) = (7, 33) 6. At receiver side, using private key develop
 Private key is (d, n) =(3, 33) decryption code.
7. ARM CONTROLLER interfacing with LCD
in embedded c & Display original message on
Encryption
LCD.

 Select message m=2 9. Theoretical Result


 Compute ciphertext c = 27 % 33 = 29
Following tables illustrates the results of
encryption & decryption of message
Decryption
Message Encrypted data Display
 Compute m = 293 % 33 = 2
 Obtain original message m=2 0 0 0
1 1 1
8. Block Diagram 2 29 29
3 9 9
4 33 33
Here we implement RSA algorithm using ARM 5 16 16
processor i.e. LPC 2138. For programming we are 6 30 30
using Keil software. Figure 1 represents encoding of 7 28 28
message & figure 2 represents decoding procedure for 8 2 2
generation of original message 9 15 15
RT
MAX ARM Table 1. Encryption at Transmitter
IJE

PC ZIGBEE
232 Controller Module
(Encryption) Received Decrypted data Display
Data
0 0 0
1 1 1
LCD 29 2 2
9 3 3
33 4 4
16 5 5
Figure 1. Transmitter Section 30 6 6
28 7 7
2 8 8
15 9 9
ARM
ZIGBEE LCD
Controller Table 2. Decryption at Receiver
Module
(Decryption)

Figure 2. Receiver Section


10. Conclusion
Steps for implementation:
1. First develop pc interfacing code with ARM In this paper, we implemented an algorithm of
Controller. encoding and decoding of information based on the
2. Generate public key for encryption & private RSA algorithm and intended for secure data
key for decryption. transmission. This interface was implanted under keil
3. Using public key develop encryption code in software. In which we endeavored to get the quality
Embedded c. that make easier the cryptography to have a good use of

IJERTV2IS70757 www.ijert.org 2098


International Journal of Engineering Research & Technology (IJERT)
ISSN: 2278-0181
Vol. 2 Issue 7, July - 2013

prime numbers. Primary advantage of RSA- public key


cryptography algorithm is increased security and
convinces. Therefore it is used in web browsers, email
programs, mobile phones, virtual private networks and
secure shells etc. RSA algorithms provide the security
to the network and data.

11. References

[1] W. Diffie and M. E. Hellman, “New directions in


cryptography”, IEEE Trans. Inform.Theory, Nov1976,
22:644-654

[2]HTTP://WWW.GARYKESSLER.NET/LIBRARY/CRY
PTO.HTML

[3] RSA LABORATORIES:


HTTP://WWW.RSA.COM/RSALABS/NODE.ASP?ID
=2167

[4] Anderson, J. A. and Bell, J. M. 1997. Number


Theory with Applications. New Jersey: Prentice-Hall

[5] Chang, C. C. and Hwang, S. J. 1997. A Simple


RT
Approach for Generating RSA Keys. Information
Processing Letters. 63 (1), 19-21

[6] Xin Zhou and Xiaofei Tang, "Research and


IJE

Implementation of RSA Algorithm for Encryption and


Decryption", the 6th International Forum on Strategic
Technology, pp. 1118 – 1121, 2011

[7] Uma Somani, Kanika Lakhani and Manish Mundra,


“Implementing Digital Signatures with RSA
Encryption Algorithm to Enhance the Data Security of
Cloud in Cloud Computing”, 1st International
Conference on Parallel, Distributed and Grid Computing
(PDGC), pp. 211-216, 2010

[8] Steve Burnett and Stephen Paine, “The RSA Security's


Official Guide to Cryptography”, CA USA:
Osborne/McGraw-Hill, 2001
[9] Public-key cryptographic standards.
http://www.rsasecurity.com, 2004.
[10]http://mathworld.wolfram.com/RSAEncryption.html

[11] R. Rivest, A. Shamir, and L. Adleman, “A method for


obtaining digital signature and public-key
cryptosystems,” Commun. ACM, vol. 21, pp.
120–126, Feb. 1978
[12] C. McIvor,M.McLoone, and J. V. McCanny, “Fast
Montgomery modular multiplication and RSA
cryptographic processor architectures,”

IJERTV2IS70757 www.ijert.org 2099

You might also like