Do all Linux distro's use same Cryptographic hash function?
If yes, is it provided with the kernel itself?
EDIT:- I refer to the function mainly used for storing user login passwords.
No & no to your questions.
I'd take a look at the
You can check your pam setup to see whether you're using MD5 or DES:
And you can see in this systems
The codes you'll see in the
On Red Hat distros you can change this using the
No and it's not provided by the kernel.
depending of the version, of the distro and of the unixes you use, you will find different hash encoding algorithm used (I assume you mean to store password mainly).
If you want to sign something with a hash, most Unices, will integrate the binary
Note that a password hash function is a particular type of cryptographic hash function, which is not used for other uses of cryptographic hash functions. A password hash function needs to be slow; usually, we use fast cryptographic hash functions. In fact, technically, a password hash function isn't a hash function but a salted key stretching algorithm, taking two inputs (the password and the salt) whereas a hash function takes a single input (the data). See How to securely hash passwords? for more information about password hashing.
For historical reasons, many unix documents call password hashing “encryption”, but this is not an encryption process (you can't decrypt a hash back into the password). The historical reason is that in the early days of Unix, the password hashing function was built on the DES algorithm, which is primarily used for encryption.
Password hashing is performed by a function in the standard library called