The one-time pad (OTP) is an encryption technique that cannot be cracked, but requires the use of a one-time pre-shared key the same size as, or longer than, the message being sent. In this technique, a plaintext is paired with a random secret key (also referred to as a one-time pad). Then, each bit or character of the plaintext is encrypted by combining it with the corresponding bit or character from the pad using modular addition.
Input:
A String of lower case letters, called Plain Text.
Another String of lower case letters, called OTP.
You are expected to write a program that receives a Plain Text (string) and OTP (string) and returns the encrypted ciphertext.
Type of issue: No more than one implementation will be accepted for each language. Once the implementation for a language has been taken up (i.e if it is checked in the 'Issue Progress' section), you must choose from the remaining.
Time Limit: Issues will be given on a first-come, first-serve basis. Once you take this issue up, you must complete it within 2 days, failing which the issue will be allocated to the next person who requested for this issue.
Additional instructions: While making the Pull Request, attach screenshots of 5 sample inputs and their corresponding output.
For this issue, use the following directory of the Hacktoberfest-2k18 repository:
/systems/cryptography/one-time-pad/
(where language_name is one of the languages mentioned above.)
Note
Please claim the issue first by commenting here before starting to work on it.
Description
The one-time pad (OTP) is an encryption technique that cannot be cracked, but requires the use of a one-time pre-shared key the same size as, or longer than, the message being sent. In this technique, a plaintext is paired with a random secret key (also referred to as a one-time pad). Then, each bit or character of the plaintext is encrypted by combining it with the corresponding bit or character from the pad using modular addition.
Input:
You are expected to write a program that receives a Plain Text (string) and OTP (string) and returns the encrypted ciphertext.
Example: Plain Text: quizzingisfun OTP: tequilamockingbird Cipher Text: jyythtnswupca
Details
Technical Specifications:
Issue requirements / progress
Resources
https://en.wikibooks.org/wiki/Cryptography/One_time_pads
Directory Structure
For this issue, use the following directory of the Hacktoberfest-2k18 repository: /systems/cryptography/one-time-pad/
(where language_name is one of the languages mentioned above.)
Note
Please claim the issue first by commenting here before starting to work on it.