As we can see on this page, BLAKE-3 is about 14 times faster than SHA-256. Is it as safe as SHA-256? I would like to use it for my passwords which are 32 cryptographically random bytes, because my API uses application-layer encryption which slows down the response anyway, and I don't want to be too vulnerable to DDoS attacks. These passwords can also be 64 bytes. Besides, my API response must be fast (no more than 2 seconds) by itself.
2The performance advantage is for long input, measure it yourself for your short input and you might be surprised at the results. For your short high entropy input, any cryptographic hash function would do, so SHA-2, SHA-3, Blake-2, Blake-3, etc.– Z.T.Oct 9, 2022 at 14:58
Is it as safe as SHA-256?
BLAKE-3 is a cryptographic hash function. It is sufficiently secure for your purpose. Even MD5 would likely already be sufficient in your use case, where the input to the hash are 256 bit or 512 bit random data and you want basically be resistant to a preimage attack, i.e. prevent finding an input for a specific hash.
Apart from that this looks like a micro-optimization, which unlikely achieves a relevant performance advantage in a typical application.