Change update function to use decryption rather than encryption. #173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because the AES decrypt and encrypt operations are symmetric, it seems like it should not matter which is used. However in the context of thinking about how one could theoretically extend attacks like #163 to be more general, there is a critical difference. If one attempts to cancel a differential after an AES round, it changes the canceling change from being all in one word vs one byte in each of 4 words. This matters in terms of how it interacts with the addition on the other half of the state. The spread out update is harder for an attacker to control and subsequently cancel, both because of carries and because it means operating on both 64byte halves of the added state at the same time.