mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
Merge #9303: Update comments in ctaes
8501bed
Squashed 'src/crypto/ctaes/' changes from cd3c3ac..003a4ac (Pieter Wuille)
This commit is contained in:
commit
72bf1b3d09
@ -134,7 +134,7 @@ static void SubBytes(AES_state *s, int inv) {
|
|||||||
D = U7;
|
D = U7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Non-linear transformation (identical to the code in SubBytes) */
|
/* Non-linear transformation (shared between the forward and backward case) */
|
||||||
M1 = T13 & T6;
|
M1 = T13 & T6;
|
||||||
M6 = T3 & T16;
|
M6 = T3 & T16;
|
||||||
M11 = T1 & T15;
|
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) {
|
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
|
/* Most AES decryption implementations use the alternate scheme
|
||||||
* (the Equivalent Inverse Cipher), which looks more like encryption, but
|
* (the Equivalent Inverse Cipher), which allows for more code reuse between
|
||||||
* needs different round constants. We can't reuse any code here anyway, so
|
* the encryption and decryption code, but requires separate setup for both.
|
||||||
* don't bother. */
|
*/
|
||||||
AES_state s = {{0}};
|
AES_state s = {{0}};
|
||||||
int round;
|
int round;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user