Question
implement one-time pad encryption, including encryption function Enc, decryption function Dec, and key generation function KeyGen. More specifically: For the encryption function, given a plaintext
implement one-time pad encryption, including encryption function Enc, decryption function Dec, and key generation function KeyGen.
More specifically:
For the encryption function, given a plaintext m and a secret key sk, your program need to compute a ciphertext of this plaintext c m sk, print it in the terminal, and write this ciphertext to a file.
For the decryption function, given a ciphertext c and a secret key sk, your program need to output the plaintext of this ciphertext m c sk, print it in the terminal, and write this plaintext to a file.
For the key generation function, given a security parameter , your program need to output a secret key sk, where the length of sk is . In addition, you also need to write this secret key to a file.
Preferably use java, but C++ and python are allowed also.
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