Go to top

# RSA encryption/decryption

, 5 May 2003
 Rate this:
Find a RSA implementation in VC++. Key size is 32-bit.

## Introduction

Note: Please refer rsa.doc for more details on code and software. I can be contacted at bhaskar_bora@yahoo.com for further queries. Implementation includes private and public key (32-bit) generation and support of text file encryption and decryption. This document contains the algorithms and information required to design and implement RSA algorithm in VC++. This software is only for text data encryption and decryption. Document also contains the software usage guidelines and screen-shots.

## Intro to RSA

RSA algorithm is mainly a public key encryption technique used widely in network communication like in Virtual Private Networks (VPNs). In public key encryption technique, a key is split into two keys and they are called as public and private keys. Public key is advertised to the world and private key is kept secret. It is not possible to generate private key using the public key. So, someone who knows the public key cannot decrypt a message after it has been encrypted using the public key.

RSA algorithm is a block cipher technique in which plain text and cipher text are integers between ‘0’ and ‘n-1’ from some ‘n’. In RSA algorithm encryption and decryption are of following form, for some plain text M and cipher text C:

`C = M^e mod n`

`M = C^d mod n`

Both sender and receiver must know the value of ‘n’. The sender knows the value of ‘e’ and only receiver knows the value of ‘d’. Thus, this is a public-key encryption algorithm with a public key of KU={e, n} and private key of KR={d, n}. For the algorithm to be satisfactory for public-key encryption, the following requirement must be met

1. It is possible to find values of e, d, n such that M^ed = M mod n for all M<n.
2. It is relatively easy to calculate M^e and C^d for all values of M<n.
3. It is infeasible to determine d given e and n.

A list of licenses authors might use can be found here

## Share

Web Developer
India
Working with EMC Corp, Bangalore (India) in distributed embedded software design. Like to read and code in storage, computer security and language design areas.

## You may also be interested in...

### IDC: The Intelligent Integrated Enterprise

 First PrevNext
 Unicodes in encrypted files. NIKHIL788 Agrawal 4-Dec-12 7:02
 help steven stevanus 23-Feb-12 17:01
 for metode encryp and decryp with RSA.
 help steven stevanus 23-Feb-12 17:00
 is your software Encrypt/Decrypt the text by 128 bit key Raj.Amit 29-Jul-10 21:51
 My vote of 1 KarstenK 6-Jun-10 21:26
 how to run it in VS 2008? Member 1513099 5-Apr-10 12:53
 Thanks need help tnla 9-Nov-09 8:27
 My vote of 1 Walxer 2-Nov-09 9:44
 decrpter for data in SHA1/RSA format.mdb file oviis_4u 3-May-09 4:40
 Re: decrpter for data in SHA1/RSA format.mdb file hebbiche 26-May-09 11:17
 My vote of 1 Kirk2112 21-Apr-09 8:54
 Need help ! Hackmahesh 4-Apr-09 7:52
 My vote of 1 Zinkyu 22-Dec-08 9:10
 kamine kutte ye kya tha????????? anubhavkapuuri 28-Nov-08 3:31
 i can't run program! nguyenvanchinh121 4-Nov-08 23:37
 HOW TO HANDEL 128 BIT KEY GENARETION tandra islam 21-Apr-08 7:56
 How to handle 521 bit encryption/decryption Yiping Zou 21-Jun-04 16:01
 Re: 32 Bits!!! Niklas Lindquist 6-May-03 2:14
 Re: 32 Bits!!! Jörgen Sigvardsson 6-May-03 6:06
 Re: 32 Bits!!! Kastellanos Nikos 6-May-03 6:19
 Re: 32 Bits!!! Antony Michael Kancidrowski 12-May-03 23:25
 Last Visit: 31-Dec-99 18:00     Last Update: 16-Sep-14 13:19 Refresh 12 Next »