1

I am going through previous exams for Information Security.

I am looking at Salting with regards to Password encryption. My question is this - If SHA 256 is a one way encryption, how can it be decrypted?

I am just thinking that when messages are sent via email, they are encrypted and decrypted so that the message or files can be accessed.

How does SHA 256 work? How can you see your message or files if the encryption cannot be decrypted? Or does it just protect the password itself?

I am currently researching this (at university) and would appreciate any assistance. Please forgive any silly errors in my question as I am still attempting to learn about this subject.

Thanks.

PrimalScientist
  • 831
  • 5
  • 17
  • 27
  • 1
    Besides being duplicate of http://stackoverflow.com/questions/9316437/how-to-decrypt-sha-256-encrypted-string?lq=1, this question was asked about [md-5](http://stackoverflow.com/questions/1240852/is-it-possible-to-decrypt-md5-hashes), and also [this](http://stackoverflow.com/questions/326699/difference-between-hashing-a-password-and-encrypting-it) and [this](http://stackoverflow.com/questions/4948322/fundamental-difference-between-hashing-and-encryption-algorithms) provide good additional references. – Oleg Estekhin Jun 04 '14 at 19:37
  • Great links there, many thanks. – PrimalScientist Jun 04 '14 at 20:03

2 Answers2

5

SHA-256 is not encryption, it's hashing.

You can't decrypt it, that's the whole point with it. You use it by hashing other data and comparing the hash codes to determine if the data is identical to the original.

Hashing is used for passwords. By storing the hash of a password it can't be used to find out the password, but it can be used to determine if an entered password is correct.

Hashing is also used to determine the integrity of data files. When data is transfered there might be accidental changes, by comparing a hash of the original data with the hash of the transfered data you can determine if the data is intact.

Guffa
  • 687,336
  • 108
  • 737
  • 1,005
3

SHA-256 ist not encryption, ergo it cannot be decrypted. It's a hash function, and by definition hashes cannot be reversed.

Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653