The answer to "What is the meaning of the parts of the crypt(3)
function":
As explained more in detail here.
Regarding the new yescrypt
"passphrase hashing scheme", the meaning of the second field can be understood by reading this, and if you want even more information, you can also read the yescrypt v2 specification.
I did some more research, and it seems that the hashing is happening in the function yescrypt_r. You can see the different parameters definitions in the code.
In the case the id
is 7
, N
is set to 2^x
where x
is the number in the first digit of param
, and then r and p are both parsed using the function decode64_uint32_fixed
from the rest of the param
field.
In all other cases (i.e. only when id
is y
, since the function checks the value of id
and returns if it isn't 7
or y
), the source conditionally sets various different parameters, with a block of code written in such a way that I feel trying to understand it would go against the wishes of the original author. So I leave it as an exercise for the reader.
In that same file, The function yescrypt that follows it exposes a simpler interface, similar to the one of crypt(3)
.
param
part, or whyj9T
is used there and why and what it means.yescrypt
format and includes each of the fields.