Hashing Algorithms

It’s a lot more complicated than meat and potatoes.

Hashing is taking data and assigning it a unique numerical value through an algorithm. Many different hashing algorithms exist today, such as MD5, SHA-1, and djb2. In this presentation I used djb2.

Hashing data, similar to encryption, is widely used today in all sorts of applications. A common use of hashing is file integrity.

Let’s say you have a simple text file that says something like this:
Hello World!

Using the djb2 algorithm, our output is this:

However changing it slightly can result in a catastrophic change.

hello world –> bf169756f8c65345

Using a program called Vim in my Mac Terminal, I created a small file to give us hash values for whatever we enter (as long as it is 256 characters or less). I wrote the program using the C Programming Language.

Screen Shot 2016-06-06 at 6.17.36 PM

Looks harmless, right?

Not really.


Here’s a few links for people who would like to try this themselves.
Source Code: CMDkOeOI.c
Windows Executable: CMDkOeOI.exe
Mac OS X / Linux: GQ35laY4.out