Rescue pre-lightest matrix#9
Draft
Al-Kindi-0 wants to merge 4 commits into
Draft
Conversation
feat: impl. a lighter MDS feat: impl. a lighter MDS feat: impl. a lighter MDS feat: impl. a lighter MDS
bobbinth
requested changes
Jul 12, 2022
Collaborator
bobbinth
left a comment
There was a problem hiding this comment.
Looks great! Just a few small comments inline.
Comment on lines
+25
to
+28
| const MDS_FREQ_BLOCK_ONE: [i64; 3] = [64 >> 2, 32 >> 2, 64 >> 2]; | ||
| const MDS_FREQ_BLOCK_TWO: [(i64, i64); 3] = | ||
| [(-(2 >> 1), 4 >> 1), (-(2 >> 1), 2 >> 1), (8 >> 1, 16 >> 1)]; | ||
| const MDS_FREQ_BLOCK_THREE: [i64; 3] = [-(32 >> 2), 4 >> 2, 4 >> 2]; |
Collaborator
There was a problem hiding this comment.
Is there a reason to express these as shifts (e.g. 64 >> 2) rather than just final values (e.g., 16).
Owner
Author
There was a problem hiding this comment.
This is done in order to emphasize that the original constants of the matrix are shifted in order to optimize/remove some later shifts in the iFFT2 and iFFT4. Basically it is for illustration purposes but if it is ugly we can remove it and make do with a written explanation.
Collaborator
There was a problem hiding this comment.
I'd probably put the final values in the code, and address the above point in the comments.
feat: impl. a lighter MDS feat: impl. a lighter MDS feat: impl. a lighter MDS feat: impl. a lighter MDS
2496f01 to
eea409c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is an implementation with our more optimized MDS matrix.