Skip to content

Add hash customization trait for variable output hash - #1787

Merged
newpavlov merged 1 commit into
RustCrypto:masterfrom
sylvainpelissier:custom_var_out
Mar 12, 2025
Merged

Add hash customization trait for variable output hash#1787
newpavlov merged 1 commit into
RustCrypto:masterfrom
sylvainpelissier:custom_var_out

Conversation

@sylvainpelissier

Copy link
Copy Markdown
Contributor

New trait for customized hash function with variable output CtVariableCoreWrapper like Blake2 to implement the CustomizedInit trait.

@baloo

Copy link
Copy Markdown
Member

nitpick: s/varibale/variable/ in the commit and the subject of the PR.

@sylvainpelissiersylvainpelissier changed the title Add hash customization trait for varibale output hashAdd hash customization trait for variable output hashMar 12, 2025
@newpavlov
newpavlov merged commit 7b82f39 into RustCrypto:masterMar 12, 2025
newpavlov pushed a commit to RustCrypto/hashes that referenced this pull request Mar 24, 2025
Allow to use Blake2 with a customized string:
`Blake2b128::new_customized(persona)` as described in the paper and as
for cSHAKE. It needs a new trait `VarOutputCustomized` implemented by:
RustCrypto/traits#1787
@tarcieritarcieri mentioned this pull request Feb 12, 2026
tarcieri added a commit that referenced this pull request Feb 13, 2026
## Added
- `CustomizedInit` trait (#1334)
- `SerializableState` support (#1369)
- `DynDigestWithOid` wrapper trait (#1390)
- `VariableOutputCoreCustomized` trait (#1787, #2043)
- `buffer_fixed`, `buffer_ct_variable`, `buffer_rt_variable`, and
`buffer_xof` macros (#1799)
- `XofFixedWrapper` (#1815)
- `CollisionResistance` trait (#1820)
- `CoreProxy::compose/decompose` methods (#1898)
- `EagerHash` trait (#2014)
## Changed
- Replaced `generic-array` with `hybrid-array` (#1358)
- `crypto-common` dependency bumped to v0.2 (#1173)
- Edition changed to 2024 and MSRV bumped to 1.85 (#1759)
- Bump `const-oid` dependency to v0.10 (#1772)
- `digest::core_api` renamed to `digest::block_api` (#1799)
- `CtVariableCoreWrapper` renamed to `CtOutWrapper` (#1799)
- Removed the OID type parameter from `CtOutWrapper` (#1799)
- Implementations of the `SerializableState` trait (#1953)
- `new_test!` and `new_mac_test!` macros (#1958)
- Bump `block-buffer` to v0.11 (#2082)
- Re-export of `crypto-common` moved to `digest::common` (#2237)
- Bump `crypto-common` to v0.2 (#2276)
- Replace `subtle` with `ctutils` (#2301)
## Removed
- `Mac::{new, new_from_slice, generate_key}` methods (#1173)
- `CoreWrapper`, `RtVariableCoreWrapper`, and `XofReaderCoreWrapper`
types (#1799)
- `io::Write/Read` implementations in favor of the `digest_io::IoWrapper`
type (#1809)
- `VariableOutput` trait (#2043)
- Implementation of `subtle::ConstantTimeEq` for `CtOutput`. Note that
implementation of `PartialEq`/`Eq` trait is still const time. (#2292)
Sign up for freeto 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

@sylvainpelissier@baloo@newpavlov