2017-02-11 18:48:04 +00:00
|
|
|
Specification for one time pad use.
|
|
|
|
|
|
|
|
|
|
One Time Pad must be smaller than 4Gb!
|
|
|
|
|
|
|
|
|
|
File format for transmission data (cyphertext):
|
2017-02-11 18:50:16 +00:00
|
|
|
Part 0 - 32 bits, the MD5 hash of the OTP used for encoding (before encoding)
|
2017-02-11 18:48:04 +00:00
|
|
|
Part 1 - 32 bits, indicating the address of the start bit.
|
|
|
|
|
Part 2 - The message, no minimum length imposed.
|
|
|
|
|
|
|
|
|
|
Message input format: Ascii text (for starters)
|
|
|
|
|
|
|
|
|
|
File extension to be used .bin
|
|
|
|
|
|
|
|
|
|
To ensure security, the USB stick must be connected for less than 20 minutes at any time.
|
|
|
|
|
This prevents the contents being copied, as it's rather slow!
|
|
|
|
|
|
|
|
|
|
Encryption process:
|
2017-02-11 18:50:16 +00:00
|
|
|
0) MD5 hash the OTP and store this in output file part 0.
|
2017-02-11 18:48:04 +00:00
|
|
|
1) Scan the OTP for the first 1 (binary value >0). This is the start location.
|
|
|
|
|
2) Encode the start location in the first 32bits of the output file.
|
|
|
|
|
3) Bitwise XOR the message with the OTP to produce the cyphertext.
|
|
|
|
|
4) Erase all bits used in the OTP, setting to 0.
|
|
|
|
|
5) Output file contains 32 bits of start address and the cyphertext.
|
|
|
|
|
6) Erase the original message by writing all bits to 0.
|
|
|
|
|
|
|
|
|
|
Decryption Process:
|
2017-02-11 18:50:16 +00:00
|
|
|
0) Compute the MD5 hash of the OTP and confirm this matches input file part 0.
|
|
|
|
|
1) Read the first 32 bits of the cyphertext from input file part 1 to obtain position P.
|
2017-02-11 18:48:04 +00:00
|
|
|
2) Go to P within the OTP.
|
|
|
|
|
3) XOR the data from bits 33 onwards of the cyhertext with position P > of the OTP.
|
|
|
|
|
4) Erase all bits used in the OTP, setting to 0.
|
|
|
|
|
5) Output file contains only the decrypted cyphertext.
|
|
|
|
|
6) Display the output file for reading.
|
|
|
|
|
7) Erase the output file after reading by writing all bits to 0.
|