Skip to content
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

aes: move Block8 to the hazmat module #463

Merged
merged 2 commits into from
Jan 29, 2025
Merged

aes: move Block8 to the hazmat module #463

merged 2 commits into from
Jan 29, 2025

Conversation

newpavlov
Copy link
Member

The backends were changed to use a different number of parallel blocks, so the alias is now used only by hazmat functions.

Closes #462

@newpavlov newpavlov requested a review from tarcieri January 28, 2025 23:40
Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I'm confused why the non-hazmat APIs use 9 blocks instead of 8, but this otherwise seems fine

@newpavlov
Copy link
Member Author

newpavlov commented Jan 29, 2025

See UPD to this comment. It has shown a better performance on several (AMD) CPUs which I've tested the code. There may be issues with my microbenchmarks, but we can easily change the numbers in future based on new data.

I guess a power-of-two parallel block size may be better for chunking, so we need to test this.

@newpavlov newpavlov merged commit 81f1eb4 into master Jan 29, 2025
25 checks passed
@newpavlov newpavlov deleted the aes_block8 branch January 29, 2025 00:30
@tarcieri
Copy link
Member

It would probably be good to test the impact on full AEADs. Seems like having an odd number of blocks is going to make optimizing parallel pipelining (which we don't do, because it makes things slower already) that much harder: RustCrypto/AEADs#74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aes 0.9.0-pre.2 uses ParBlocksSize of 9 but has type alias for Block8
2 participants