Skip to content

Commit

Permalink
Merge pull request #123 from rkeene/invcipher-not-ctr
Browse files Browse the repository at this point in the history
Also only define the Inv* family of functions if InvCipher is being compiled
  • Loading branch information
kokke authored Jan 23, 2019
2 parents ce24c0d + a5e18ec commit 2c88f70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2c88f70

Please sign in to comment.