Skip to content
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

core: replace secp256k with k256 in crypto::ecdsa #3525

Merged
merged 23 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fa7589c
core: crypto/ecdsa switch to k256
michalkucharczyk Feb 29, 2024
d6cf147
Cargo.lock
michalkucharczyk Feb 29, 2024
682ddf0
fixes for no-std
michalkucharczyk Feb 29, 2024
277068b
Cargo.lock
michalkucharczyk Feb 29, 2024
80b133e
".git/.scripts/commands/fmt/fmt.sh"
Feb 29, 2024
35878b2
seed doc improved
michalkucharczyk Mar 1, 2024
e63fbac
secp256k1 is used on host
michalkucharczyk Mar 4, 2024
7db5674
Cargo.lock
michalkucharczyk Mar 4, 2024
93086ec
features fix
michalkucharczyk Mar 4, 2024
42bb70c
make clippy happy
michalkucharczyk Mar 4, 2024
0fc7201
backend features removed: std/no-std used
michalkucharczyk Mar 4, 2024
8b4c147
Merge branch 'master' into mku-k256-in-core-crypto-ecdsa
michalkucharczyk Mar 4, 2024
0ff4aa2
Apply suggestions from code review
michalkucharczyk Mar 4, 2024
1ab98f6
taplo for frame/support/Cargo.toml
michalkucharczyk Mar 4, 2024
6797ec4
fixes
michalkucharczyk Mar 4, 2024
461998e
minor fixes
michalkucharczyk Mar 5, 2024
2d468dd
Merge remote-tracking branch 'origin/master' into mku-k256-in-core-cr…
michalkucharczyk Mar 5, 2024
237b155
Merge branch 'master' into mku-k256-in-core-crypto-ecdsa
michalkucharczyk Mar 6, 2024
2349f61
Merge branch 'master' into mku-k256-in-core-crypto-ecdsa
michalkucharczyk Mar 8, 2024
c6d3bf2
Update substrate/primitives/core/src/ecdsa.rs
michalkucharczyk Mar 8, 2024
38de881
Update substrate/primitives/core/Cargo.toml
michalkucharczyk Mar 8, 2024
b5ddea9
Merge branch 'master' into mku-k256-in-core-crypto-ecdsa
michalkucharczyk Mar 8, 2024
b7b215a
Revert "Update substrate/primitives/core/Cargo.toml"
michalkucharczyk Mar 8, 2024
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
27 changes: 21 additions & 6 deletions Cargo.lock

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

18 changes: 13 additions & 5 deletions substrate/primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ blake2 = { version = "0.10.4", default-features = false, optional = true }
libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true }
schnorrkel = { version = "0.11.4", features = ["preaudit_deprecated"], default-features = false }
merlin = { version = "3.0", default-features = false }
secp256k1 = { version = "0.28.0", default-features = false, features = ["alloc", "recovery"], optional = true }
sp-crypto-hashing = { path = "../crypto/hashing", default-features = false, optional = true }
sp-runtime-interface = { path = "../runtime-interface", default-features = false }
k256 = { version = "0.13.3", features = ["alloc", "ecdsa"], default-features = false, optional = true }
secp256k1 = { version = "0.28.0", default-features = false, features = ["alloc", "recovery"], optional = true }

# bls crypto
w3f-bls = { version = "0.1.3", default-features = false, optional = true }
Expand All @@ -75,7 +76,15 @@ harness = false
bench = false

[features]
default = ["std"]
default = ["backend_secp256k1", "std"]

# use secp256k1 crate, better performance, intended to be used on host side
backend_secp256k1 = [
michalkucharczyk marked this conversation as resolved.
Show resolved Hide resolved
"secp256k1/global-context",
"secp256k1/std",
]
# use k256 crate, better portability, intended to be used in substrate-runtimes
backend_k256 = ["k256"]
std = [
"array-bytes",
"bandersnatch_vrfs?/std",
Expand All @@ -94,6 +103,7 @@ std = [
"hash256-std-hasher/std",
"impl-serde/std",
"itertools",
"k256/std",
michalkucharczyk marked this conversation as resolved.
Show resolved Hide resolved
"libsecp256k1/std",
"log/std",
"merlin/std",
Expand All @@ -105,8 +115,6 @@ std = [
"rand",
"scale-info/std",
"schnorrkel/std",
"secp256k1/global-context",
"secp256k1/std",
"secrecy/alloc",
"serde/std",
"sp-crypto-hashing/std",
Expand All @@ -132,6 +140,7 @@ serde = [
"bs58/alloc",
"dep:serde",
"impl-serde",
"k256/serde",
"primitive-types/serde_no_std",
"scale-info/serde",
"secrecy/alloc",
Expand All @@ -147,7 +156,6 @@ full_crypto = [
"blake2",
"ed25519-zebra",
"libsecp256k1",
"secp256k1",
"sp-crypto-hashing",
"sp-runtime-interface/disable_target_static_assertions",
]
Expand Down
Loading
Loading