I suggest that the user should have the ability to chose the hash
algorithm to be employed among a repertoire of some available hash
algorithms or maybe an implementation of Hasher that the user decides to
create.

This would be highly desirable when maximum performance / minimum
latency is needed, whilst DOS is not a concern.

Maybe something like:

    #[deriving(Hash(SimpleHasher))]

Would it be possible to plug my implementation of (hypothetical)
SimpleHash into the deriving attribute more or less showed above?

Thanks

Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
sip:[email protected]

On 26/02/14 23:30, Tony Arcieri wrote:
> Rust is using SipHash for std::hash (I believe?). This is a great
> conservative choice that mitigates hashDoS.
>
> However, it'd be nice if there were a faster option which still
> prevented an attacker from colliding parameters, right? There is! It's
> called universal hashing:
>
> http://en.wikipedia.org/wiki/Universal_hashing
>
> Universal hashing provides families of hash functions that are hard to
> collide, even when the attacker is choosing the parameters at will as
> part of an adaptive attack. The implementation is compact, fast, and
> relies only on some parameters which can be chosen at application
> startup. In the wild universal hashing is used for things like UMAC:
>
> http://en.wikipedia.org/wiki/UMAC
>
> -- 
> Tony Arcieri
>
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to