Riding the Flow

musings from the shire

CityHash64 and Finding Collision Samples for it

200px-Hash_table_4_1_1_0_0_1_0_LL.svg[1]CityHash is a modern family of hash functions for strings (variable-length arrays) that provides one of the best performance and quality, requiring only standard 64-bit instructions for optimal performance.
This makes it very useful "general-purpose" hash. In particular, CityHash64 hashes to 64-bit value, which makes it primary function of choice on 64-bit platform.
For some tests (e.g. containers), it's beneficial to know which pairs of strings will produce same hash value (collision). Finding collisions for well-designed hash function could be difficult - since brute force most likely will be most viable approach.
I've recently have calculated some collisions for CityHash64 using multi-threaded birthday attack algorithm. So I provide two such pairs there for your convenience:

  • StrA="oH]pPZccPmOEHjBW" StrB="vm`sd|obCXIKJ}aE" CityHash64=DCBE2B1930540000
  • StrA="?];lLLK:R_@XddTg" StrB="bgW^Wi]IkQgDM3WW" CityHash64=9E75C019D3D94BB7


Post a comment