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

block-buffer: remove dependency on crypto-common #1115

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

newpavlov
Copy link
Member

@newpavlov newpavlov commented Sep 27, 2024

Dependency on crypto-common causes some annoyances as mentioned in RustCrypto/traits#1662.

Instead of using the sealed BlockSizes trait, the new code uses monomorphization errors to enforce block size correctness. This is somewhat non-idiomatic, but should be fine in practice since block buffers are usually used with fixed block sizes. After this change BlockSizes probably can be removed from crypto-common.

I decided against vendoring block-buffer code into digest as was proposed in the linked issue because block-buffer has third-party users and having a separate crate should make it a bit easier for reviewers.

@newpavlov newpavlov requested a review from tarcieri September 27, 2024 00:21
@newpavlov newpavlov force-pushed the block-buffer/monomorph_error branch from 1592eca to ac65c94 Compare September 27, 2024 01:20
@newpavlov newpavlov merged commit 021e014 into master Sep 27, 2024
94 checks passed
@newpavlov newpavlov deleted the block-buffer/monomorph_error branch September 27, 2024 14:42
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.

2 participants