Skip to content

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

Open
baloo wants to merge 2 commits into
RustCrypto:masterfrom
baloo:baloo/push-yzwqxrknnmvv
Open

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

Conversation

@baloo
Copy link
Copy Markdown
Member

@baloo baloo commented May 22, 2026

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
Copy link
Copy Markdown
Member Author

baloo commented May 22, 2026

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
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