6 ms·
SHA-3 does seem to have relatively little to offer by way of incentives to switch. "Just as good" isn't motivation, and any notions of higher cryptographic str
by JoshTriplett 9y ago
SHA-3 does seem to have relatively little to offer by way of incentives to switch. "Just as good" isn't motivation, and any notions of higher cryptographic strength haven't been extensively discussed. "Easier to implement in hardware" will be more compelling when such hardware exists.
I'm curious about the statement that SHA-3 is slow; it links to https://www.imperialviolet.org/2016/05/16/agility.html https://www.imperialviolet.org/2016/05/16/agility.html , which doesn't seem related, and matches the previous link. I wonder if that was supposed to link to somewhere else, like http://bench.cr.yp.to/results-sha3.html http://bench.cr.yp.to/results-sha3.html (as linked from https://www.imperialviolet.org/2012/10/21/nist.html https://www.imperialviolet.org/2012/10/21/nist.html )?
From that, SHA-3 certainly doesn't run significantly faster than alternatives (variants of BLAKE do indeed outperform it), but it seems roughly on par with SHA-256/SHA-512. But "on par" doesn't give any incentive to switch.
I wonder how much relative attention the SHA-3 winner (Keccak) gets compared to other alternatives, like BLAKE?
- agl 9y agoGah, thank you. I did, indeed, mean to link to bench.cr.yp.to. Fixed. (The BLAKE2 page (https://blake2.net/ https://blake2.net/) has a graph too.)
- dom0 9y ago> "Easier to implement in hardware" will be more compelling when such hardware exists. Most things are software; from previous experience we know that it basically takes 10 to 15 years between introduction of a primitive (AES and SHA-2 both standardised around 2000; ISA extensions for mainstream CPUs introduced in 2010-2017). From the software PoV SHA-3 would be a rather large regression in performance with a "maybe it's fast by 2030 if Intel is really nice" attached. BLAKE2 on the other hand is an improvement in performance and offers a function that is more modern overall. (E.g. not length-extensible thus low-overhead keyed hash usage, flexible output sizes, tree hashing built-in)
- mtgx 9y agoYes, perhaps before they choose the next "faster in hardware" crypto algorithm, they also get a commitment from the major chip makers (Intel, AMD, Qualcomm, MediaTek, etc) that they will implement them within let's say 2 years after the contest is over. Otherwise it's just hope that the chip makers will implement it when the algorithms are chosen, and I'm not sure that's good enough after a carefully orchestrated 5-year process of choosing a next-generation algorithm. If they can't get that commitment, then they should choose whatever is faster in software (granted all the other factors are more or less equal).
- jasode 9y ago>I'm curious about the statement that SHA-3 is slow; [...] I wonder how much relative attention the SHA-3 winner (Keccak) gets compared to other alternatives, like BLAKE? Coincidentally, I ran a bunch of hash performance benchmarks last week. These were my findings: test: hash a 500MB block of memory. hardware: Intel Core i7-5820K Haswell-E 6-Core 3.3GHz compiler: MSVC2017 (19.10.25019), 32-bit exe: blake2sp - official reference code[1] 153MB/sec SHA3 - Keccak official reference code[2] 12MB/sec SHA3 - rhash sha3[3] 45MB/sec SHA3 - Crypto++ library v5.6.5[4] 57MB/sec SHA256 - Crypto++ 181MB/sec SHA256 - MS Crypto API[5] 113MB/sec SHA1 - MS Crypto API 338MB/sec MD5 - Crypto++ 345MB/sec CRC32 - Crypto++ 323MB/sec The conclusion is that the fastest SHA3 implementation (Crypto++ lib with its assembly language optimizations) is more than 2x-3x slower than SHA256. I can't speak for SHA3 implemented in FPGA/ASIC but as far as C++ compilation targeting x86, it's slow. I've been meaning to try the Intel Compiler to see if it yields different results but haven't gotten around to it yet. Blake2sp is fast. The official reference code is not quite as fast as Crypto++ implementation of SHA256 but it's faster than Microsoft's Crypto API of SHA256. (There are several variants of BLAKE and I chose blake2sp because that's the algorithm WinRAR uses. I think the specific variant of BLAKE that directly competed with Keccack for NIST standardization is slower.) [1] https://github.com/BLAKE2/BLAKE2 https://github.com/BLAKE2/BLAKE2 [2] http://keccak.noekeon.org/files.html http://keccak.noekeon.org/files.html [3] https://github.com/rhash/RHash/blob/master/librhash/sha3.c https://github.com/rhash/RHash/blob/master/librhash/sha3.c [4] https://www.cryptopp.com/ https://www.cryptopp.com/ [5] https://msdn.microsoft.com/en-us/library/ms867086.aspx https://msdn.microsoft.com/en-us/library/ms867086.aspx
- briansmith 9y agoI guess 32-bit x86 performance is maybe not the best benchmark. I think people aren't optimizing for that ISA to the same extent as they are optimizing for x86-64, 64-bit ARMv8, or 32-bit ARM. If you care about performance and you don't have dedicated SHA-256 instructions then on a 64-bit platform you should evaluate SHA-512 as it is much faster. If you only have 256 bits of storage available then truncate its output to 256 bits. IIRC, it's about 1GB/sec on my Haswell laptop.
- pshc 9y agoI recently came to believe (correct me if I'm wrong) that the recommended XOFs SHAKE128 and SHAKE256 are actually nice and fast, but often when people talk about SHA-3 they focus on the slower "drop-in replacements" like SHA3-256 which are quite conservative.
- baby 9y agoYes SHAKE is faster than SHA-3 because of "better" parameter choices.
- baby 9y agoDaemen talked about some figures for KangarooTwelve during RWC 2017: * Intel Core i5-4570 (Haswell) 4.15 c/b for short input and 1.44 c/b for long input * Intel Core i5-6500 (Skylake) 3.72 c/b for short input and 1.22 c/b for long input * Intel Xeon Phi 7250 (Knights Landing) 4.56 c/b for short input and 0.74 c/b for long input https://youtu.be/F_nAGS9L97c?t=2451 https://youtu.be/F_nAGS9L97c?t=2451
- npscalar 9y agoThis page has an interesting speed graph: http://kangarootwelve.org/ http://kangarootwelve.org/