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

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 Databases Questions!