symm/rijndael-mktab.c: Produce more round constants.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 5 Jan 2018 04:28:56 +0000 (04:28 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jun 2018 23:51:39 +0000 (00:51 +0100)
We don't have enough for large blocks and/or small keys.  We need 15*8 =
120 words of keys for 256-bit Rijndael, and if we have only a 32-bit key
then we'll need 120 round constants.  So generate them all.

symm/rijndael-mktab.c

index 182ae32..3435068 100644 (file)
@@ -38,7 +38,7 @@
 static octet s[256], si[256];
 static uint32 t[4][256], ti[4][256];
 static uint32 u[4][256];
-static octet rc[32];
+static octet rc[120];
 
 /*----- Main code ---------------------------------------------------------*/