-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Switch from SHA-1 to MD4 or something else cheap #859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is fine, but we're also using a very inefficient sha-1 implementation. I'm sure it's profile would drop considerably if we used git's. |
I like that our SHA-1 implementation is written in Rust. Is the fact that it's slow because we wrote it in Rust, or because we wrote it in Rust using an inefficient algorithm? |
It's probably both. The Rust version is based on the reference implementation, which is not fast. Trying to optimize it could be a good experiment, but git's version uses a lot of tricks. I don't really like the idea of using a C implementation of SHA-1 either and I don't have any opposition to using MD4. |
I tried this today, and the performance gain was minimal. The MD4 hasher is in |
If you're willing to drop strong cryptographic properties (which may well be fine in the context we're using this) then just switch to a modern non-CHF like spooky, murmur or city. Actually, might as well just put all 3 of those in our library: they're useful and one or another ought to be our default hash. http://code.google.com/p/smhasher/ All of them are much faster than md4. |
There's a Rust implementation of murmur here |
I haven't heard of sha1 being high in our profiles lately though, so it may not be as big of a concern as it once was. |
sha1 is still around 1% of profiles |
We have to switch the remaining sha1 code to use sip in order for this bug to be resolved. |
Closed by 1854a73 |
Use IFF_OACTIVE and IFF_RUNNING even on FreeBSD. Deprecate the DRV ones. According to @asomers, libc should propagate the use of the portable constants `IFF_OACTIVE` and `IFF_RUNNING` for user-space applications, instead of `IFF_DRV_OACTIVE` and `IFF_DRV_RUNNING`. It least that's my understanding of [his comment](nix-rust/nix#667 (comment)) in nix-rust/nix#667.
* Add custom anonymous type for tape * Fix cast
SHA-1 is high in the profiles (4.8%). We don't need the strong cryptographic properties AFAICT.
The text was updated successfully, but these errors were encountered: