Skip to content

rfc6979: allow the use of non-block_api-backed hashes#1360

Merged
tarcieri merged 2 commits into
RustCrypto:masterfrom
baloo:baloo/push-yzwqxrknnmvv
Jun 6, 2026
Merged

rfc6979: allow the use of non-block_api-backed hashes#1360
tarcieri merged 2 commits into
RustCrypto:masterfrom
baloo:baloo/push-yzwqxrknnmvv

Conversation

@baloo

@baloo baloo commented May 22, 2026

Copy link
Copy Markdown
Member

When #1076 was introduced, it moved the implementation to use block_api-backed hashes only.

This made sense at the time, because all the hashes used so far were backed by block_api.

This situation changed with RustCrypto/hashes#849 where sha3 is no longer backed by the block_api.

This PR is essentially a revert of RustCrypto/hashes#849 that brings back the previous implementation of rfc6979, using SimpleHmacReset.

This was tested in downstream crates (k256 and rpgp).

See discussion in #1076 (comment) and below

@baloo

baloo commented May 22, 2026

Copy link
Copy Markdown
Member Author

cc @daxpedda

@daxpedda

Copy link
Copy Markdown
Contributor

I believe this was done mainly to avoid Digest + Update, which you aren't doing here. I don't remember exactly why this was necessary in the first place (RustCrypto/elliptic-curves#1423 was the trigger AFAICS).

Ergo this looks fine to me 👍. Thank you for the heads-up!

@baloo baloo force-pushed the baloo/push-yzwqxrknnmvv branch from 03dbe21 to bdd748c Compare May 22, 2026 17:06
@tarcieri

tarcieri commented Jun 6, 2026

Copy link
Copy Markdown
Member

Can you also bump the version of rfc6979 to v0.6.0-pre since this is a breaking change? (unless it isn't?)

@tarcieri tarcieri merged commit 43d9831 into RustCrypto:master Jun 6, 2026
89 checks passed
@tarcieri tarcieri mentioned this pull request Jun 6, 2026
tarcieri added a commit that referenced this pull request Jun 6, 2026
The changes in #1360 were breaking, so this release bumps the minor
version.

It might be possible to get some additional breaking changes in as well,
if we can land RustCrypto/crypto-bigint#1266.
@baloo baloo deleted the baloo/push-yzwqxrknnmvv branch June 6, 2026 22:47
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.

3 participants