From 4a9ec95565d8ebf315144a67320e77b08adb51a1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 15 Dec 2020 18:47:25 +0100 Subject: tls: code shrink in AES code function old new delta aes_cbc_decrypt 862 847 -15 Signed-off-by: Denys Vlasenko --- networking/tls_aes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/networking/tls_aes.c b/networking/tls_aes.c index 5400ad9..feb618f 100644 --- a/networking/tls_aes.c +++ b/networking/tls_aes.c @@ -313,15 +313,15 @@ static void InvMixColumns(unsigned astate[16]) d = astate[i + 3]; x = (a << 1) ^ (a << 2) ^ (a << 3) ^ b ^ (b << 1) ^ (b << 3) /***/ ^ c ^ (c << 2) ^ (c << 3) ^ d ^ (d << 3); + astate[i + 0] = Multiply(x); y = a ^ (a << 3) ^ (b << 1) ^ (b << 2) ^ (b << 3) /***/ ^ c ^ (c << 1) ^ (c << 3) ^ d ^ (d << 2) ^ (d << 3); + astate[i + 1] = Multiply(y); z = a ^ (a << 2) ^ (a << 3) ^ b ^ (b << 3) /***/ ^ (c << 1) ^ (c << 2) ^ (c << 3) ^ d ^ (d << 1) ^ (d << 3); + astate[i + 2] = Multiply(z); t = a ^ (a << 1) ^ (a << 3) ^ b ^ (b << 2) ^ (b << 3) /***/ ^ c ^ (c << 3) ^ (d << 1) ^ (d << 2) ^ (d << 3); - astate[i + 0] = Multiply(x); - astate[i + 1] = Multiply(y); - astate[i + 2] = Multiply(z); astate[i + 3] = Multiply(t); } } -- cgit v1.1