Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989AbaLGKC6 (ORCPT ); Sun, 7 Dec 2014 05:02:58 -0500 Received: from ns.horizon.com ([71.41.210.147]:44343 "HELO ns.horizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752800AbaLGKCy (ORCPT ); Sun, 7 Dec 2014 05:02:54 -0500 Date: 7 Dec 2014 05:02:52 -0500 Message-ID: <20141207100252.6707.qmail@ns.horizon.com> From: "George Spelvin" To: herbert@gondor.apana.org.au, linux@horizon.com Subject: Re: Where exactly will arch_fast_hash be used Cc: dborkman@redhat.com, hannes@stressinduktion.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, tgraf@suug.ch In-Reply-To: <20141207092828.GA8623@gondor.apana.org.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > For a start why don't you print out the hashes of 1-255 and then > find out how easy it is to deduce the last bit of the hash result. They're available in lib/crc32table.h, as crc32ctable_le[0]. As a CRC is a linear function, every bit is the XOR of some selected bits of the input, i.e. the parity of the input and some bit-specific mask sequence. Furthermore, CRCs are cyclic, so the mask sequences for adjacent bits are shifts of each other. The lsbit of the CRC32c of x is the parity of x & 0x1f. This is because the LFSR sequence generated by the polynomial starts 0001111110010001110010101111011000111000011011110010110000100101... The first bit corresponds to the msbit of the last byte. How does this implicate the low bits specifically? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/