12,998,391 members (77,224 online)
alternative version

Stats

249.2K views
40 bookmarked
Posted 5 May 2003

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...

 View All Threads First Prev Next
 how to run it in VS 2008? Member 15130995-Apr-10 12:53 Member 1513099 5-Apr-10 12:53
 Last Visit: 31-Dec-99 18:00     Last Update: 23-Jun-17 6:09 Refresh 1