4 ms·
>extrapolating to 50kB gives me 0.3625 seconds It should give you much more than that, considering that the green (SHA256) graph hits almost 0.1s at just 1000
by eMSF 6y ago
>extrapolating to 50kB gives me 0.3625 seconds
It should give you much more than that, considering that the green (SHA256) graph hits almost 0.1s at just 1000 bytes of input.
>either crypt() is doing much more than I tought (is salting _that_ expensive?)
glibc crypt() is probably doing more than you thought, but it's not salting: in SHA256 mode, various combinations of the key and intermediate hash digests are repeatedly hashed in a certain pattern for 5000 times, although the number of rounds can be changed just like the hashing algorithm. (This is a glibc implementation detail; not all crypt() implementations support extensions like SHA256 mode.)
In general, all general purpose cryptographic hash functions are reasonably fast.
- franga2000 6y agoYou're right, it looks like I somehow read the number on the bottom axis wrong three times in a row (though it was 20 000). Thanks for the info on what crypt() actually does. I definitely need to look into that some more...