News for hackers. Stuff that matters.
Re:Mathematician warns US spies may be weakening next-gen en... by conradludgate on Friday October 13, 2023 @03:06AM (#37867654)
SHA3 is fine but it's so slow, I don't many people that use it
Re:Mathematician warns US spies may be weakening next-gen en... by xeyownt on Friday October 13, 2023 @03:15AM (#37867724)
Slow? Fastest in HW, and comparable performance in SW. Moreover if you take into account security hardening, SHA3 is easier to protect than alternatives.
Re:Mathematician warns US spies may be weakening next-gen en... by lazide on Friday October 13, 2023 @03:30AM (#37867817)
Faster than Blake2/3? Not even close!
Re:Mathematician warns US spies may be weakening next-gen en... by throw0101c on Friday October 13, 2023 @08:08AM (#37869683)
> Faster than Blake2/3? Not even close!

Blake2 was not created (December 2012) until after the SHA-3 competition, which ended on October 2012 (Keccak being the winner). It was Blake1 that was entered. Blake3 was released in 2020.

I'm sure a Keccak2/3 could have also been better than the original Keccak1, but that was not available either.

Re:Mathematician warns US spies may be weakening next-gen en... by lazide on Friday October 13, 2023 @02:48PM (#37874073)
You never specified timing. You made a blanket statement as if it was still true.
Re:Mathematician warns US spies may be weakening next-gen en... by tux3 on Friday October 13, 2023 @03:53AM (#37867977)
Comparable in software, to what? Password hashes? :)
Re:Mathematician warns US spies may be weakening next-gen en... by formerly_proven on Friday October 13, 2023 @04:50AM (#37868340)
Last I checked SHA3-512 is like 4x slower than SHA2-512 on x86.
Re:Mathematician warns US spies may be weakening next-gen en... by throw0101c on Friday October 13, 2023 @08:10AM (#37869699)
And SHA-1 is faster than SHA-2, with MD5 faster than both. But speed isn't the only reason to choose an algorithm.
Re:Mathematician warns US spies may be weakening next-gen en... by AlexandrB on Friday October 13, 2023 @08:44AM (#37869949)
As a non cryptographer this whole conversation chain has me confused. I though it was desirable for a good hashing algorithm to be slow to make brute force difficult.
Re:Mathematician warns US spies may be weakening next-gen en... by mananaysiempre on Friday October 13, 2023 @09:23AM (#37870308)
(Not a cryptographer either.) Consider two different application areas for a “hash”:

- Message digest: compute a fixed-size summary of a (relatively) large amount of data, for things like content-addressable storage or signing. You want this to be fast. (Nobody is going to brute-force even a 1K chunk of unknown data.) Examples: SHA2, Blake2b, Keccak aka SHA3.

- Key derivation: compute a small chunk of randomy data from a still-quite-small amount of substantially nonrandom data, for things like turning a user-specified password into an encryption key or (with a random salt) something you could store. You want this to be slow, even on a massively parallel machine. (You aren’t going to be processing logins that quickly; on the other hand, everybody’s going to be all over your leaked passwords table with their GPUs.) Examples: PBKDF2, bcrypt, Argon2id.

Re:Mathematician warns US spies may be weakening next-gen en... by Tainnor on Friday October 13, 2023 @09:24AM (#37870319)
That's true for passwords (where you don't really use raw SHA or something, but rather something like bcrypt which is intentionally slow), not necessarily for all uses of passwords. E.g. computing a SHA sum of some binary doesn't need to be slow, it just has to be practically impossible to create a collision (which is what's required of every good cryptographic hash function).
Re:Mathematician warns US spies may be weakening next-gen en... by oconnor663 on Friday October 13, 2023 @08:55PM (#37877159)
Yeah this is a super common point of confusion. You need to worry about slowing down a brute force attacker when you're trying to protect a low-entropy secret, which basically always means user passwords. But when your secrets are big enough, like 128 bits, brute force becomes impossible just by virtue of the size of the search space. So for most cryptographic applications, it's the size of your key (and the fact that your hash or cipher doesn't _leak_ the key) that's protecting you from brute force, not the amount of time a single attempt takes.
Re:Mathematician warns US spies may be weakening next-gen en... by conradludgate on Saturday October 14, 2023 @03:03AM (#37878646)
Yeah SHA3 isn't directly for password hashing. You should use a memory strong PBKDF (password based key derivation function) like Argon2, bcrypt, or scrypt. These functions are all constructions that run the hash many times, so the underlying hash speed is irrelevant

For high entropy inputs, like for a HMAC signature, you want the hash to be fast because its practically impossible to brute force the 256bit input key, and you often apply this to large inputs.

Re:Mathematician warns US spies may be weakening next-gen en... by vlovich123 on Friday October 13, 2023 @10:20AM (#37870934)
SHA-2 is has more reliable HW acceleration from what I’ve seen.

SHA-1 SW according to smhasher is 350mib/s as is MD5, so never use MD5 as SHA-1 is always stronger (sha2 supposedly is 150mib/s). Hw accelerated SHA-1 and SHA-2 are both ~1.5 Gib/s and on x86 HW acceleration is always available.

Blake3 is the most interesting because it’s competitive with SHA2 even without HW acceleration. I wonder how it would fare with HW acceleration.

Re:Mathematician warns US spies may be weakening next-gen en... by throw0101c on Friday October 13, 2023 @12:37PM (#37872493)
> Blake3 is the most interesting […]

Not really. SHA-2 was released in 2001:

* https://en.wikipedia.org/wiki/SHA-2

Blake3 was released 2020. I'm sure if the folks that created SHA-2 did a hash in 2020 they could do something better/faster as well.

Re:Mathematician warns US spies may be weakening next-gen en... by vlovich123 on Friday October 13, 2023 @10:15PM (#37877560)
First, each Blake version was written by a totally different authors AFAICT so while each version is faster, making a faster construction was a totally different team. I don't see why you're putting so much confidence that the original SHA-2 team could come up with a faster hash function.

FWIW, SHA-3 is slower than SHA-2 although of course SHA-3 is a totally different construction from SHA-2 by design.

Re:Mathematician warns US spies may be weakening next-gen en... by edflsafoiewq on Friday October 13, 2023 @03:28AM (#37867800)
SHA3 is mostly a hedge for the risk SHA2 is broken.