aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2016-12-09 10:21:59 +0100
committerMarcoFalke <[email protected]>2016-12-09 10:22:21 +0100
commit72bf1b3d0962304850a3ef5fe375db4bff1d0a39 (patch)
tree0706166f2a4ab84edf2d7ee7703aabbb278e2a2c /src
parentMerge #9291: Remove mapOrphanTransactionsByPrev from DoS_tests (diff)
parentUpdate ctaes (diff)
downloaddiscoin-72bf1b3d0962304850a3ef5fe375db4bff1d0a39.tar.xz
discoin-72bf1b3d0962304850a3ef5fe375db4bff1d0a39.zip
Merge #9303: Update comments in ctaes
8501bed Squashed 'src/crypto/ctaes/' changes from cd3c3ac..003a4ac (Pieter Wuille)
Diffstat (limited to 'src')
-rw-r--r--src/crypto/ctaes/ctaes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/ctaes/ctaes.c b/src/crypto/ctaes/ctaes.c
index 2389fc0bb..55962bf25 100644
--- a/src/crypto/ctaes/ctaes.c
+++ b/src/crypto/ctaes/ctaes.c
@@ -134,7 +134,7 @@ static void SubBytes(AES_state *s, int inv) {
D = U7;
}
- /* Non-linear transformation (identical to the code in SubBytes) */
+ /* Non-linear transformation (shared between the forward and backward case) */
M1 = T13 & T6;
M6 = T3 & T16;
M11 = T1 & T15;
@@ -469,9 +469,9 @@ static void AES_encrypt(const AES_state* rounds, int nrounds, unsigned char* cip
static void AES_decrypt(const AES_state* rounds, int nrounds, unsigned char* plain16, const unsigned char* cipher16) {
/* Most AES decryption implementations use the alternate scheme
- * (the Equivalent Inverse Cipher), which looks more like encryption, but
- * needs different round constants. We can't reuse any code here anyway, so
- * don't bother. */
+ * (the Equivalent Inverse Cipher), which allows for more code reuse between
+ * the encryption and decryption code, but requires separate setup for both.
+ */
AES_state s = {{0}};
int round;