RustCrypto / RustCrypto/utils

zeroize_derive: attribute for obtaining a mutable slice

Open
#901 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
674
Forks
170
Avg merge
1d 12h
Merged PRs (30d)
10

Description

An optimized Zeroize<Z> impl exists for slices where Z: DefaultIsZeros.

It would be nice if custom derive could leverage it by obtaining a mutable slice of a field, e.g. via the AsMut trait:

#[zeroize(as_mut)]
field: Vec<u8>,

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the zeroize custom-derive entry point and the existing slice Zeroize implementation described in the issue. Trace how derive attributes are parsed, then add coverage for #[zeroize(as_mut)] on a Vec field; done means the attribute derives a working implementation that uses the field's mutable slice.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.