Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ sha3 = { git = "https://github.com/RustCrypto/hashes.git" }

# https://github.com/RustCrypto/traits/pull/1751
# https://github.com/RustCrypto/traits/pull/1767
# https://github.com/RustCrypto/traits/pull/1774
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git" }
signature = { git = "https://github.com/RustCrypto/traits.git" }

Expand All @@ -43,7 +44,11 @@ signature = { git = "https://github.com/RustCrypto/traits.git" }
crypto-bigint = { git = "https://github.com/RustCrypto/crypto-bigint.git" }

# https://github.com/zkcrypto/ff/pull/122
ff = { git = "https://github.com/pinkforest/ff.git", branch = "bump-rand-core" }
# https://github.com/zkcrypto/ff/pull/126
# https://github.com/zkcrypto/ff/pull/127
# https://github.com/zkcrypto/ff/pull/130
ff = { git = "https://github.com/zkcrypto/ff.git", branch = "release-0.14.0" }

# https://github.com/zkcrypto/group/pull/56
group = { git = "https://github.com/pinkforest/group.git", branch = "bump-rand-0.9" }

Expand Down
7 changes: 7 additions & 0 deletions ecdsa/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ where
NonZeroScalar::<C>::random(rng).into()
}

/// Generate a cryptographically random [`SigningKey`].
pub fn try_from_rng<R: TryCryptoRng + ?Sized>(
rng: &mut R,
) -> core::result::Result<Self, R::Error> {
Ok(NonZeroScalar::<C>::try_from_rng(rng)?.into())
}

/// Initialize signing key from a raw scalar serialized as a byte array.
pub fn from_bytes(bytes: &FieldBytes<C>) -> Result<Self> {
SecretKey::<C>::from_bytes(bytes)
Expand Down
Loading