From imb@asstdc.scgt.oz.au · 1996-04-06 03:51 · #73083 in FREE25
In reply to what is a serial number? by jim barchuk
From: imb@asstdc.scgt.oz.au (michael butler)
: Yep folks, it looks like yet another non-professional programmer has
: made the assumption that a CRC-32 is sufficient as a name hashing
: function. But I guess you're in good company-- there are lots of people
: who don't understand the mathematics of CRC's, and many who misapply CRC
: values-- as JAM does.
Indeed ..
It doesn't take a degree in rocket science, only a little bit of exploratory
(almost trivial) mathematics to see why CRCs (of any scale) are a *bad*
choice as an indicator of singularity if you intend to use them by
themselves.
They were designed only as a _signature_, something to be sent along with
the data itself for comparison with that data at the point of reception. If
there was a match between the data and signature, the probability of an
error in the data is relatively small, given suitable a choice of the size
of the data frame for the number of bits in the signature, but still *not*
zero.
Whilst I don't mean to go on about this .. it should be patently obvious
that any amount of folding, adding, multipying modulo-n or rotating into a
miniscule number of bits will not produce anything at all which uniquely
identifies something much larger. There will always be other, quite
different data frames which have the very same CRC.
Limiting the allowable bit-diversity of the input stream by deliberately
removing case-sensitivity, that is - folding otherwise distinct data into
the same numeric domain, the probability of an unwanted collision is much
"improved" and quite contrary to the intentions of any well-meaning but
entirely misguided programmer :-(
michael
--- ifmail v.2.8a/p4
* Origin: Assorted C Software (3:712/400@fidonet)