What is the difference between hash and salted hash?

0 votes
asked Dec 31, 2024 in Mathematics by ri0kio90 (640 points)
What is the difference between hash and salted hash?

1 Answer

0 votes
answered Jan 1 by VStompsie (2,020 points)
The difference between hash and salted hash is that salted hash is a hash where random strings of characters called a "salt" is added to the data before hashing which makes it significantly harder to crack the original data even if the same input is used many and multiple times.

This greatly enhances security, especially for storage of passwords.

A hash is a one way function which transforms data into a fixed length string.

Hashing is a basic process which generates a unique code which is called "hash" from input data and is used to verify integrity of data.

Salting is the adding of a random string to the data before hashing it and in turn makes it harder to crack.

It prevents attackers from using pre computed rainbow tables to crack the data.

For example if you were to hash the password "password" then you'll get the same hash every time you run the function.

And if you were to add a random salt to password before hashing it then each time you do hash it with a different salt you will get a different hash even if the original password is the same.

107,617 questions

113,812 answers

1,341 comments

7,058,204 users

...