Skip to content

Commit 8501bed

Browse files
committed
Squashed 'src/crypto/ctaes/' changes from cd3c3ac..003a4ac
003a4ac Merge #5: fix typo 5254f14 [trivial] Fix typo e7c0aab Merge #4: Fix some comments d07cead Fix some comments git-subtree-dir: src/crypto/ctaes git-subtree-split: 003a4acfc273932ab8c2e276cde3b4f3541012dd
1 parent a545127 commit 8501bed

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ctaes.c

+4-4
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

test.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int main(void) {
102102
}
103103
}
104104
if (fail == 0) {
105-
fprintf(stderr, "All tests succesful\n");
105+
fprintf(stderr, "All tests successful\n");
106106
} else {
107107
fprintf(stderr, "%i tests failed\n", fail);
108108
}

0 commit comments

Comments
 (0)