Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

RSA Encryption Algorithm: Generating Keys and Encrypting Messages - Prof. John F. Ranelli, Assignments of Computer Science

The rsa encryption algorithm, which is a widely used public key cryptosystem. The process involves selecting two prime numbers, computing the modulus n, finding a public key e, calculating the private key d, and encrypting and decrypting messages using the public and private keys, respectively. Examples of encryption and decryption.

Typology: Assignments

2009/2010

Uploaded on 04/12/2010

koofers-user-fih
koofers-user-fih 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download RSA Encryption Algorithm: Generating Keys and Encrypting Messages - Prof. John F. Ranelli and more Assignments Computer Science in PDF only on Docsity! RSA Encryption 1. Randomly choose two prime numbers: p and q. p = 127 q = 211 2. Compute N = pq N = 127 * 211 = 26,797 3. Compute N' = (p – 1)(q – 1) N' = (127 – 1) * (211 – 1) = 26,460 4. Choose e > 1 such that gcd( e , N' ) = 1 (any e that is relatively prime to N' ) i. e. any prime e = 13,379 5. Compute d as the multiplicative inverse of e, mod N' (Fig. 7.18) d = 11,099 since e (13,379) * d (11,099) mod N' (26,460) = 1 6. Destroy p, q, N' 7. Use e and N to encrypt a message. Use d to decrypt. Encryption Example encrypt (int M) = Me (mod N). M is the message to be sent encrypt(10,237) = 10,23713,379(mod 26797) = 8422 (see fig. 7.16) 8422 is the encrypted M Decryption Example decrypt(R) = Rd(mod N) R is the received encrypted message decrypt(8422) = 842211099(26797) = 10,237
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved