Skip to content

crypto-common: remove BlockSizes trait#2309

Open
newpavlov wants to merge 5 commits intomasterfrom
block_sizes
Open

crypto-common: remove BlockSizes trait#2309
newpavlov wants to merge 5 commits intomasterfrom
block_sizes

Conversation

@newpavlov
Copy link
Member

@newpavlov newpavlov commented Feb 18, 2026

BlockSizeUser is no longer limited by block sizes smaller than 256 bytes. BlockSizes was moved to block-buffer and used in bound only where it's needed.

Closes: #2304

@tarcieri
Copy link
Member

Hmm, fun times with elliptic-curve and its (transitive) dependency on hmac there...

/// [0]: https://github.com/rust-lang/rust/issues/20671#issuecomment-1905186183
pub trait SmallBlockSizeUser:
BlockSizeUser<BlockSize = <Self as SmallBlockSizeUser>::_BlockSize>
{
Copy link
Member Author

@newpavlov newpavlov Feb 18, 2026

Choose a reason for hiding this comment

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

Welp, this hack does the thing, but it's surely not pretty... I wonder if we should move it to crypto-common. It would mean addition of optional block-buffer dependency for it which may be fine.

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.

BlockSizes up to only 256 bytes makes it impossible to implement BlockSizeUser for wide-block ciphers

2 participants

Comments