filecoin-project / bls-signatures

BLS Signatures in Rust
Other
74 stars 44 forks source link

feat: zeorize support #75

Open palozano opened 10 months ago

palozano commented 10 months ago

This PR adds specific support for the Zeroize crate.

In particular, it allows the PrivateKey struct to derive Zeroize.

This translates into having the possibility to have secure PrivateKeys since they won't leak any information if the memory address is accessed after the variable is dropped.

The functionality relies on the fact that the crate bls12_381 also implements Zeorize, so nothing in the API has changed.

Solves #74

dignifiedquire commented 9 months ago

Looks like this doesn't actually compile yet. Given that zeroize is sth not everyone needs, I would also prefer this to be an optional feature.

palozano commented 9 months ago

It does compile, but maybe you can indicate if there are some improvements in the code, @dignifiedquire