Re: Fast, stable, portable hash function producing 4-byte or 8-byte values? - Mailing list pgsql-general

From George Neuner
Subject Re: Fast, stable, portable hash function producing 4-byte or 8-byte values?
Date
Msg-id 3kcivehh2al2cjti29r80ifpm2q9ncl51t@4ax.com
Whole thread Raw
In response to Fast, stable, portable hash function producing 4-byte or 8-byte values?  (Erwin Brandstetter <brsaweda@gmail.com>)
List pgsql-general
On Sun, 15 Dec 2019 20:23:25 -0600, Ron <ronljohnsonjr@gmail.com>
wrote:

>On 12/15/19 3:59 PM, George Neuner wrote:
>
>> On long text CRC will not be as discriminating as a real cryptohash,
>
>When specifying a 4 byte hash, something must be sacrificed...

Obviously.  But the main point is that CRC never was designed to
uniquely fingerprint data - it was designed to detect corruption of
the data, which is a much weaker guarantee than the cryptodigest
hashes.

Despite being the same length as an MD5 hash, a 128-bit CRC still
might not be as discriminating ... it depends greatly on the CRC
polynomial used and on the length of the input.

George




pgsql-general by date:

Previous
From: Steven Winfield
Date:
Subject: Row locks, SKIP LOCKED, and transactions
Next
From: Adrian Klaver
Date:
Subject: Re: Row locks, SKIP LOCKED, and transactions