by kijin · 10y ago · 0 comments
bcrypt is known to choke on null bytes. Each SHA512 hash has a 25% chance of containing a null byte if you use the raw binary format.
Using hex or base64, of course, decreases the amount of entropy that you can fit into bcrypt's 72-byte limit. But you can still fit 288 to 432 bits of entropy in that space, which is more than enough for the foreseeable future.
Use the time saved by not doing base 255 conversion to increase your iteration count.
> For ease of elucidation, in the figure and below we omit any mention of binary encoding (base64).