Skip to content

digest: erase truncated output temporary - #2483

Closed
Abdullah1738 wants to merge 2 commits into
RustCrypto:masterfrom
liquid-wasabi:wasabi-liquid-zeroize-ct-output
Closed

digest: erase truncated output temporary#2483
Abdullah1738 wants to merge 2 commits into
RustCrypto:masterfrom
liquid-wasabi:wasabi-liquid-zeroize-ct-output

Conversation

@Abdullah1738

Copy link
Copy Markdown

Summary

  • wrap the full variable-output result in a scoped zeroizing buffer when the zeroize feature is enabled
  • preserve the existing non-zeroize behavior
  • cover ordinary return and unwinding with a serialized erasure-path test

Rationale

CtOutWrapper copies a truncated view into the caller output, but its full intermediate result previously used ordinary drop behavior. This change gives that intermediate the same zeroization guarantee as the surrounding zeroize-enabled digest state.

Verification

  • cargo test -p digest --all-features
  • cargo test -p digest --no-default-features --features block-api,zeroize
  • cargo test -p digest --no-default-features --features block-api
  • cargo clippy -p digest --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check

@newpavlov newpavlov closed this Aug 10, 2026
@newpavlov

Copy link
Copy Markdown
Member

See this comment.

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