Question: Use python please Problem 1: One-time pad is a perfectly secure encryption scheme. It requires a truly random key and the key to be as
Problem 1: One-time pad is a perfectly secure encryption scheme. It requires a truly random key and the key to be as long as the message. If one-time pad is used to encrypt many small messages, the requirement of the key being as long as the message, imply that key is never reused to encrypt more than one messages. Write a program for the one-time pad scheme. Your program should include key generation, encryption, and decryption procedures. It should be capable of taking as input a plaintext and print the encrypted message on the screen and taking as input the ciphertext and print the decrypted message on the screen. 1. Input: your program should take command line arguments, ask the user if they want to encrypt or decrypt the message, if they want to encrypt the message, it would take plaintext message as an input, and if they want to decrypt the message, it would take ciphertext as input. 2. Output: your program should print the ciphertext if the user encrypts the message and print the plaintext if the user decrypts the message
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
