· 3 min read

Is Hash/Digest Not Cryptography?

It is common for people to argue that hashing is not cryptography; they do it so vehemently that they ridicule things like "I encrypted it with MD5." Is it really that wrong to say...

It is common for people to argue that hashing is not cryptography; they do it so vehemently that they ridicule things like “I encrypted it with MD5.” Is it really that wrong to say this?

Have you ever seen an article in English saying something like that? Something like “Hash is not Cryptography”? Now search for “Hash não é Criptografia”. Interesting, isn’t it? It seems to be a Brazilian-only conclusion.

That observation made me raise the hypothesis that translation is to blame. Few people use the Portuguese word “encriptação”, and because of that a lot of translated material renders “encryption” as “cryptography”, with the good intention of making the text easier to read, but it ends up creating this confusion.

In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it. - https://en.wikipedia.org/wiki/Encryption

Encryption is indeed the process of converting a message into something illegible, but in a way that this process can be reversed at the other end in a… decryption. But that is not everything cryptography does. At least not for the last few decades:

Before the modern era, cryptography focused on message confidentiality (i.e., encryption) - conversion of messages from a comprehensible form into an incomprehensible one and back again at the other end […] In recent decades, the field has expanded beyond confidentiality concerns to include techniques for message integrity checking, sender/receiver identity authentication, digital signatures, interactive proofs and secure computation, among others. - https://en.wikipedia.org/wiki/Cryptography#History_of_cryptography_and_cryptanalysis

Cryptography is bigger than all that

Cryptography has evolved beyond confidentiality, and today encryption is “only” one part of it. English-language literature does not make any hierarchical distinction between Hash and Encryption; it is as if they were two siblings, both children of the parent Cryptography, not as if Hash were a distant relative that no one even considers part of the family.

Cryptographic hash functions play a fundamental role in modern cryptography - Handbook of Applied Cryptography

Hash functions are used in many parts of cryptography - Introduction to Modern Cryptography

Hash functions are an important cryptographic primitive and are widely used in

protocols - Understanding Cryptography, A Textbook for Students and Practitioners

All the books cited above (and many more) have entire chapters dedicated to Hash. Because Hash is a form of Cryptography; what Hash is not is a form of Encryption.

Hashing is a common technique used in cryptography to encode information quickly using typical algorithms. - https://en.wikipedia.org/wiki/History_of_cryptography#Hashing

Hash functions used in cryptography have the property that it is easy to calculate the hash, but difficult or impossible to re-generate the original input if only the hash value is known. - https://www.owasp.org/index.php/Guide_to_Cryptography#Hashes

Hash and Encryption are both Cryptography just as Trapezoid and Square are both Quadrilaterals. Good analogy?

The difference between Hash and Encryption is that one is one-way and the other is two-way, respectively “goes only one way” and “goes there and back”. In other words, the idea of Cryptography through Hashing is that it should be impossible to know the original value using only the value generated by the Hash Function. And the idea of Cryptography through Encryption is that it should be possible to decrypt the result back into the original value.

Cryptography is no longer[and has not been for a long time] only about encryption.