Fast Perfect Hashing

Fast Perfect Hashing

Making the AES algorithm produce a perfect hash of, for example, a 32-bit key in its lowest 32 bits requires understanding the internals of the AES algorithm. For the purposes of perfect hashing, the objective is to mix every byte in the key with every byte in the part of the AES block that holds the hash. All of the following algorithms put a perfect key-sized hash in the first bytes of a 128-bit AES block.

Source: www.jandrewrogers.com