Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Nov 5, 2025

Restores hashes that previously impl'd the now removed VariableOutput trait which were removed in #744. They're used by argon2.

Note the API has been transition from traits to inherent methods, and the implementations have not been restored for other runtime-variable hash functions, just blake2 due to the need to use Blake2bVar in the argon2 crate.

Restores hashes that previously impl'd the now removed `VariableOutput`
trait which were removed in #744. They're used by `argon2`.

Note the API has been transition from traits to inherent methods, and
the implementations have not been restored for other runtime-variable
hash functions, just `blake2` due to the need to use `Blake2bVar` in
the `argon2` crate.
@newpavlov
Copy link
Member

newpavlov commented Nov 5, 2025

I think we should discourage use of runtime-variable output sizes. In the case of argon2, I think we could use the core type directly. It may be even a better fit, considering that we need the variable output only for the very last iteration of the loop.

@tarcieri
Copy link
Member Author

tarcieri commented Nov 5, 2025

@newpavlov in the interim I need a stopgap as this is blocking the whole rand_core upgrade, and by even releasing blake2 I broke the argon2 prereleases: RustCrypto/password-hashes#736

If you can modify argon2 to avoid using this API, we can remove this again, but for now we need it.

If you'd like, I can slap a #[deprecated] on it for now.

@newpavlov
Copy link
Member

Give me ~30 minutes. I will try to draft a fix which does not rely on this PR. If I am not finished by then, you can merge this PR.

@tarcieri
Copy link
Member Author

tarcieri commented Nov 5, 2025

@newpavlov wrong PR, I assume

tarcieri added a commit to RustCrypto/password-hashes that referenced this pull request Nov 5, 2025
This upgrades `rand_core` to v0.10 prereleases and depends directly on
`getrandom` for access to the system RNG.

It additionally bumps other crates like `digest` and `blake2` which use
the new `crypto-common` with an upgraded `rand_core`.

This required restoring some functionality in `blake2` which was used by
`argon2`: RustCrypto/hashes#754

This is currently referenced as a git branch until we decide if this is
a permanent solution for `argon2` or not, so as to unblock the upgrade.
tarcieri added a commit to RustCrypto/password-hashes that referenced this pull request Nov 5, 2025
This upgrades `rand_core` to v0.10 prereleases and depends directly on
`getrandom` for access to the system RNG.

It additionally bumps other crates like `digest` and `blake2` which use
the new `crypto-common` with an upgraded `rand_core`.

This required restoring some functionality in `blake2` which was used by
`argon2`: RustCrypto/hashes#754

This is currently referenced as a git branch until we decide if this is
a permanent solution for `argon2` or not, so as to unblock the upgrade.
tarcieri added a commit to RustCrypto/password-hashes that referenced this pull request Nov 5, 2025
This upgrades `rand_core` to v0.10 prereleases and depends directly on
`getrandom` for access to the system RNG.

It additionally bumps other crates like `digest` and `blake2` which use
the new `crypto-common` with an upgraded `rand_core`.

This required restoring some functionality in `blake2` which was used by
`argon2`: RustCrypto/hashes#754

This is currently referenced as a git branch until we decide if this is
a permanent solution for `argon2` or not, so as to unblock the upgrade.
tarcieri added a commit to RustCrypto/password-hashes that referenced this pull request Nov 5, 2025
This upgrades `rand_core` to v0.10 prereleases and depends directly on
`getrandom` for access to the system RNG.

It additionally bumps other crates like `digest` and `blake2` which use
the new `crypto-common` with an upgraded `rand_core`.

This required restoring some functionality in `blake2` which was used by
`argon2`: RustCrypto/hashes#754

This is currently referenced as a git branch until we decide if this is
a permanent solution for `argon2` or not, so as to unblock the upgrade.
tarcieri added a commit to RustCrypto/password-hashes that referenced this pull request Nov 5, 2025
This upgrades `rand_core` to v0.10 prereleases and depends directly on
`getrandom` for access to the system RNG.

It additionally bumps other crates like `digest` and `blake2` which use
the new `crypto-common` with an upgraded `rand_core`.

This required restoring some functionality in `blake2` which was used by
`argon2`: RustCrypto/hashes#754

This is currently referenced as a git branch until we decide if this is
a permanent solution for `argon2` or not, so as to unblock the upgrade.
@tarcieri
Copy link
Member Author

tarcieri commented Nov 5, 2025

These usages were removed in RustCrypto/password-hashes#739

@tarcieri tarcieri closed this Nov 5, 2025
@tarcieri tarcieri deleted the blake2/restore-blake-var branch November 5, 2025 23:23
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