-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update Ciphertext
bindings
#155
Conversation
* Remove unused Ciphertext.construct_tag_hash() * Refactor Ciphertext.check() to take the functionality of check_ciphertext_validity() function
f4dc872
to
5062f40
Compare
Codecov Report
@@ Coverage Diff @@
## main #155 +/- ##
==========================================
- Coverage 77.96% 77.38% -0.59%
==========================================
Files 23 23
Lines 4979 5005 +26
==========================================
- Hits 3882 3873 -9
- Misses 1097 1132 +35
|
Looks good so far. Two comments from me:
|
One more question: How does creating a decryption share work now that only the |
@derekpierre Thanks for your input, now I have a clear picture of what should be the scope of this PR. I'm going to turn it into a draft and add some changes. |
5062f40
to
8078fea
Compare
8078fea
to
1800d3c
Compare
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
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 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.
Just some minor comments. Great work @piotr-roslaniec !
}) | ||
} | ||
pub fn payload(&self) -> Vec<u8> { | ||
self.ciphertext.clone() |
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.
Why clone?
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.
Because &self.ciphertext
is hidden behind &self
reference, and we need to take the ownership of those bytes to be used in bindings
ferveo/src/api.rs
Outdated
rng, | ||
) | ||
.unwrap(); | ||
let _rng = &mut thread_rng(); |
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.
Isn't this handled by L56?
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.
It's an unused variable, removing it now.
ferveo/src/api.rs
Outdated
rng, | ||
) | ||
.unwrap(); | ||
let _rng = &mut thread_rng(); |
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.
Same as above.
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.
It's an unused variable, removing it now.
Type of PR:
Required reviews:
What this does:
Ciphertext.header -> CiphertextHeader
andCiphertext.payload -> bytes
from Python bindingsIssues fixed/closed:
Why it's needed:
Notes for reviewers:
nucypher-core
stub files,*.pyi
, upon updatingCiphertext.payload
and how? Decrypter? Can we keep usingCiphertext
instead?