summaryrefslogtreecommitdiff
path: root/crc24q.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2008-07-10 13:13:02 +0000
committerEric S. Raymond <esr@thyrsus.com>2008-07-10 13:13:02 +0000
commit869f45fca7de14017bd4c47ba8664081e2493528 (patch)
tree00e6d9a65bf29ced287ecc1b7a9dda53b1498b6f /crc24q.c
parent588464026d2f9da393fc8233a18b88b5c050e8cb (diff)
downloadgpsd-869f45fca7de14017bd4c47ba8664081e2493528.tar.gz
Reference for people who want to understand CRC algorithms better.
Diffstat (limited to 'crc24q.c')
-rw-r--r--crc24q.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crc24q.c b/crc24q.c
index 73e43d90..015cd71b 100644
--- a/crc24q.c
+++ b/crc24q.c
@@ -5,7 +5,9 @@
*
* x^24+ x^23+ x^18+ x^17+ x^14+ x^11+ x^10+ x^7+ x^6+ x^5+ x^4+ x^3+ x+1
*
- * This corresponds to a mask of 0x1864CFB.
+ * This corresponds to a mask of 0x1864CFB. For a primer on CRC theory,
+ * including detailed discussion of how and why the error polynomial is
+ * expressed by this mask, see <http://www.ross.net/crc/>.
*
* 1) It detects all single bit errors per 24-bit code word.
* 2) It detects all double bit error combinations in a code word.
@@ -15,6 +17,9 @@
* 5) It detects most large error bursts with length greater than 24 bits;
* the odds of a false positive are at most 2^-23.
*
+ * This hash should not be considered cryptographically secure, but it
+ * is extremely good at detecting noise errors.
+ *
* Note that this version has a seed of 0 wired in. The RTCM104V3 standard
* requires this.
*