[fpc-pascal] Fast CRC functions?

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Mon Sep 1 11:13:38 CEST 2014


Tony Whyman wrote:

> What has always surprised me is when CRCs are used outside of the
> communications domain. Arithmetic checksums can give similar performance
> with lower computational overhead and the same bit length. CRCs only
> really have the edge with communications because the error pattern is
> typically known for a given communications medium and the CRC can be
> tuned to the media in order to give better performance. Alternatively,
> when you have a more longer term or security need to protect integrity
> then message digests (like SHA-1) are what you should be using.

That is the important point. If looking at a communications channel 
(e.g. a file on disc, after the OS etc. has done its bit to promote 
reliability) where the error distribution is perfectly random then a 
checksum is a better test of correctness than a CRC. But a checksum is 
easily fooled if the channel is malicious, which gave rise to the 
various cryptographic message digest algorithms including SHA-1.

None of which really helps Juha, whose problem boils down to identifying 
which CRC algorithm he's using as the prerequisite to finding out 
whether its performance can be improved.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list