Skip to content

Rethink zeroization when ZeroizeOnDrop is available #89

@fjarri

Description

@fjarri

We may want to change SecretBox trait bounds and remove CanBeZeroizedOnDrop in favor of zeroize::ZeroizeOnDrop, which is available in zeroize since in 1.5. See RustCrypto/utils#699 and RustCrypto/utils#652.

In particular, the approximate course of action is:

  • Derive ZeroizeOnDrop for public secret types (SecretKey, Signer, SecretKeyFactory)
  • Assert the third-party types we use internally implement ZeroizeOnDrop (e.g. SigningKey). This can be asserted in compile-time.
  • We may be able to use the objects from the secrecy crate (e.g. SecretBox) instead of our custom one.
  • Also see the static_assertions crate if a static check is needed that backend types implement ZeroizeOnDrop.

Currently blocked by chacha20poly1305 (at 0.9) conflicting with zeroize 1.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by a third-party libraryenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions