X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/3a65506d4df316377c9b838ef5954b5d856215ee..110c1845e5ec7e842a545b0cd0f640be70d01d55:/rijndael-mktab.c diff --git a/rijndael-mktab.c b/rijndael-mktab.c index f5df965..b07207b 100644 --- a/rijndael-mktab.c +++ b/rijndael-mktab.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: rijndael-mktab.c,v 1.1 2000/06/17 11:56:07 mdw Exp $ + * $Id: rijndael-mktab.c,v 1.2 2000/06/18 23:12:15 mdw Exp $ * * Build precomputed tables for the Rijndael block cipher * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: rijndael-mktab.c,v $ + * Revision 1.2 2000/06/18 23:12:15 mdw + * Change typesetting of Galois Field names. + * * Revision 1.1 2000/06/17 11:56:07 mdw * New cipher. * @@ -54,7 +57,7 @@ static octet rc[32]; /* --- @mul@ --- * * - * Arguments: @unsigned x, y@ = polynomials over %$\mathrm{GF}(2^8)$% + * Arguments: @unsigned x, y@ = polynomials over %$\gf{2^8}$% * @unsigned m@ = modulus * * Returns: The product of two polynomials. @@ -83,10 +86,10 @@ static unsigned mul(unsigned x, unsigned y, unsigned m) * * Build the S-box. * - * This is built from multiplicative inversion in the group - * %$\mathrm{GF}(2^8)[x]/p(x)$%, where %$p(x) = x^8 + x^4 + x^3 + x + 1$%, - * followed by an affine transformation treating inputs as vectors over - * %$\mathrm{GF}(2)$%. The result is a horrible function. + * This is built from inversion in the multiplicative group of + * %$\gf{2^8}[x]/(p(x))$%, where %$p(x) = x^8 + x^4 + x^3 + x + 1$%, followed + * by an affine transformation treating inputs as vectors over %$\gf{2}$%. + * The result is a horrible function. * * The inversion is done slightly sneakily, by building log and antilog * tables. Let %$a$% be an element of the finite field. If the inverse of