-
Notifications
You must be signed in to change notification settings - Fork 271
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
chore: Bump curve25519-dalek to v4, sha3 to v0.10 #946
Conversation
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
@@ -18,7 +18,7 @@ mod target_arch { | |||
type Error = Curve25519Error; | |||
|
|||
fn try_from(pod: &PodScalar) -> Result<Self, Self::Error> { | |||
Scalar::from_canonical_bytes(pod.0).ok_or(Curve25519Error::PodConversion) | |||
Option::from(Scalar::from_canonical_bytes(pod.0)).ok_or(Curve25519Error::PodConversion) |
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.
API like Scalar::from_canonical_bytes
returns CtOption
which doesn't have ok_or
API. Do you have better ideas?
@@ -64,6 +64,7 @@ mod target_arch { | |||
|
|||
fn try_from(pod: &PodRistrettoPoint) -> Result<Self, Self::Error> { | |||
CompressedRistretto::from_slice(&pod.0) | |||
.map_err(|_| Curve25519Error::PodConversion)? |
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 is good to omit the error and returns Curve25519Error::PodConversion
directly?
Thanks so much for the contribution! I am starting to look at this (sorry for the delay 🙏 ), but it seems like there is a duplicate PR #513 that also upgrades the curve25519-dalek version. Since the other one is an ealier PR, let's wait until how it turns out first. |
Closing since this was done with #1693. Thanks for your contribution anyway! |
Problem
Summary of Changes
Fixes #647
This PR fix #647 by:
Follow-up tasks: