Skip to content

codeneverdies/verny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verny

My implementation of the One-Time Pad encryption and/or the Vernam cipher.

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.

Beware

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.


Clone the repo

  • git clone https://github.com/codeneverdies/verny.git
  • cd verny
  • make

Usage

  • bin/verny -f [INPUT_FILE] -o [OUTPUT_DIR]

Note the -o flag is optional the directory MUST exist. By default verny places everything in the current directory

Examples

Generate a OTP for test.txt and output files to the test directory

  • bin/verny -f test/test.txt -o test

image1

Decrypt a file with a OTP

  • bin/verny -d -f test/cipher.vrn -k test/otp.vrn -o test

image1

Releases

No releases published

Packages

No packages published