3 ms·
Similarly: BLAKE2s (32-bit words) - 554 MiB/s BLAKE2b (64-bit words) - 890 MiB/s (source: https://blake2.net/ https://blake2.net/) The difference is
by dchest 10y ago
Similarly:
BLAKE2s (32-bit words) - 554 MiB/s
BLAKE2b (64-bit words) - 890 MiB/s
(source: https://blake2.net/ https://blake2.net/)
The difference is also clear in pure JavaScript implementations — JS doesn't have native 64-bit integer operations yet, so SHA-512 is slower there:
SHA-256 - 103.17 MiB/s
SHA-512 - 34.29 MiB/s
Note that since SHA-512 eats 128-byte blocks, while SHA-256 64-byte blocks, hashing very short strings may be faster with SHA-256 even on 64-bit platforms (the same applies to BLAKE2).
- shakna 10y ago> in pure JavaScript implementations Is not JS cryptography a bad idea?
- angry_octet 10y agoNo JS per se. In browser client side crypto though...
- gcp 10y agoHarder to defend against timing attacks in JS, which are exactly some of the strongest attacks against modern cryptosystems.
- angry_octet 10y agoDo you mean because of the lack of low level control/bit manipulation, vs C/asm, or something else? I would have guessed it was about the same as any interpreted/jitted higher level language (python/php/c#/java).