Amazon Interview Question: difference between "hashing a... | Glassdoor

Interview Question

Software Development Engineer Interview Dublin, Co. Dublin (Ireland)

difference between "hashing a string" and "encrypting a

  string". Then: is it possible to find two elements for which the hash is the same?
Tags:
cryptography
Answer

Interview Answer

3 Answers

0

you can't "go back" from a hash. You can go back from encription if you know the secret (say password, private key, whatever).
Second question: yes but then you have a problem.

Interview Candidate on Feb 23, 2011
2

1. Encryption uses a secret key while hashing does not require any key.
Moreover, hash is one-way but encryption can be reversed by a decryption operation.

2. Yes, that's called hash collision, which although a low probability occurrence, does exist.

Neha on Apr 5, 2012
0

Decryption of encrypted string is possible. But we cannot say same thing for hashing. Because hash is one way operation. Q2:Low probability, it is possible using brute force

Anonymous on Apr 9, 2019

Add Answers or Comments

To comment on this, Sign In or Sign Up.