-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rescue pre-lightest matrix #9
base: main
Are you sure you want to change the base?
Conversation
feat: impl. a lighter MDS feat: impl. a lighter MDS feat: impl. a lighter MDS feat: impl. a lighter MDS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just a few small comments inline.
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]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to express these as shifts (e.g. 64 >> 2
) rather than just final values (e.g., 16
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 is an implementation with our more optimized MDS matrix.