Skip to content

Commit 760765d

Browse files
committed
Update ctaes
2 parents 8601784 + 8501bed commit 760765d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/crypto/ctaes/ctaes.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void SubBytes(AES_state *s, int inv) {
134134
D = U7;
135135
}
136136

137-
/* Non-linear transformation (identical to the code in SubBytes) */
137+
/* Non-linear transformation (shared between the forward and backward case) */
138138
M1 = T13 & T6;
139139
M6 = T3 & T16;
140140
M11 = T1 & T15;
@@ -469,9 +469,9 @@ static void AES_encrypt(const AES_state* rounds, int nrounds, unsigned char* cip
469469

470470
static void AES_decrypt(const AES_state* rounds, int nrounds, unsigned char* plain16, const unsigned char* cipher16) {
471471
/* Most AES decryption implementations use the alternate scheme
472-
* (the Equivalent Inverse Cipher), which looks more like encryption, but
473-
* needs different round constants. We can't reuse any code here anyway, so
474-
* don't bother. */
472+
* (the Equivalent Inverse Cipher), which allows for more code reuse between
473+
* the encryption and decryption code, but requires separate setup for both.
474+
*/
475475
AES_state s = {{0}};
476476
int round;
477477

0 commit comments

Comments
 (0)