]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix error in comment on the polynomial representation of a byte.
authorMark Adler <madler@alumni.caltech.edu>
Tue, 9 Jul 2019 15:55:13 +0000 (08:55 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 3 Feb 2021 11:41:32 +0000 (12:41 +0100)
tools/makecrct.c

index 323d0c03dd4092dbfc4b4aeb183b8ce66358f093..3f6b37b13dd641d414d2c7b26b5e5908ffea4e03 100644 (file)
@@ -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