-
Notifications
You must be signed in to change notification settings - Fork 72
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
Added type for clearing temporary values. #30
Conversation
869bdd6
to
fefb616
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few typos in the docs + a rustfmt
error.
src/poly.rs
Outdated
@@ -42,8 +42,8 @@ pub struct Poly { | |||
/// | |||
/// # Panics | |||
/// | |||
/// Panics if we have hit the system's locked memory limit when `mlock`ing the new instance of | |||
/// `Poly`. | |||
/// Panics if we have reach the system's locked memory limit when locking the polynomial's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have
src/secret.rs
Outdated
@@ -0,0 +1,187 @@ | |||
//! Utilities for working with secret values. This module includes functionality for locking (and | |||
//! unlocking) memory into RAM, overwriting memory with zeros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trailing period is missing.
src/secret.rs
Outdated
/// # Errors | ||
/// | ||
/// An `Error::MlockFailed` is returned if we reach the system's locked memory limit or if we | ||
/// attemt to lock an invalid region of memory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attempt
src/secret.rs
Outdated
} | ||
} | ||
|
||
/// Unlocks the memory-lock for a region of memory marked as secret. If the secret region of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"memory lock" doesn't need a dash.
fefb616
to
7149a84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'll approve as soon as I can test :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
secret
module.Safe<T>
for clearing, locking, and unlocking temporary values that should be kept secret.Poly::extend_mlock(&mut self)
andPoly::truncate_ mlock(&mut self)
(locking on instantiation and destruction ofPoly
is enough).Closes issue #24