restatedev / restate

Restate is the platform for building resilient applications that tolerate all infrastructure faults w/o the need for a PhD.
https://docs.restate.dev
Other
1.43k stars 34 forks source link

Consider replacing xxhash with cryptographic hash function to not leak internal information #722

Open tillrohrmann opened 1 year ago

tillrohrmann commented 1 year ago

We should consider to replace our current hash partitioning algorithm (xxhash) with a cryptographic one in order to not leak internal information and to be not subject to targeted attacks by key/id forging.

igalshilman commented 1 year ago

Using a good hash function like SHA256 truncated to 64 bit, is a common practice, and has the following benefits:

Specifically about distribution:

From a quick servery Murmur is commonly used (Flink, Cassandra) and looking at SMHasher murmur and xxhash (which is currently used) are comparable.