0% found this document useful (0 votes)
54 views

The RSA Algorithm: For RSA Algorithm, We Have To

The RSA algorithm uses a public and private key pair for encryption and decryption. It involves choosing two large prime numbers to compute the public key exponent and modulus. A message is encrypted with the public key and can only be decrypted by the private key. The document provides an example using primes 3 and 11, with public key exponent 3 and modulus 33, to encrypt the plaintext "SUZANNE" into ciphertext and decrypt it back to the original plaintext.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

The RSA Algorithm: For RSA Algorithm, We Have To

The RSA algorithm uses a public and private key pair for encryption and decryption. It involves choosing two large prime numbers to compute the public key exponent and modulus. A message is encrypted with the public key and can only be decrypted by the private key. The document provides an example using primes 3 and 11, with public key exponent 3 and modulus 33, to encrypt the plaintext "SUZANNE" into ciphertext and decrypt it back to the original plaintext.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

The RSA Algorithm: For RSA algorithm, we have to

1) Choose two large primes, p and q, ( typically greater than 10100 )


2) Compute n = p X q and z = ( p – 1 ) ( q - 1 )
3) Choose a number relatively prime to z and call it d.
4) Find e such that e X d = 1 mod z

To encrypt a message, P, compute C = pe (mod n). To decrypt C, compute


P = Cd (mod n). It can be proven that for all P in the specified range, the encryption and
decryption functions are inverses. To perform the encryption, we need e and n. To perform the
decryption, we need d and n. Therefore, the public key consists of the pair (e, n) and the private
key consists of (d, n).

Here is a small example of RSA algorithm. For this example, we have chosen p = 3 and q = 11,
giving n = 33 and z = 20. A suitable value for d is d = 7, since 7 and 20 have no common factors.
With these choices, e can be found by solving the equation 7e = 1 (mod 20), which yields e = 3.
The cipher text, C, for a plaintext message, P, is given by C = P3 (mod 33). The cipher text is
decrypted by the receiver according to the rule P = C7 (mod 33). The figure shows the encryption
of the plaintext “SUZANNE” as an example.

Plaintext ( P ) P3 Cipher text ( C ) C7 After Decryption

Symbolic Numeric P3 MOD 33 C7 MOD 33 Symbolic


S 19 6859 28 13492928512 19 S
U 21 9261 21 1801088541 21 U
Z 26 17576 20 1280000000 26 Z
A 01 1 1 1 01 A
N 14 2744 5 78125 14 N
N 14 2744 5 78125 14 N
E 05 125 26 8031810176 05 E
Sender’s computation Receiver’s Computation

Fig: Example of RSA Algorithm

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy