How does Linux know if a new password is a "wrapped" version of an old password? (or, the process of creating a new password) know "certain" parts of one's password?
Let's say I have the password
abcEFGH123321 and I set a new password to be:
acbdEFGH123321 (added a
new password is a wrapped version of the/an old password
..is that the whatever application handling the setting & reading new & old account / sudo passwords maybe hashes X amount of the first bits of the entered password,
Say the password
abcd is set,
passwd (e.g) and, you change it (the password)
abdc (swapping the last 2 characters).
Does it maybe take the old password:
abcd and hash the first 3 characters of it?
H₁ -> H('a') -> stores it H₂ -> H('b') -> stores it and so on, for - x times. (in this case, maybe x is a hard-coded constant , 3 for example)
If it stores this:
Where does it?
Where does it store the "parts"? Note I am not asking in general - if it knows this - But rather how it does it. An explanation answer- with references would be great!