News for hackers. Stuff that matters.
Re:Why modern software is slow by generichuman on Saturday October 01, 2022 @09:40AM (#33046519)
> dictionary hashing is too slow to be ideal

Even when you use SIMD intrinsics?

For example: https://en.wikipedia.org/wiki/Intel_SHA_extensions

A repo I just found illustrating those instructions' usage: https://github.com/noloader/SHA-Intrinsics

Re:Why modern software is slow by JacobiX on Monday October 03, 2022 @07:23AM (#33065977)
Not the OP, but those extensions implements cryptographic hash functions, they are not very suitable (too slow) for hash-tables and other hash based data structures.
Re:Why modern software is slow by generichuman on Monday October 03, 2022 @08:04AM (#33066290)
4 CPU cycles is too slow? Because SHA256RNDS2 is 4 clock cycles on Zen3 CPUs. 6 clock cycles on Intel Alder Lake (12th gen).

Source is the measurements here: https://uops.info/table.html

Re:Why modern software is slow by JacobiX on Tuesday October 04, 2022 @04:49AM (#33077890)
Yes, because SHA256RNDS2 aid the implementation of the update function of SHA256. We should invoke it multiple times on the message blocks, it performs two rounds out of the 64 SHA256 rounds.
Re:Why modern software is slow by generichuman on Tuesday October 04, 2022 @06:24AM (#33078434)
> We should invoke it multiple times

That'd make SHA256RNDS2 even faster because of the throughput numbers.

I'm curious, what's the faster algorithm for hashing you use? I don't want to waste time on intrinsics and inflict complexity on my colleagues if there are alternatives I can use!

Re:Why modern software is slow by JacobiX on Tuesday October 04, 2022 @12:13PM (#33082511)
I’ll just use xxHash family, murmur hash family or even FNV. For crypto, BLAKE2 is a cryptographic hash that’s faster than SHA,MD5, etc and is at least as secure as the SHA-3.