-
Notifications
You must be signed in to change notification settings - Fork 11
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
Umbral -> Curve25519 for ThresholdDecryptionRequest/Response #54
Conversation
Codecov Report
@@ Coverage Diff @@
## main #54 +/- ##
==========================================
+ Coverage 15.25% 19.50% +4.25%
==========================================
Files 16 17 +1
Lines 2845 3214 +369
==========================================
+ Hits 434 627 +193
- Misses 2411 2587 +176
|
#[allow(clippy::inherent_to_string)] | ||
#[wasm_bindgen(js_name = toString)] | ||
pub fn to_string(&self) -> String { | ||
format!("{}", self.0) | ||
} |
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 do we implement to_string
here? Is it to display or to serialize these structs? If the former, maybe we could consider using #[wasm_bindgen(inspectable)]
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.
Following examples from the equivalent objects in Umbral. That being said the to_string for secret keys are rudimentary (constant string).
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.
I wasn't aware that it existed. But there is a slight difference here I think - toString()
now returns the Display
impl (that is, it is analogous to str()
in Python), but inspectable
would return something analogous to repr()
in Python or Debug
in Rust. Depends on what exactly you want from this method, I guess.
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 comments and questions, but mostly nitpicks really. Please address them at your discretion.
I don't have comments on the function itself.
A very fine contribution
…est/response encryption. E2EThresholdDecryptionRequest object is no longer needed as an intermediary since a shared secret key is created/used.
…tSecretKey, RequestPublicKey, RequestSharedSecret. Updated/fixed python and wasm bindings accordingly. Added tests.
…ldDecryptionResponse and EncryptedThresholdDecryptionResponse. Code cleanup.
Change `diffie_hellman()` to `derive_shared_secret()`. Remove unnecessary `make_secret()` from RequestSecretFactory. General code cleanup.
needs rebase |
…ble change. Improve error name for invalid seed length.
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.
🤠
Related to nucypher/nucypher#3129.