From 3f3cbc1c75dc9a5ded272360df3e4b88eff5a171 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Tue, 9 Jul 2019 08:55:13 -0700 Subject: [PATCH] Fix error in comment on the polynomial representation of a byte. --- tools/makecrct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/makecrct.c b/tools/makecrct.c index 323d0c03..3f6b37b1 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 -- 2.47.3