Skip to contentSkip to conversation

crypto: aes_ti - fix comment for MixColumns step

PATCH In review Eric Biggers 3 participants 3 messages May 10, 2017 – Jun 19, 2017 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: aes_ti - fix comment for MixColumns step

From: Eric Biggers <[email protected]>

mix_columns() contains a comment which shows the matrix used by the MixColumns step of AES, but the last entry in this matrix was incorrect --- and did not match the code, which is correct. Fix the comment.

---
 crypto/aes_ti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/aes_ti.c +1 -1
index 92644fd1ac19..03023b2290e8 100644
@@ -114,7 +114,7 @@ static u32 mix_columns(u32 x)
 	 * | 0x2 0x3 0x1 0x1 |   | x[0] |
 	 * | 0x1 0x2 0x3 0x1 |   | x[1] |
 	 * | 0x1 0x1 0x2 0x3 | x | x[2] |
-	 * | 0x3 0x1 0x1 0x3 |   | x[3] |
+	 * | 0x3 0x1 0x1 0x2 |   | x[3] |
 	 */
 	u32 y = mul_by_x(x) ^ ror32(x, 16);
 
Signature · 1 line
2.13.0.rc2.291.g57267f2277-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Eric Biggers

From: Eric Biggers <[email protected]>

mix_columns() contains a comment which shows the matrix used by the MixColumns step of AES, but the last entry in this matrix was incorrect --- and did not match the code, which is correct. Fix the comment.

---
 crypto/aes_ti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/aes_ti.c +0 -0
index 92644fd1ac19..03023b2290e8 100644

crypto/aes_ti.c static u32 mix_columns(u32 x) · line 120

Quoted 8 lines
crypto/aes_ti.c +1 -1
@@ -114,7 +114,7 @@ static u32 mix_columns(u32 x)
         * | 0x2 0x3 0x1 0x1 |   | x[0] |
         * | 0x1 0x2 0x3 0x1 |   | x[1] |
         * | 0x1 0x1 0x2 0x3 | x | x[2] |
-        * | 0x3 0x1 0x1 0x3 |   | x[3] |
+        * | 0x3 0x1 0x1 0x2 |   | x[3] |
         */
        u32 y = mul_by_x(x) ^ ror32(x, 16);
 
maintainer
#2 lore raw
In reply to Eric Biggers
Quoted 7 lines · Eric Biggers

From: Eric Biggers <[email protected]>

mix_columns() contains a comment which shows the matrix used by the MixColumns step of AES, but the last entry in this matrix was incorrect --- and did not match the code, which is correct. Fix the comment.

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt