Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md Update and rename readme.md to README.md Sep 23, 2015
compileall
keygen.c Add OTP Aug 21, 2015
otp_common.c Add OTP Aug 21, 2015
otp_common.h Add OTP Aug 21, 2015
otp_dec.c
otp_dec_d.c Add OTP Aug 21, 2015
otp_enc.c
otp_enc_d.c Add OTP Aug 21, 2015
plaintext1 Add OTP Aug 21, 2015
plaintext2
plaintext3 Add OTP Aug 21, 2015
plaintext4 Add OTP Aug 21, 2015
plaintext5 Add OTP Aug 21, 2015

README.md

One-Time Pad Encryption

  • Client/server simulation of a one-time pad encryption system
  • Encrypts and decrypts a plaintext message using a generated key
  • Accepts A-Z and space characters
  • otp_enc_d and otp_dec_d run in the background as daemons

Usage

  • Generate a key using keygen
    • Length must be at least as long as the plaintext string to encrypt/decrypt
    • Syntax: keygen keyLength
    • Example: keygen 256 > myKey
  • Let otp_enc_d and otp_dec_d run in the background
    • Syntax: otp_enc_d listening_port/otp_dec_d listening_port
    • Example: otp_enc_d 57171 &
    • Example: otp_dec_d 57172 &
  • Encrypt a plaintext string
    • Syntax: otp_enc plaintext key port
    • Example: otp_enc myPlaintext myKey 57571 > myCiphertext
  • Decrypt a ciphertext string
    • Syntax: otp_dec ciphertext key port
    • Example: otp_dec myCiphertext myKey 57172 > myPlaintextA
To-do
  • Refactor common code
You can’t perform that action at this time.