summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2019-07-09 08:55:13 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2021-02-03 12:41:32 +0100
commit3f3cbc1c75dc9a5ded272360df3e4b88eff5a171 (patch)
treee8e37400b0740fd53de07680275e58273d5a1c08
parent7606b9f39a2c7701a30d06a786fb2a99334b1feb (diff)
downloadProject-Tick-3f3cbc1c75dc9a5ded272360df3e4b88eff5a171.tar.gz
Project-Tick-3f3cbc1c75dc9a5ded272360df3e4b88eff5a171.zip
Fix error in comment on the polynomial representation of a byte.
-rw-r--r--tools/makecrct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/makecrct.c b/tools/makecrct.c
index 323d0c03dd..3f6b37b13d 100644
--- a/tools/makecrct.c
+++ b/tools/makecrct.c
@@ -37,7 +37,7 @@ static void gf2_matrix_square(uint32_t *square, const uint32_t *mat) {
is just exclusive-or, and multiplying a polynomial by x is a right shift by
one. If we call the above polynomial p, and represent a byte as the
polynomial q, also with the lowest power in the most significant bit (so the
- byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
+ byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p,
where a mod b means the remainder after dividing a by b.
This calculation is done using the shift-register method of multiplying and