If the server can't access your passwords, how would it authenticate you?
To give a REALLY basic example, let's say the server hashes numeric passwords by taking your password and doubling them.
You set the password 123456789
It gets doubled and saved as 246913578
When you login, you enter 123456789
It gets doubled, and the answer is compared to the saved 246913578
No other input will result in doubling resulting in 246913578, so if the answer is 246913578 it knows you've entered the correct password, knowing what the password is. The password should never be saved, anywhere, as plain text.
The actual hashing process is far more complex so it can't be worked backwards (in other words, there are no functions you can perform on the hash to get the original password), but you get the idea.
Here's a slightly better version, but still nowhere near as complex as the actual hashing process.
We use the function modulo 3847 on that password.
You set the password 123456789
123456789 / 3847 = 32091 with a remainder of
2712; 2712 gets saved
When you login, you enter 123456789
The same function (123456789 mod 3847) gets run, and the answer is compared to the saved 2712
If you enter 123456, the function would return 123456 / 3847 = 32 with a remainder of
352; 352 is not 2712 so login is rejected
What COULD happen is you enter 48876 as the password, and the following happens:
48876 mod 3847 = 48876 / 3847 = 12 with a remainder of
2712 meaning you get authenticated with the incorrect password. This is extremely rare with properly hashed passwords, though. My example only has 3846 possible saved hashes, the actual hashing process results in more possibilities than there are atoms in the Milky Way - by orders of magnitude.
Passwords can also be "salted" so that two identical passwords produce a different hash for different users, but that's getting far more complex than this answer requires.
Definitely a bot / gpt response.
All replies came back as 100% AI generated by Scribbr, ZeroGPT, QuillBot and Copyleaks.