move hammingDistances to Crypto.Common