Question: Problem 7 . ( Keygen Program ) Write a program called keygen.py that accepts lo ( int ) and h i ( int ) as

Problem 7.(Keygen Program) Write a program called
keygen.py that accepts lo (int) and hi(int) as command-line arguments, generates public/private keys (n,e,d), and writes the keys to standard output, separated by a space. The interval [lo,hi) specifies the interval from which prime numbers p and q needed to generate the keys are picked.Problem 8.(Encryption Program) Write a program called encrypt.py that accepts the public-key n (int) and e (int) as command-line arguments and a message to encrypt from standard input, encrypts each character in the message, and writes its fixed-width binary representation to standard output.Problem 9.(Decryption Program) Write a program called decrypt.py that accepts the private-key n (int) and d (int) as command-line arguments and a message to decrypt (produced by encrypt.py) from standard input, decrypts each character (represented as a fixed-width binary sequence) in the message, and writes the decrypted character to standard output.Data: Be sure to test your programs thoroughly using files provided under the data folder. For example:
Problem 7 . ( Keygen Program ) Write a program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!