Pages

Categories

Cryptography – One Time Pad

Cryptography – One Time Pad
Published on 29 March, 2014
Currently in the process of making a simple application that can encrypt and decrypt data
using the one time pad method. I’ve been working on it in my spare time and so far it can
encrypt/decrypt a string, as well as generate a cryptographically secure key (as far as
randomly generating an array of bytes goes) with various conversions.
What first started off as a simple project that takes a string data type, randomly generates a
simple key, and performs a modulus addition for each byte in the given string and the key to
create the encrypted data (and the reverse for decryption), soon grew into a bit more.
Although looking at the source code there’s more documentation than there is actual code. I
learnt a lot from all the small changes made throughout the development of it. Making code
more efficient, less function calls, reuse of code, method overloading, and a brief bit on
designing the classes to be used as a library/API to make it easier on the front end.
There’s still a lot more to the worked on this project, as simple as it is. In the current state
there’s now a (very basic) WinForm that can be used to enter text, generate a key, and
encrypt/decrypt it. Although future implementations will have proper unit testing, error
checking, and move onto file encrypting/decrypting.
The project is hosted on my github account here.
Earlier blog post about cryptography can be found here.
Filed in Uncategorized | No replies