The Basics

This man, who is arduously studying a staple of sheets that came out of what appears to be a printer right out of the stone age, has played an incredibly important role in the history of computer science — his ideas and his work are still playing a huge role in our day to day lives.

His name is Hans Peter Luhn and he was born on July 1st 1896 (yes, you’ve read that right).

During his early days everything pointed toward him learning the trade of a printer and taking over his father’s printing business. Yet, instead the first world war led to him becoming a communication engineer for the German army.

Once the war was over, Luhn entered the textile industry (where he invented the Lunometer, which is still being used today) and emigrated to the United States. He was always a very curious spirit, who continuously looked for innovative ways to solve the problems he encountered — this attitude got him granted over 80 patents throughout his lifespan!

It was only by pure chance that Luhn got into the computer field in 1947, which back then was characterized by the early day computers who overwhelmingly used punch cards to execute computations.

Working for IBM, he played a essential role in developing information retrieval and storage solutions for libraries and documentation centers, and pioneered the use of data processing equipment in resolving these problems.

While at IBM, he was also responsible for single handly coming up with the concept of business intelligence and creating one of the most widely used algorithms up to this day — the so-called Luhn algorithm. This algorithm is used all over the place, for checking credit card numers, social security numbers, etc. The Luhn Algorithm protects against accidental errors, but not malicious attacks — if you want to read more about this fascinating algorithm, be my guest.

In January 1953, Luhn was the first person to have come up with the concept of hashing — as he was looking for a convenient and easy technique to search and validate data.

So what exactly is hashing?

It turns out that if broken down, it’s pretty straightforward. A hashing algorithm takes an input (this can be literally anything), runs it through some magic mathematical processes and then creates a unique output (called a hash)

The unique thing about this process is that they use so-called one way functions. It is very easy to compute the hash from the given input, but infeasible to know the original input from the resulting hash (also known as message digest).

There are a lot of different hashing algorithms and they all work somewhat differently — but most of them (there are some exceptions) have one thing in common. No matter how long (all the Harry Potter books) or short (just one word) the inputs, the results will always be displayed as the same fixed quantity of numbers. What makes hashing algorithms so incredibly useful, is the property that the slightest change in the input completely alters the output.

This property is what makes hashing algorithms so incredibly helpful — because they can be used to validate data and detect even the slightest change to them.

Hashing algorithms nowadays are essential for many applications such as online payments, textual tools, cloud services, data-intensive research and cryptography among numerous other uses.

Especially one use cases sticks out — almost every time you’re entering a password somewhere in the world wide web, the websites runs your input (e.g. “Password123”) through a hashing algorithm (most likely RSA) and compares it with the stored hash that it has safed in their own database. If the hash matches the one they have stored, then you’re good to go and can log in!

This leads to the interesting fact, that even though you hear about hacks were passwords were stolen, this doesn’t mean that the hackers actually don’t know right away what the password is — since most likely the company had only stored the corresponding hashes. Yet this is so salvation for bad and easy passwords, since hackers can access huge databases that have a lot of hashes with their corresponding “real” passwords.

So instead of the need to take random passwords, hashing them and hoping to find a match, they can no simply look the hashes up — and if you happened to use a very easy and generic one (such as “Password123), it’s almost guaranteed to be in their databases. These databases are also known as Rainbow Tables — click here to read more about this.

Photo by CMDR Shane

Now you might ask yourself what the big difference between hashing and encryption is?

Well, it turns out that hashing is only meant as a one way function, while encryption serves a two way purpose — it can be reversed, or decrypted, using a specific key.

To sum this first section up, we’ve learned that hashing algorithms are used to create unique hashes, with which you can detect the slightest altering of the data behind it — or find corresponding matches without needing to know what they actually consist of.

Next up we will explore the real badasses of this game, so-called cryptographic hash functions.