One-time pad encoder/decoder and key generator


Settings Remark
One-time pad The one-time pad is a randomly generated hexadecimal value which is used to encrypt a message or decrypt a cipher text. To encrypt a message, the one-time pad size in bytes must always be larger or equal than the message size in bytes.

If the one-time pad byte size is larger, this tool automatically reduces the one-time pad byte size to exactly the message byte size.

If the one-time pad byte size is shorter, the message can not de encrypted.

The sender and recipient should always keep the one-time pad secret.
Each time a message is encrypted always use a different one-time pad.

NEVER RE-USE A ONE-TIME PAD!

The one-time pad may contain a prefix followed by a colon, for example:

Cipher text = 020:3184e64dddfa25059c557d
One-time pad = 020:79e18a21b2da726aee3919

In this example, the prefix "020" in the cipher text helps the recipient which one-time pad should be used to decrypt the the cipher text.
The recipient may have a large list of one-time pads, for example:

:
019:2c136dad25949e1a6020d3
020:79e18a21b2da726aee3919
021:ac5371279e30ed4959cf8a
022:22237fbf0543eaa131718d
023:c0ea8ff4092664eb74d854
024:4671157d97ea84c8df9e2c
025:b90a68251c1e1037311de2
026:c40f71a6956b85dbe75d71
:

You can omit the prefix and colon in the cipher text and/or one-time pad (both are not used for actual decoding) as long as the recipient of the cipher text knows which one-time pad must be used to decode the cipher.

Decrypt a cipher text:
cipher:       3184e64dddfa25059c557d
one-time pad: 79e18a21b2da726aee3919
              ---------------------- xor
message:      48656c6c6f20576f726c64	

message in UTF-8: Hello World