Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zeroize #39

Closed
aewag opened this issue Jan 5, 2022 · 1 comment · Fixed by #42
Closed

Add zeroize #39

aewag opened this issue Jan 5, 2022 · 1 comment · Fixed by #42

Comments

@aewag
Copy link
Member

aewag commented Jan 5, 2022

https://crates.io/crates/zeroize

EDIT:
Wait until new version is released as changes/extensions are on the way (i.e. RustCrypto/utils#651 RustCrypto/utils#652)'

@aewag aewag linked a pull request Jan 7, 2022 that will close this issue
@aewag
Copy link
Member Author

aewag commented Jan 13, 2022

No support for tinyvec

error[E0599]: the method `zeroize_or_on_drop` exists for mutable reference `&mut ArrayVec<[u8; 5]>`, but its trait bounds were not satisfied
   --> src/main.rs:6:46
    |
6   | #[derive(Debug, Default, PartialEq, Zeroize, ZeroizeOnDrop)]
    |                                              ^^^^^^^^^^^^^ method cannot be called on `&mut ArrayVec<[u8; 5]>` due to unsatisfied trait bounds
    |
   ::: /home/alwagner/.cargo/registry/src/github.com-1ecc6299db9ec823/tinyvec-1.5.1/src/arrayvec.rs:104:1
    |
104 | pub struct ArrayVec<A> {
    | ----------------------
    | |
    | doesn't satisfy `ArrayVec<[u8; 5]>: AssertZeroize`
    | doesn't satisfy `ArrayVec<[u8; 5]>: ZeroizeOnDrop`
    | doesn't satisfy `ArrayVec<[u8; 5]>: Zeroize`
    |
    = note: the following trait bounds were not satisfied:
            `ArrayVec<[u8; 5]>: Zeroize`
            which is required by `ArrayVec<[u8; 5]>: AssertZeroize`
            `&mut ArrayVec<[u8; 5]>: Zeroize`
            which is required by `&mut ArrayVec<[u8; 5]>: AssertZeroize`
            `ArrayVec<[u8; 5]>: ZeroizeOnDrop`
            which is required by `&mut ArrayVec<[u8; 5]>: AssertZeroizeOnDrop`
            `[u8]: Sized`
            which is required by `[u8]: AssertZeroize`
    = note: this error originates in the derive macro `ZeroizeOnDrop` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rustcrypto_utils_zeroize` due to previous error

EDIT: With RustCrypto/utils#719 zeroize can be used for ReferenceImplPrivateKey.

@aewag aewag mentioned this issue May 17, 2023
@aewag aewag closed this as completed in #42 May 17, 2023
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 a pull request may close this issue.

1 participant