For more information check wiki
In my eyes the OTP Encryption scheme is..
You take your block Ex: 32 bytes of data
Generate a random sequence of bytes (Your pad) >= Size of your block
For i in Pad, Block
XOR Pad[i], Block[i]
i++
Now you have your cipher text
Decryption is very simple you XOR the generated pad against the cipher text.
No pad should EVER be used more than once
If you plan to use One-Time Pad Encryption The pad size is directly dependant on the size of your data Meaning if you have large chunks of data to be encrypted this
may not
be the best encryption method for you.
git clone https://github.com/codeneverdies/verny.git
cd verny
make
bin/verny -f [INPUT_FILE] -o [OUTPUT_DIR]
Note the
-o
flag is optional the directory MUST exist. By defaultverny
places everything in the current directory
Generate a OTP for
test.txt
and output files to thetest
directory
bin/verny -f test/test.txt -o test
Decrypt a file with a OTP
bin/verny -d -f test/cipher.vrn -k test/otp.vrn -o test