From 557e958dfc2c1d0020dee0462a1ed808e022a559 Mon Sep 17 00:00:00 2001 From: James Devine Date: Sat, 11 Feb 2017 19:50:16 +0100 Subject: [PATCH] --- OneTimePadInstructions.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OneTimePadInstructions.txt b/OneTimePadInstructions.txt index 8a8fdaa..03460bc 100644 --- a/OneTimePadInstructions.txt +++ b/OneTimePadInstructions.txt @@ -3,6 +3,7 @@ Specification for one time pad use. One Time Pad must be smaller than 4Gb! File format for transmission data (cyphertext): +Part 0 - 32 bits, the MD5 hash of the OTP used for encoding (before encoding) Part 1 - 32 bits, indicating the address of the start bit. Part 2 - The message, no minimum length imposed. @@ -14,6 +15,7 @@ To ensure security, the USB stick must be connected for less than 20 minutes at This prevents the contents being copied, as it's rather slow! Encryption process: +0) MD5 hash the OTP and store this in output file part 0. 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. @@ -22,7 +24,8 @@ Encryption process: 6) Erase the original message by writing all bits to 0. Decryption Process: -1) Read the first 32 bits of the cyphertext to obtain position P. +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. 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.