| ▲ | tptacek 4 hours ago | |||||||||||||
Because length extension attacks only matter if you're doing something you should never be doing: hand-rolling your own keyed hash constructions. Everybody uses HMAC (you even see it in SHA3 systems), and so length extension doesn't matter. Meanwhile, SHA2 has hardware support. I like BLAKE3 just fine. Nobody's really going to ding you for using it (or SHA3 for that matter). But it would not be sound practice to tear SHA2 out of a system that was already using it. Two other notes: (1) The article explicitly recommends HMAC-SHA2, not SHA2 by itself. (2) Where it does recommend SHA2 directly (for hashing, not authentication), it recommends 512/256, which is truncated and can't be length-extended. | ||||||||||||||
| ▲ | djohnmustard 3 hours ago | parent [-] | |||||||||||||
I think the original comment still stands though right? You can hand roll a keyed hash if you use sha3 or a truncated sha2. It saves you having to do two hash operations | ||||||||||||||
| ||||||||||||||