-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
rand
feature; bump elliptic-curve
and ecdsa
Updates to use the `group` crate. See: RustCrypto/traits#287. This crate has a hard `rand_core` dependency so this commit gets rid of the `rand` features across the board and makes them mandatory. (Even if we don't end up shipping the `group` crate this release, that's probably for the best to keep the number of features down) This commit additionally splits out `no_std` build testing into `tests/*_no_std` Cargo projects. This is a workaround until the Cargo resolver is fixed upstream: rust-lang/cargo#7915 rust-lang/cargo#7916
Showing
29 changed files
with
156 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
target | ||
tests/Cargo.lock | ||
*.sw* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,6 @@ mod tests { | |
); | ||
} | ||
|
||
#[cfg(feature = "rand")] | ||
#[test] | ||
fn generate_secret_key() { | ||
use crate::SecretKey; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[workspace] | ||
members = [ | ||
"k256_no_std", | ||
"p256_no_std", | ||
"p384_no_std", | ||
] | ||
|
||
[patch.crates-io] | ||
ecdsa = { git = "https://github.com/RustCrypto/signatures" } | ||
elliptic-curve = { git = "https://github.com/RustCrypto/traits" } | ||
group = { git = "https://github.com/zkcrypto/group.git" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# no_std tests | ||
|
||
This directory and associated CI configs in `.github` is a workaround for | ||
issues with the `cargo` resolver activating features from dev-dependencies | ||
which cause `std` to get linked in a release target. | ||
|
||
It contains small test crates in their own isolated workspace which ensure that | ||
these features are not activated when linking and therefore that the crates | ||
will link in `no_std` environments when consumed as a dependency of another | ||
`no_std`-compatible crate. | ||
|
||
Here are upstream issues tracking the problem: | ||
|
||
- [#7914: Tracking issue for `-Z features=itarget`](https://github.com/rust-lang/cargo/issues/7914) | ||
- [#7915: Tracking issue for `-Z features=host_dep`](https://github.com/rust-lang/cargo/issues/7915) | ||
- [#7916: Tracking issue for `-Z features=dev_dep`](https://github.com/rust-lang/cargo/issues/7916]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "k256_no_std" | ||
version = "0.1.0" | ||
authors = ["RustCrypto Developers"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
k256 = { path = "../../k256", default-features = false } | ||
|
||
[features] | ||
arithmetic = ["k256/arithmetic"] | ||
ecdh = ["k256/ecdh"] | ||
ecdsa = ["k256/ecdsa"] | ||
ecdsa-core = ["k256/ecdsa-core"] | ||
keccak256 = ["k256/keccak256"] | ||
sha256 = ["k256/sha256"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#![no_std] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "p256_no_std" | ||
version = "0.1.0" | ||
authors = ["RustCrypto Developers"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
p256 = { path = "../../p256", default-features = false } | ||
|
||
[features] | ||
arithmetic = ["p256/arithmetic"] | ||
ecdh = ["p256/ecdh"] | ||
ecdsa = ["p256/ecdsa"] | ||
ecdsa-core = ["p256/ecdsa-core"] | ||
sha256 = ["p256/sha256"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#![no_std] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "p384_no_std" | ||
version = "0.1.0" | ||
authors = ["RustCrypto Developers"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
p384 = { path = "../../p384", default-features = false } | ||
|
||
[features] | ||
ecdsa = ["p384/ecdsa"] | ||
sha384 = ["p384/sha384"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#![no_std] |