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

No method to securely delete big uint #118

Open
Richard-W opened this issue Dec 14, 2019 · 2 comments
Open

No method to securely delete big uint #118

Richard-W opened this issue Dec 14, 2019 · 2 comments

Comments

@Richard-W
Copy link

It seems impossible from the public API to overwrite the memory occupied by a BigUint. This is a dealbreaker for cryptographic applications since a BigUint may contain private keys for RSA or DH schemes.

Exposing the trait crate::biguint::IntDigits to the public API would solve that problem.

@cuviper
Copy link
Member

cuviper commented Dec 14, 2019

See #92 using Zeroize, but I still hesitate to merge that with incomplete coverage.

Exposing the trait crate::biguint::IntDigits to the public API would solve that problem.

That requires exposing the digit size, which I explicitly don't want.

But if you're OK with a manual secure-delete like that, we could add a feature to impl Zeroize for BigUint and you could call that yourself, or you could create a Secret<BigUint> to zero on drop.

@Richard-W
Copy link
Author

Richard-W commented Dec 18, 2019

That requires exposing the digit size, which I explicitly don't want.

I understand. Good call.

Manual delete is completely sufficient.

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

No branches or pull requests

2 participants