Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need to creat 3 programs for : Lab Objectives: After this lab, the students should be able to - Explain the simple concepts of
i need to creat 3 programs for :
Lab Objectives: After this lab, the students should be able to - Explain the simple concepts of encryption and decryption to protect information in transmission. - Explain the concepts of cryptography, symmetric key, public keys and private keys used in practice. - Write programs that encrypt and decrypt data files using RSA cryptography algorithm. Definitions: Public key encryption is a method where two keys are generated, one to encrypt the message and another to decrypt the message. The encryption key is available to everyone. That is anyone can generate an encrypted message for a specific receiver. However, the decrypt key is kept secret. Only the holders of the decryption key can decrypt the cipher text. The RSA encryption algorithm was first publicly described by Ron Rivest, Adi Shamir and Leonard Aldeman in 1978. RSA is a popular public key encryption algorithm. It uses two secret prime numbers and properties of modulus arithmetic to generate both the public and private keys. A nice outline of the RSA algorithm and implementation can be found at: http://www.dimgt.com.au/rsa alg.html More generally, the public key consists of two values: (e,n) where the plain text message, m, is encrypted (cipher text c) via the following formula: c=memodn The private key consists of two values (d,n), where the encrypted text c is decrypted by the following formula m=cdmodn These algorithms are based on the theorems of modulus arithmetic. Outline of work: You are to create 3 programs: 1. Key generation program Input:? Output: integers: public key, integers: private key 2. Encryption program Input: integers: public key string: plain text message Output string: encrypted message 3. Decryption program Input: integers: private key string: encrypted message Output: string: plain text message Key generation program Generation of the keys is imitated with the selection of two large prime numbers, p and q. A requirement can sometimes be that the product of these numbers is 1024 bits long. Obviously, the longer the numbers the more difficult it will be to break this encryption. A suggestion is to pick two different primes between small ranges, like 137 - 311. Randomly pick a number, test for prime, increase the number if it is not prime
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started