You have been hired to develop the One-Time Pad cipher for a company. You can use any languages such as Java, Python, C++ in the development. You implementation must consists of the following two functions: Encrypt(plaintext, key) and Decrypt(ciphertext, key). Encrypt function returns the ciphertext of the input plaintext, and Decrypt function returns the plaintext of the input ciphertext. The plaintext and ciphertext only consists of capital letters from ‘A’ to ‘Z’ and some spaces. You can also use pseudo random number function to generate the key in the program (in ideal scenario, we need to use the genuine random number generator). Note that, the key should be at least as long as the plaintext/ciphertext. Please show your code in the lab report Please show screen shots of the demo for both encryption and decryption in the lab report.
You have been hired to develop the One-Time Pad cipher for a company. You can use any languages such as Java, Python, C++ in the development. You implementation must consists of the following two functions: Encrypt(plaintext, key) and Decrypt(ciphertext, key). Encrypt function returns the ciphertext of the input plaintext, and Decrypt function returns the plaintext of the input ciphertext.
The plaintext and ciphertext only consists of capital letters from ‘A’ to ‘Z’ and some spaces. You can also use pseudo random number function to generate the key in the program (in ideal scenario, we need to use the genuine random number generator). Note that, the key should be at least as long as the plaintext/ciphertext.
Please show your code in the lab report
Please show screen shots of the demo for both encryption and decryption in the lab report.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images