Skip to content

Commit

Permalink
Merge pull request #2 from dfns-labs/generic-ec
Browse files Browse the repository at this point in the history
Version bump + generic-ec compat
  • Loading branch information
maurges authored Sep 19, 2023
2 parents 3b211f6 + 85de927 commit a1de6cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
/Cargo.lock
.rstags
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
ff = { version = "0.13", features = ["derive"] }
hex-literal = "0.3"
primeorder = { git = "https://github.com/RustCrypto/elliptic-curves/", rev = "d4dbe19" }
primeorder = "0.13"
subtle = "2"
zeroize = "1.5"

Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ impl From<Scalar> for ScalarPrimitive<StarkCurve> {
ScalarPrimitive::from_uint_unchecked(s.to_uint())
}
}

impl From<&Scalar> for ScalarPrimitive<StarkCurve> {
fn from(s: &Scalar) -> Self {
ScalarPrimitive::from_uint_unchecked(s.to_uint())
}
}

0 comments on commit a1de6cc

Please sign in to comment.