2 min read

Last week, the Molly Rocket team released a high-speed hash function called Meow hash. It is named after the character Meow in the game Meow the Infinite. Meow the Infinite is a fun little game in which a cat runs infinitely and tries to save its life from dogs and other obstacles. The new hash function will be used in the asset pipeline of 1935, a historical fiction game about the criminal underworld of New York City in the 1930s.

Why Meow Hash is developed?

Building game packages demand a faster, non-cryptographic hash for use in change detection and deduplication. Earlier, the Molly Rocket team relied on SHA-1, which was unnecessarily slowing things down. Also, they did not find a well-optimized, large-data hash function to address their game development needs. Currently, most of the hash work seems to focus on small input sizes or on cryptographic quality.

Instead of focusing on the cryptographic quality, this hash function focuses on speed, large datasets, and is collision-free in practice.

How fast and robust it is?

Meow hash hashes 16 bytes per cycle single-threaded. It hashes at a rate of 64 gigabytes per second on a 4.2 GHz machine in the cache. Out of cache, it can hash at whatever speed your main memory bus can provide to a single core since that is usually the limiting factor on modern x64 CPUs. But actually, hashing 16 bytes per cycle is the lower bound for Meow hash. In future, once the VAES debuts, it would be able to hash 64 bytes every cycle in the cache for a clean 4x speedup.

Talking about its robustness, it is extremely robust for its designed purpose. It was able to pass every test in smhasher without any collisions on their large datasets. It produces a full 512 bits of usable hash every time. It also passed smhasher cleanly at every truncation level down to 32 bits, so you can safely truncate a Meow hash value to the size you want to store.

Also, one thing to note here is it is not designed for cryptography, so it is completely insecure.

You can read more about Meow hash on the official website of Molly Rocket. Also, check out its GitHub repository.

Read Next

HashiCorp announces Consul 1.2 to ease Service segmentation with the Connect feature

Django 2.1.2 fixes major security flaw that reveals password hash to “view only” admin users

Say hello to Sequoia: a new Rust based OpenPGP library to secure your apps