3 ms·
I guess David or Niels thought that 60 character hashes were a more manageable length. That's a pretty weird design decision to use a 128 bit salt and then cho
by marshray 15y ago
I guess David or Niels thought that 60 character hashes were a more manageable length.
That's a pretty weird design decision to use a 128 bit salt and then chop bits off the actual hash value to make the result a "more manageable" length.
The 128 bit salt wastes 4 bits in the base64 encoding. The 31 character base64 discards 8 of the 192 bit output bits (31/4*24 = 186).
If they'd just used "only" a 126 bit salt they could base64 encode it in 21 chars with no wasted space. That would allow them to store the full 192 bits in 32 chars with no wasted space.
So they threw away 8 hash output bits in order to save 2 salt bits.