You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Our current requirement is to reduce the number of rounds for Blake3 because our requirement is quite special. We may not need such a secure hash algorithm. The simplest way may be to reduce its number of rounds. How can I reduce the number of rounds in the code?
The text was updated successfully, but these errors were encountered:
If you just wanted to see what the hash output would be with a reduced number of rounds, you could remove some rounds from the reference implementation here. But making the same change in the high-performance implementation is a lot of sensitive work, because that number is hardcoded in many different places. There are separate implementation files for AVX-512, AVX2, SSE4.1, SSE2, NEON, and portable code. Most of those are assembly code, which comes in three different flavors (Unix, Windows MSVC, and Windows GNU). For example, to change the number of rounds in just the Unix AVX-512 implementation, you'd need to delete unrolled rounds here and here, and you'd need to change loop bounds in five different places that look like this.
@oconnor663 Thank you very much. I will try to make the modifications you pointed out. But actually, I have a doubt now. I am not familiar with the Rust language. Yesterday, I tried to comment out the code for the reference implementation, and then I recompiled the project. I see that the hash value obtained using b3sum has not changed, why is this? I am certain that I deleted the target folders under Blake3 and b3sum and rerun "cargo build -- release". And perform hash calculations on the same file using the regenerated b3sum.
Hello. Our current requirement is to reduce the number of rounds for Blake3 because our requirement is quite special. We may not need such a secure hash algorithm. The simplest way may be to reduce its number of rounds. How can I reduce the number of rounds in the code?
The text was updated successfully, but these errors were encountered: