summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2019-01-23 17:57:56 +0100
committerGitHub <noreply@github.com>2019-01-23 17:57:56 +0100
commit2c88f70a20517078b4eebf4805154c1f6cfb2310 (patch)
tree85c41d7719e3d23cf1d80ffa05ef8cae4bdfdadd
parentMerge pull request #121 from rkeene/invcipher-not-ctr (diff)
parentAlso only define the Inv* family of functions if InvCipher is being compiled (diff)
downloadtiny-AES-c-2c88f70a20517078b4eebf4805154c1f6cfb2310.tar
tiny-AES-c-2c88f70a20517078b4eebf4805154c1f6cfb2310.tar.gz
tiny-AES-c-2c88f70a20517078b4eebf4805154c1f6cfb2310.tar.bz2
tiny-AES-c-2c88f70a20517078b4eebf4805154c1f6cfb2310.tar.lz
tiny-AES-c-2c88f70a20517078b4eebf4805154c1f6cfb2310.tar.xz
tiny-AES-c-2c88f70a20517078b4eebf4805154c1f6cfb2310.tar.zst
tiny-AES-c-2c88f70a20517078b4eebf4805154c1f6cfb2310.zip
-rw-r--r--aes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/aes.c b/aes.c
index f0f9ac9..18e3f38 100644
--- a/aes.c
+++ b/aes.c
@@ -341,6 +341,7 @@ static uint8_t Multiply(uint8_t x, uint8_t y)
#endif
+#if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
// MixColumns function mixes the columns of the state matrix.
// The method used to multiply may be difficult to understand for the inexperienced.
// Please use the references to gain more information.
@@ -404,7 +405,7 @@ static void InvShiftRows(state_t* state)
(*state)[2][3] = (*state)[3][3];
(*state)[3][3] = temp;
}
-
+#endif // #if (defined(CBC) && CBC == 1) || (defined(ECB) && ECB == 1)
// Cipher is the main function that encrypts the PlainText.
static void Cipher(state_t* state, uint8_t* RoundKey)