Skip to content

digest: improve implementations of the SerializableState trait - #1953

Merged
newpavlov merged 17 commits into
masterfrom
digest/serialization
Aug 13, 2025
Merged

digest: improve implementations of the SerializableState trait#1953
newpavlov merged 17 commits into
masterfrom
digest/serialization

Conversation

@newpavlov

@newpavlovnewpavlov commented Aug 11, 2025

Copy link
Copy Markdown
Member

Previously we were using block size + 1 byte to serialize eager block buffers while block size is sufficient. It resulted in odd serialization state sizes. The SerializableState impl also a bit convoluted.

The new implementation results in more efficient serialization and more straightforward code. The main drawback is that it inevitably involves a breaking change in the serialization format.

Depends on RustCrypto/utils#1200.

@newpavlovnewpavlov changed the title digest: improve serialization of eager hashesdigest: improve implementations of the SerializableState traitAug 13, 2025
@newpavlov
newpavlov merged commit 7bbc010 into masterAug 13, 2025
74 checks passed
@newpavlov
newpavlov deleted the digest/serialization branch August 13, 2025 10:43
@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.

1 participant

@newpavlov