Home > Vigenere-Cipher-2011

Vigenere-Cipher-2011

Vigenere-Cipher-2011 is a project mainly written in C and SHELL, it's free.

A new version of Vigenere Cipher, attempting to combat known issues in OTP

This program implements a mock OTP (one-time pad) Viegenere Cipher using one of the following modulos for the key:

26: Use only A-Z characters 52: Use A-Z and a-z characters 94: Use A-Z, a-z, and all other printable ASCII characters

However, implementing the Viegenere Cipher using computers poses a problem when transmitting the cipher over a wire.

A OTP requires that the pad cannot be intercepted, or recoverable. This, for exmaple, is why when the Viegenere Cipher was used in the past, methods such as burning paper, or hiding the key inside of a walnut shell, were used.

While this program uses a static key (see: table[] in vc.h), the distribution of the cipher key will be handled by encrypting the key using the Dille-Hellman Key Exchange.

Due to language restrictions, the GMP library is required to compile this program. Even on modern machines, only 64-bit numbers are allowed, which only offers 20 digits. For the D-H key exchange to serve a purpose, the key must at least be 512-bits long, which is about 154 digits.

This program will use anywhere from 1024 bits (308 digits) to 8192 bits (2,466 digits).

(Side note: Let n = bits

Total digits = log2 * n. Assume log is base 10. Range = 0 - (2^n)-1 [since the key cannot be negative] )

Using the GMP library provides the ability to use big integers (beyond 64 bits), while also offering the ability to handle the computations needed.

Please note that parts of this program are licensed under the GPL. While the program itself is licensed under the SPL, it tries to follow the restrictions put in place as much as possible.

This comes with two programs:

  1. Server
  2. Client (program & also PAM module [*.so])

The server is the backbone to this process. It is simple in nature but illistrates the purpose of this program.

The client will show you what the PAM module will be like. Using this, you can easily debug issues in regards to connectivity to the server.

The specific security here is that P, G and the server's secret are all generated per connection. This, coupled with the fact that the network communication between server & client/module leaves there being virtually no way to sniff the needed data, and get the secret key.