5

My question is simple: encryption hides information to the point where only the people intended to see the information can actually see it. You can encrypt information and then decrypt it. Why is hashing is considered encryption if it cannot be decrypted?

I say hashing is considered encryption because you call MD5 a cryptographic hash function.

gunr2171
  • 16,104
  • 25
  • 61
  • 88
BrunoMCBraga
  • 652
  • 2
  • 7
  • 23
  • 1
    Encryption (in the sense you seem to use the term) is not only used to hide information but also to identify the provider (sender) of information (message.) Hashing is more related to this aspect. It can be used to make an equivalents of signatures. You can verify a signature by comparing to the original but you can't easily make another's person signature. – ypercubeᵀᴹ Nov 08 '13 at 23:12
  • 4
    Just because something is "cryptographic" doesn't mean it is "encryption". They are different words with different meanings. – Thomas M. DuBuisson Nov 09 '13 at 01:34
  • 4
    It isn't 'considered encryption'. It's considered 'cryptographic hashing', which means it has useful properties in the domain of cryptography, which extends beyond encryption. – user207421 Nov 09 '13 at 02:03
  • 3
    This question appears to be off-topic because it is about cryptography, without a specific programming question. – Maarten Bodewes Nov 09 '13 at 14:18

6 Answers6

6

Correct, Hashing is a one way function, but Hashing isn't considered Encryption. A good explanation of the difference Hashing vs Encryption and Fundamental difference between Hashing and Encryption algorithms.

Community
  • 1
  • 1
frogmanx
  • 2,620
  • 1
  • 18
  • 20
  • You could say that hashing is not encryption *because* it is a one way function. Encryption is not very useful without decryption. You can of course create a cipher (PRP) out of a hash (PRF), but that does not change the fact that they are different. – Maarten Bodewes Nov 09 '13 at 14:22
3

Cryptography is broad field of study which covers both encryption and secure hashing. It also encompasses a variety of other topics, including secret sharing, public-key systems, and random number generation. One might summarize it broadly as the science of working with secrets.

Hashing is not considered a form of encryption. There are some relationships between certain algorithms used for hashing and encryption, but the two are not interchangeable.

1

It is all about the purpose. Hashing is not about 'find out what the original message is' but about an unique sequence of bits, in other words unique id, that identifies the original message.

Even very small changes in the source message would drastically change the resulting output bit sequence, by the so-called avalanche effect.

Alfred Xiao
  • 1,758
  • 15
  • 16
1

En and De prefix many English word pairs, such as en code and de code. Or en able and dis able. En generally means 'put into', and De generally means 'remove'

en cryption is the act of applying cryptography. de cryption is the act of removing cryptography.

To en crypt infers that de crypting must be possible.

With hashes ('one way cryptography') this is not possible. So to say you en crypt a hash makes no sense, as it cannot be de crypted.

PaulG
  • 13,871
  • 9
  • 56
  • 78
0

Cryptography is called as "The Art of Secret Writing" includes Encryption and Decryption in which Encryption means conversion for Plain Text into Cipher Text and Decryption means Conversion of Cipher Text to Plain Text. It is a two-way process since the encrypted message can be decrypted and viewed by the authorized person or the intended person. So only Cryptography is used for Secure Communication.

But in Hashing, it is a one-way mechanism. Here the converted value is called as the Message Digest like Cipher in Cryptography.Hashing mechanism converts the data into Hash Value (or) Message Digest by using Hashing Algorithms like SHA(Secure Hash Algorithm), MD5(Message Digest v5) etc. In this the data converted into Hash Value can't be converted back as it's the main purpose is to Validate and enhance the Security. For example:-All your passwords for your Online Accounts are stored in the form of Hash since even it is hacked it can't be viewed. Every time when you enter your password it is converted into a hash value and it is checked with the existing hash value of your password.

Vijay S
  • 282
  • 2
  • 7
  • 15
Arun J
  • 687
  • 4
  • 14
  • 27
-1

Hashes can be decrypted given enough time and computing power, that's why we have to change to better and better standards. Now this is probably done through brute force which is mathematically inelegant, but the point remains that they can be decrypted.

While there are differences in the usage of the words as pointed to above, we shouldn't be so arrogant as to think that hashes can't be decrypted (made unsecret), they just usually aren't used for that purpose. They are still encrypted text.

Jesse Shea
  • 13
  • 5
  • This is not correct, a hash cannot be decrypted no matter how much time passes. One can trial and error various data to see what was originally used to create the hash, but this is still not a decryption. With decryption one could get the original data from the hash without having the original data. The reason something like bitcoin keys can be cracked given enough time is because there is a list of all potential words used to generate the hash that one could trial and error from. Still one could never take the hash and get the words without having the words first. – Bruce Apr 05 '23 at 13:50
  • I apologize my wording was bad. I meant that it could be found out through brute force of trying all combinations and then doing the reverse lookup. There could be multiple things that hash to the same result but the whole reason we have to move to more complex hashing algorithms is because they are reversible with enough time and computing power. – Jesse Shea Apr 06 '23 at 14:15