Skip to content

Allow wiping out AES key after usage. #3189

@coolwanglu

Description

@coolwanglu

Motivations

Currently the AES module copies the key, and it is not wiped out after usage.

Solution

Use Zeroize on Key to automatically wipe it out on drop. This can be guarded by a feature.

Example:

#[derive(ZeroizeOnDrop)]
struct Key {}

Alternatives

The AES library does not make a copy. Instead it takes only a reference and the caller should wipe it out if necessary.
This changes the API though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions