Data Hashing. Encryption. These are words that one hears all the time about the topic of security. Sometimes, they are used interchangeably when they are different things despite both being critical to security.
In this blog post, we will explain both and also explain how they can be used in conjunction to achieve a higher level of security.
What is hashing?
Hashing is using a special cryptographic function to transform one set of data into another of fixed length by using a mathematical process. The process involves mapping data of any size to a fixed length using a hash table and then storing the output data in the digest. In the context of security, it is virtually impossible to reconstruct the input data from the output, even if the hash function is known. With passwords, anytime you create an account that requires a password, the password is run through a hash function and then stored in the digest. On the next login attempt, the password that is input will run through the hash again and the digest will be compared to the previous one to verify an exact match.
It’s worth mentioning that even if someone were to compromise the database, they would not be able to do anything immediately with the passwords, as there is no simple method to find the password that produced the hash that they now possess. They are also useful for comparing the contents of two files or a collection of files without comparing the entire files.
What is Encryption?
Encryption encodes data so that only the authorized party can read it by possessing the correct key, which will decrypt the data into a readable message. The major difference between hashing and encryption is that encrypted data can be made readable again whereas hashed data cannot.
Why Use Both Data Hashing and Encryption?
By using a combination of both encryption and hashing, a site’s security can be dramatically increased. For example, using HTTPS, which is encrypted, will ensure that a password sent over the internet is not read by someone watching the connection and using a hash to store the password in the database will ensure any break-ins will not present further compromises(due to password reuse, etc).
These are only a few ways to enhance your security with hashing and encryption. At SandStorm IT, we utilize these methods and more in developing high-quality and secure websites and web applications for our clients. Please give us a call for more information at 901-475-0275.