-
Notifications
You must be signed in to change notification settings - Fork 449
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
feat: elliptic-curves
integration, field agnostic sqrt/inverse hooks
#2039
Conversation
|
4d8b992
to
df0871b
Compare
|
||
/// Convert the projective point to an affine point. | ||
/// | ||
/// Public as its used in patched crates. |
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.
No need for the "public" as it's used in patched crates comment.
|
||
/// Check if the point is the identity point. | ||
/// | ||
/// Public as its used in patched crates. |
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.
Comment unnecessary
} | ||
} | ||
|
||
// todo: not actually true? |
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.
Nit: Remove?
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.
You did not fix this?
|
||
impl<C: ECDSACurve> ConditionallySelectable for ProjectivePoint<C> { | ||
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self { | ||
// Note: we dont care about constant time operations in the vm. |
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.
Nit: Add a more clear and professional comment?
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.
Removed comment and called ConditionalSelect
on the inner affine type directly.
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.
This comment is not up to date. Did you push the altest changes?
Co-authored-by: Ratan Kaliani <[email protected]>
Co-authored-by: Ratan Kaliani <[email protected]>
@@ -17,7 +17,8 @@ sha3 = "=0.10.6" | |||
|
|||
[features] | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
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.
nit
@@ -15,6 +15,7 @@ sp1-test = { workspace = true } | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
@@ -18,5 +18,6 @@ sp1-test = { workspace = true } | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
@@ -18,5 +18,6 @@ sp1-test = { workspace = true } | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
@@ -16,5 +16,6 @@ rand.workspace = true | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
@@ -15,5 +15,6 @@ rand.workspace = true | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
@@ -16,5 +16,6 @@ substrate-bn = "0.6.0" | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
@@ -20,5 +20,6 @@ group = "0.13.0" | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
@@ -16,5 +16,6 @@ rsa = { version = "0.9.7", features = ["std", "sha2", "serde"] } | |||
prove = [] | |||
gpu = ["sp1-sdk/cuda"] | |||
|
|||
|
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.
nit
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.
LGTM, one last suggestion.
Co-authored-by: Ratan Kaliani <[email protected]>
#2039) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ratan Kaliani <[email protected]>
This PR:
ProjectivePoint
,AffinePoint
, andScalar
types for use with elliptic-curves traits.Todo: