Skip to content
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

Is this alive? #16

Open
seniorjoinu opened this issue Sep 2, 2022 · 5 comments
Open

Is this alive? #16

seniorjoinu opened this issue Sep 2, 2022 · 5 comments

Comments

@seniorjoinu
Copy link

I really need such a hashing function in my project.
Is this safe to use? Can I help somehow in order to make it safe?

@benwr
Copy link
Owner

benwr commented Sep 2, 2022

It's alive in the sense that I'm accepting PRs and discussion! As for its safety, I wouldn't use it in a security-critical setting, partly because I'm not an expert in implementing cryptographic primitives, and partly because the hash function itself is fairly new and untested. When I most recently checked (~3 months ago) I couldn't find any published weaknesses in the hash function, but that doesn't mean they don't exist.

@benwr
Copy link
Owner

benwr commented Sep 2, 2022

The biggest things I'm aware of that would increase my confidence in the safety of the library are mentioned in the other issues:

  • Ensuring that as much as possible here is done in constant time. This is a pretty tricky goal in Rust, though there are some crates that try to help.
  • Fuzzing, to make sure we're not going to produce any panics

Even if these were accomplished, though, the hash function this computes is much more likely to have serious unpublished weaknesses than a more-popular one.

I use this crate in a library where I don't need it to withstand adversarial attacks; I just need it to be really good at not producing collisions given ordinary inputs. I think it's suitable for use cases like that.

@benwr
Copy link
Owner

benwr commented Sep 2, 2022

I do think this crate is a better bet than many other hashing libraries that provide the same kind of homomorphism: The ones I'm aware of implement hash functions with known weaknesses.

@seniorjoinu
Copy link
Author

seniorjoinu commented Sep 7, 2022

Thanks for the response. Unfortunately my use-case is strongly security related.
Having such a function would allow to implement a strong cryptographic accumulator with much better properties than the existing ones have.

Could you, please, share some links to other rust libraries like that?
I couldn't find anything as good as yours using the 'homomorphic hash' keyword.

@benwr
Copy link
Owner

benwr commented Sep 7, 2022

The ones I know of are linked in the README, but they're all implementing a known-broken hash function, so I'd recommend against using them even more strongly. How much do you need the specific homomorphism this crate provides? If you can figure out how to make it work given a homomorphism with respect to set union instead, you might try LtHash: https://engineering.fb.com/2019/03/01/security/homomorphic-hashing/

If you really need a hash function with the specific homomorphism properties of this function, as far as I know this crate is your best option (or else I wouldn't have written it). Sorry to disappoint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants