diff --git a/Cargo.lock b/Cargo.lock index 6a77e543060..344ebdecef5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6739,8 +6739,8 @@ dependencies = [ "ic-crypto-internal-seed", "ic-crypto-internal-test-vectors", "ic-crypto-internal-threshold-sig-bls12381", - "ic-crypto-internal-threshold-sig-ecdsa", - "ic-crypto-internal-threshold-sig-ecdsa-test-utils", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", + "ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils", "ic-crypto-internal-tls", "ic-crypto-internal-types", "ic-crypto-node-key-generation", @@ -7089,8 +7089,8 @@ dependencies = [ "ic-crypto-internal-seed", "ic-crypto-internal-test-vectors", "ic-crypto-internal-threshold-sig-bls12381", - "ic-crypto-internal-threshold-sig-ecdsa", - "ic-crypto-internal-threshold-sig-ecdsa-test-utils", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", + "ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils", "ic-crypto-internal-tls", "ic-crypto-internal-types", "ic-crypto-node-key-generation", @@ -7293,7 +7293,7 @@ dependencies = [ ] [[package]] -name = "ic-crypto-internal-threshold-sig-ecdsa" +name = "ic-crypto-internal-threshold-sig-canister-threshold-sig" version = "0.9.0" dependencies = [ "assert_matches", @@ -7307,7 +7307,7 @@ dependencies = [ "hex-literal", "ic-crypto-internal-hmac", "ic-crypto-internal-seed", - "ic-crypto-internal-threshold-sig-ecdsa-test-utils", + "ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils", "ic-crypto-internal-types", "ic-crypto-secrets-containers", "ic-crypto-sha2", @@ -7329,12 +7329,12 @@ dependencies = [ ] [[package]] -name = "ic-crypto-internal-threshold-sig-ecdsa-test-utils" +name = "ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils" version = "0.9.0" dependencies = [ "assert_matches", "ed25519-dalek", - "ic-crypto-internal-threshold-sig-ecdsa", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", "ic-crypto-sha2", "ic-types", "k256", @@ -7394,7 +7394,7 @@ dependencies = [ "ic-crypto-internal-csp", "ic-crypto-internal-csp-test-utils", "ic-crypto-internal-logmon", - "ic-crypto-internal-threshold-sig-ecdsa", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", "ic-crypto-internal-types", "ic-crypto-node-key-validation", "ic-crypto-temp-crypto", @@ -7427,7 +7427,7 @@ dependencies = [ "ic-crypto-internal-basic-sig-ed25519", "ic-crypto-internal-multi-sig-bls12381", "ic-crypto-internal-threshold-sig-bls12381", - "ic-crypto-internal-threshold-sig-ecdsa", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", "ic-crypto-internal-types", "ic-crypto-test-utils-keys", "ic-crypto-tls-cert-validation", @@ -7590,7 +7590,7 @@ dependencies = [ name = "ic-crypto-test-utils-canister-threshold-sigs" version = "0.9.0" dependencies = [ - "ic-crypto-internal-threshold-sig-ecdsa", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", "ic-crypto-temp-crypto", "ic-interfaces", "ic-logger", @@ -7613,7 +7613,7 @@ dependencies = [ "ic-base-types", "ic-crypto-internal-csp", "ic-crypto-internal-threshold-sig-bls12381", - "ic-crypto-internal-threshold-sig-ecdsa", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", "ic-crypto-internal-types", "ic-crypto-node-key-validation", "ic-crypto-tls-interfaces", @@ -7653,7 +7653,7 @@ dependencies = [ "ic-crypto-internal-csp", "ic-crypto-internal-seed", "ic-crypto-internal-threshold-sig-bls12381", - "ic-crypto-internal-threshold-sig-ecdsa", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", "ic-crypto-internal-types", "ic-crypto-node-key-validation", "ic-crypto-tls-interfaces", @@ -7845,7 +7845,7 @@ dependencies = [ name = "ic-crypto-utils-canister-threshold-sig" version = "0.9.0" dependencies = [ - "ic-crypto-internal-threshold-sig-ecdsa", + "ic-crypto-internal-threshold-sig-canister-threshold-sig", "ic-types", ] diff --git a/Cargo.toml b/Cargo.toml index b3aa135a3db..0f5f9ced6a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,8 +74,8 @@ members = [ "rs/crypto/secp256k1", "rs/crypto/secrets_containers", "rs/crypto/internal/crypto_lib/threshold_sig/bls12_381", - "rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", - "rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils", + "rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", + "rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils", "rs/crypto/internal/crypto_lib/tls", "rs/crypto/internal/crypto_lib/types", "rs/crypto/internal/crypto_service_provider", diff --git a/rs/crypto/BUILD.bazel b/rs/crypto/BUILD.bazel index d38b3717a8d..db9188c218f 100644 --- a/rs/crypto/BUILD.bazel +++ b/rs/crypto/BUILD.bazel @@ -19,7 +19,7 @@ DEPENDENCIES = [ "//rs/crypto/internal/crypto_lib/basic_sig/ed25519", "//rs/crypto/internal/crypto_lib/seed", "//rs/crypto/internal/crypto_lib/threshold_sig/bls12_381", - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/internal/crypto_lib/types", "//rs/crypto/internal/crypto_service_provider", "//rs/crypto/internal/logmon", @@ -64,7 +64,7 @@ DEV_DEPENDENCIES = [ "//rs/crypto/internal/crypto_lib/basic_sig/ecdsa_secp256k1", "//rs/crypto/internal/crypto_lib/basic_sig/ecdsa_secp256r1", "//rs/crypto/internal/crypto_lib/basic_sig/rsa_pkcs1", - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils", "//rs/crypto/internal/crypto_lib/tls", "//rs/crypto/internal/crypto_service_provider/csp_proptest_utils", "//rs/crypto/internal/csp_test_utils", diff --git a/rs/crypto/Cargo.toml b/rs/crypto/Cargo.toml index cc7ea14ef56..3dc8b1827af 100644 --- a/rs/crypto/Cargo.toml +++ b/rs/crypto/Cargo.toml @@ -24,7 +24,7 @@ ic-crypto-internal-csp = { path = "internal/crypto_service_provider" } ic-crypto-internal-logmon = { path = "internal/logmon" } ic-crypto-internal-seed = { path = "internal/crypto_lib/seed" } ic-crypto-internal-threshold-sig-bls12381 = { path = "internal/crypto_lib/threshold_sig/bls12_381" } -ic-crypto-internal-threshold-sig-ecdsa = { path = "internal/crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "internal/crypto_lib/threshold_sig/canister_threshold_sig" } ic-crypto-internal-types = { path = "internal/crypto_lib/types" } ic-crypto-standalone-sig-verifier = { path = "standalone-sig-verifier" } ic-crypto-tls-cert-validation = { path = "node_key_validation/tls_cert_validation" } @@ -60,7 +60,7 @@ ic-crypto-internal-basic-sig-rsa-pkcs1 = { path = "internal/crypto_lib/basic_sig ic-crypto-internal-csp-proptest-utils = { path = "internal/crypto_service_provider/csp_proptest_utils" } ic-crypto-internal-csp-test-utils = { path = "internal/csp_test_utils" } ic-crypto-internal-test-vectors = { path = "internal/test_vectors" } -ic-crypto-internal-threshold-sig-ecdsa-test-utils = { path = "internal/crypto_lib/threshold_sig/tecdsa/test_utils" } +ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils = { path = "internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils" } ic-crypto-internal-tls = { path = "internal/crypto_lib/tls" } ic-crypto-node-key-generation = { path = "node_key_generation" } ic-crypto-node-key-validation = { path = "node_key_validation" } diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/BUILD.bazel b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/BUILD.bazel similarity index 84% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/BUILD.bazel rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/BUILD.bazel index 7d40737b129..9900a6e814e 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/BUILD.bazel +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/BUILD.bazel @@ -30,14 +30,14 @@ DEPENDENCIES = [ MACRO_DEPENDENCIES = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive", "@crate_index//:paste", "@crate_index//:strum_macros", ] DEV_DEPENDENCIES = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils", "//rs/crypto/test_utils/reproducible_rng", "@crate_index//:assert_matches", "@crate_index//:bip32", @@ -51,10 +51,10 @@ MACRO_DEV_DEPENDENCIES = [] ALIASES = {} rust_library( - name = "tecdsa", + name = "canister_threshold_sig", srcs = glob(["src/**"]), aliases = ALIASES, - crate_name = "ic_crypto_internal_threshold_sig_ecdsa", + crate_name = "ic_crypto_internal_threshold_sig_canister_threshold_sig", proc_macro_deps = MACRO_DEPENDENCIES, rustc_flags = select({ "//bazel:fuzzing_code_enabled": DEFAULT_RUSTC_FLAGS_FOR_FUZZING, @@ -65,9 +65,9 @@ rust_library( ) rust_test( - name = "tecdsa_test", + name = "canister_threshold_sig_test", aliases = ALIASES, - crate = ":tecdsa", + crate = ":canister_threshold_sig", proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES, deps = DEPENDENCIES + DEV_DEPENDENCIES, ) @@ -80,7 +80,7 @@ rust_test_suite( aliases = ALIASES, compile_data = glob(["tests/data/*"]), proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES, - deps = [":tecdsa"] + DEPENDENCIES + DEV_DEPENDENCIES, + deps = [":canister_threshold_sig"] + DEPENDENCIES + DEV_DEPENDENCIES, ) rust_bench( @@ -89,7 +89,7 @@ rust_bench( srcs = ["benches/dealings.rs"], deps = [ # Keep sorted. - ":tecdsa", + ":canister_threshold_sig", "//rs/crypto/test_utils/reproducible_rng", "//rs/rust_canisters/canister_test", "//rs/types/types", @@ -104,7 +104,7 @@ rust_bench( srcs = ["benches/group_ops.rs"], deps = [ # Keep sorted. - ":tecdsa", + ":canister_threshold_sig", "//rs/crypto/test_utils/reproducible_rng", "@crate_index//:criterion", "@crate_index//:rand", @@ -117,7 +117,7 @@ rust_bench( srcs = ["benches/hash2curve.rs"], deps = [ # Keep sorted. - ":tecdsa", + ":canister_threshold_sig", "@crate_index//:criterion", ], ) @@ -128,7 +128,7 @@ rust_bench( srcs = ["benches/key_derivation.rs"], deps = [ # Keep sorted. - ":tecdsa", + ":canister_threshold_sig", "//rs/crypto/test_utils/reproducible_rng", "//rs/types/types", "@crate_index//:criterion", @@ -142,7 +142,7 @@ rust_bench( srcs = ["benches/poly.rs"], deps = [ # Keep sorted. - ":tecdsa", + ":canister_threshold_sig", "//rs/crypto/test_utils/reproducible_rng", "@crate_index//:criterion", "@crate_index//:rand", @@ -155,7 +155,7 @@ rust_bench( srcs = ["benches/zk.rs"], deps = [ # Keep sorted. - ":tecdsa", + ":canister_threshold_sig", "//rs/crypto/test_utils/reproducible_rng", "@crate_index//:criterion", "@crate_index//:rand", diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/Cargo.toml b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/Cargo.toml similarity index 91% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/Cargo.toml rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/Cargo.toml index 35fab0ca3b6..1272d9bb9e6 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/Cargo.toml +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ic-crypto-internal-threshold-sig-ecdsa" +name = "ic-crypto-internal-threshold-sig-canister-threshold-sig" version.workspace = true authors.workspace = true edition.workspace = true @@ -38,7 +38,7 @@ assert_matches = { workspace = true } bip32 = { version = "0.5", features = ["secp256k1"] } criterion = { workspace = true } ed25519-dalek = { workspace = true } -ic-crypto-internal-threshold-sig-ecdsa-test-utils = { path = "test_utils" } +ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils = { path = "test_utils" } ic-crypto-test-utils-reproducible-rng = { path = "../../../../test_utils/reproducible_rng" } num-traits = { workspace = true } strum = { workspace = true } diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/dealings.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/dealings.rs similarity index 95% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/dealings.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/dealings.rs index 1103228ac6c..9bb87b31e17 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/dealings.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/dealings.rs @@ -1,5 +1,5 @@ use criterion::*; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use ic_types::crypto::AlgorithmId; use ic_types::NumberOfNodes; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/group_ops.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/group_ops.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/group_ops.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/group_ops.rs index ac6a79970d6..202e79d23bd 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/group_ops.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/group_ops.rs @@ -1,5 +1,5 @@ use criterion::*; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::{CryptoRng, Rng}; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/hash2curve.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/hash2curve.rs similarity index 93% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/hash2curve.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/hash2curve.rs index b4d79394f10..b4fb2b31864 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/hash2curve.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/hash2curve.rs @@ -1,5 +1,5 @@ use criterion::*; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; fn hash2curve(c: &mut Criterion) { let input = "greetings humans".as_bytes(); diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/key_derivation.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/key_derivation.rs similarity index 96% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/key_derivation.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/key_derivation.rs index 64e25a51a6e..8f57b45b178 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/key_derivation.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/key_derivation.rs @@ -1,5 +1,5 @@ use criterion::*; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use ic_types::crypto::canister_threshold_sig::MasterPublicKey; use ic_types::crypto::AlgorithmId; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/poly.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/poly.rs similarity index 98% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/poly.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/poly.rs index 9ec4d3f8411..22cfc868747 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/poly.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/poly.rs @@ -1,5 +1,5 @@ use criterion::*; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::{CryptoRng, Rng}; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/zk.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/zk.rs similarity index 97% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/zk.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/zk.rs index b4b303c4674..bc8090e47f5 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/benches/zk.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/benches/zk.rs @@ -1,5 +1,5 @@ use criterion::*; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::Rng; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/BUILD.bazel b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/BUILD.bazel similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/BUILD.bazel rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/BUILD.bazel diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/Cargo.lock b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/Cargo.lock similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/Cargo.lock rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/Cargo.lock diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/Cargo.toml b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/Cargo.toml similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/Cargo.toml rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/Cargo.toml diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/src/lib.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/src/lib.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fe-derive/src/lib.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fe-derive/src/lib.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/.gitignore b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/.gitignore similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/.gitignore rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/.gitignore diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/BUILD.bazel b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/BUILD.bazel similarity index 93% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/BUILD.bazel rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/BUILD.bazel index e1a91fb7fa2..30c1929e5f1 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/BUILD.bazel +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/BUILD.bazel @@ -4,7 +4,7 @@ package(default_visibility = ["//visibility:private"]) DEPENDENCIES = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "@crate_index//:arbitrary", "@crate_index//:hex", "@crate_index//:libfuzzer-sys", diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/Cargo.toml b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/Cargo.toml similarity index 81% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/Cargo.toml rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/Cargo.toml index a7edf1f7f39..f4ac4b228c8 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/Cargo.toml +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "tecdsa-fuzz" +name = "canister-threshold-sig-fuzz" version = "0.0.0" publish = false authors.workspace = true @@ -16,7 +16,7 @@ libfuzzer-sys = "0.4" num-bigint = { workspace = true } subtle = "2.4" -[dependencies.ic-crypto-internal-threshold-sig-ecdsa] +[dependencies.ic-crypto-internal-threshold-sig-canister-threshold-sig] path = ".." # Prevent this from interfering with workspaces diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/cbor_deserialize_dealing_seed_corpus/BUILD.bazel b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/cbor_deserialize_dealing_seed_corpus/BUILD.bazel similarity index 91% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/cbor_deserialize_dealing_seed_corpus/BUILD.bazel rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/cbor_deserialize_dealing_seed_corpus/BUILD.bazel index 4d96745750a..f6863e120fa 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/cbor_deserialize_dealing_seed_corpus/BUILD.bazel +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/cbor_deserialize_dealing_seed_corpus/BUILD.bazel @@ -4,7 +4,7 @@ package(default_visibility = ["//visibility:private"]) DEPENDENCIES = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/types/types", "@crate_index//:assert_matches", "@crate_index//:clap", diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/cbor_deserialize_dealing_seed_corpus/src/main.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/cbor_deserialize_dealing_seed_corpus/src/main.rs similarity index 98% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/cbor_deserialize_dealing_seed_corpus/src/main.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/cbor_deserialize_dealing_seed_corpus/src/main.rs index fd993f0ebe9..361286e6278 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/cbor_deserialize_dealing_seed_corpus/src/main.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/cbor_deserialize_dealing_seed_corpus/src/main.rs @@ -1,5 +1,5 @@ use clap::Parser; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_types::crypto::AlgorithmId; use ic_types::NumberOfNodes; use rand::thread_rng; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/cbor_deserialize_dealing.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/cbor_deserialize_dealing.rs similarity index 93% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/cbor_deserialize_dealing.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/cbor_deserialize_dealing.rs index 87fba4d8c6c..d29db37861e 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/cbor_deserialize_dealing.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/cbor_deserialize_dealing.rs @@ -1,7 +1,7 @@ #![no_main] use libfuzzer_sys::fuzz_target; -use ic_crypto_internal_threshold_sig_ecdsa::IDkgDealingInternal; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::IDkgDealingInternal; // This fuzzer tries to find panics in CBOR deserialization of dealings. We ignore errors // returned by the decoding, as these do not lead to panics. You can run the fuzzer locally: diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/cbor_deserialize_ecc_point.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/cbor_deserialize_ecc_point.rs similarity index 87% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/cbor_deserialize_ecc_point.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/cbor_deserialize_ecc_point.rs index 74cdcc8e29e..62442ec0fc3 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/cbor_deserialize_ecc_point.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/cbor_deserialize_ecc_point.rs @@ -1,7 +1,7 @@ #![no_main] use libfuzzer_sys::fuzz_target; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, EccPoint}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{EccCurveType, EccPoint}; // This fuzzer tries to find panics in CBOR deserialization of ECC points. We ignore errors // returned by the decoding, as these do not lead to panics. You can run the fuzzer locally: diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/hash_to_point.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/hash_to_point.rs similarity index 88% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/hash_to_point.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/hash_to_point.rs index 5969e0c0eb3..42ffb9af2e9 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/hash_to_point.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/hash_to_point.rs @@ -2,7 +2,7 @@ use arbitrary::{Arbitrary, Unstructured}; use libfuzzer_sys::fuzz_target; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, EccPoint}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{EccCurveType, EccPoint}; // This fuzzer tries to find panics in hashing to ECC points. We ignore errors // returned by the function, as these do not lead to panics. You can run the fuzzer locally: diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/scalar.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/scalar.rs similarity index 96% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/scalar.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/scalar.rs index d3189708e8a..dd422c435b4 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/fuzz/fuzz_targets/scalar.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/fuzz/fuzz_targets/scalar.rs @@ -1,7 +1,7 @@ #![no_main] use libfuzzer_sys::fuzz_target; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use num_bigint::BigUint; fn prime_for(curve: EccCurveType) -> BigUint { diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/domain_sep.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/domain_sep.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/domain_sep.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/domain_sep.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/complaints.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/complaints.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/complaints.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/complaints.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/dealings.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/dealings.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/dealings.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/dealings.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/mega.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/mega.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/mega.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/mega.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/mega/tests.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/mega/tests.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/mega/tests.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/mega/tests.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/transcript.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/transcript.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/transcript.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/transcript.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/zk.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/zk.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/idkg/zk.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/idkg/zk.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/lib.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/lib.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/lib.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/lib.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/bip340.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/bip340.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/bip340.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/bip340.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/ecdsa.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/ecdsa.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/ecdsa.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/ecdsa.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/eddsa.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/eddsa.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/eddsa.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/eddsa.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/key_derivation.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/key_derivation.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/signing/key_derivation.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/signing/key_derivation.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/test_utils.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/test_utils.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/test_utils.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/test_utils.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/algos.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/algos.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/algos.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/algos.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/ed25519.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/ed25519.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/ed25519.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/ed25519.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/secp256k1.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/secp256k1.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/secp256k1.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/secp256k1.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/secp256r1.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/secp256r1.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/secp256r1.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/secp256r1.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/tests.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/tests.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/group/tests.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/group/tests.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/poly.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/poly.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/poly.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/poly.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/ro.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/ro.rs similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/src/utils/ro.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/src/utils/ro.rs diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/BUILD.bazel b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/BUILD.bazel similarity index 77% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/BUILD.bazel rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/BUILD.bazel index 593f404a8cc..ffb50963629 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/BUILD.bazel +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/BUILD.bazel @@ -6,11 +6,11 @@ rust_library( name = "test_utils", testonly = True, srcs = glob(["src/**"]), - crate_name = "ic_crypto_internal_threshold_sig_ecdsa_test_utils", + crate_name = "ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils", version = "0.1.0", deps = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/sha2", "//rs/types/types", "@crate_index//:assert_matches", diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/Cargo.toml b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/Cargo.toml similarity index 75% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/Cargo.toml rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/Cargo.toml index 25e5c5fab34..f9e1b15e1de 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/Cargo.toml +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ic-crypto-internal-threshold-sig-ecdsa-test-utils" +name = "ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils" version.workspace = true authors.workspace = true edition.workspace = true @@ -9,7 +9,7 @@ documentation.workspace = true [dependencies] assert_matches = { workspace = true } ed25519-dalek = { workspace = true } -ic-crypto-internal-threshold-sig-ecdsa = { path = ".." } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = ".." } ic-crypto-sha2 = { path = "../../../../../sha2" } ic-types = { path = "../../../../../../types/types" } k256 = { workspace = true } diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/src/lib.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/src/lib.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/src/lib.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/src/lib.rs index a12f5d0705d..6649d84f4ba 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils/src/lib.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils/src/lib.rs @@ -1,11 +1,11 @@ -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ EccCurveType, EccPoint, EccScalar, PedersenCommitment, PolynomialCommitment, PolynomialCommitmentType, SimpleCommitment, }; use rand::{CryptoRng, Rng}; use assert_matches::assert_matches; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_types::crypto::canister_threshold_sig::MasterPublicKey; use ic_types::crypto::AlgorithmId; use ic_types::{NumberOfNodes, Randomness}; @@ -862,8 +862,11 @@ pub fn compute_public_key( algorithm_id: alg, public_key: key_transcript.constant_term().serialize(), }; - ic_crypto_internal_threshold_sig_ecdsa::derive_threshold_public_key(&master_public_key, path) - .map_err(|e| CanisterThresholdError::InvalidArguments(format!("{:?}", e))) + ic_crypto_internal_threshold_sig_canister_threshold_sig::derive_threshold_public_key( + &master_public_key, + path, + ) + .map_err(|e| CanisterThresholdError::InvalidArguments(format!("{:?}", e))) } #[derive(Clone, Debug)] diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/complaints.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/complaints.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/complaints.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/complaints.rs index 0963a9bc045..9742720dc60 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/complaints.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/complaints.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::Rng; use std::collections::BTreeMap; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/complaint.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/complaint.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/complaint.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/complaint.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_multiply.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_multiply.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_multiply.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_multiply.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_random.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_random.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_random.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_random.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_random_unmasked.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_random_unmasked.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_random_unmasked.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_random_unmasked.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_reshare_of_masked.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_reshare_of_masked.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_reshare_of_masked.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_reshare_of_masked.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_reshare_of_unmasked.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_reshare_of_unmasked.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/dealing_reshare_of_unmasked.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/dealing_reshare_of_unmasked.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/opening_pedersen.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/opening_pedersen.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/opening_pedersen.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/opening_pedersen.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/opening_simple.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/opening_simple.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/opening_simple.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/opening_simple.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/sig_share.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/sig_share.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/sig_share.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/sig_share.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_multiply.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_multiply.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_multiply.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_multiply.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_random.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_random.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_random.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_random.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_random_unmasked.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_random_unmasked.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_random_unmasked.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_random_unmasked.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_reshare_of_masked.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_reshare_of_masked.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_reshare_of_masked.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_reshare_of_masked.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_reshare_of_unmasked.hex b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_reshare_of_unmasked.hex similarity index 100% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/data/transcript_reshare_of_unmasked.hex rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/data/transcript_reshare_of_unmasked.hex diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/dealings.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/dealings.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/dealings.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/dealings.rs index c570ce6d350..dca84c139e3 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/dealings.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/dealings.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use ic_types::crypto::AlgorithmId; use ic_types::NumberOfNodes; @@ -560,7 +560,7 @@ mod privately_verify { mod privately_verify_dealing { use super::*; - use ic_crypto_internal_threshold_sig_ecdsa::privately_verify_dealing; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::privately_verify_dealing; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use ic_types::crypto::AlgorithmId; use strum::IntoEnumIterator; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/group.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/group.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/group.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/group.rs index 00e9c4214d1..4632f4e79c3 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/group.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/group.rs @@ -1,5 +1,5 @@ use hex_literal::hex; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::{Rng, RngCore}; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/hash2curve.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/hash2curve.rs similarity index 98% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/hash2curve.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/hash2curve.rs index a435a782894..c0c291cabee 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/hash2curve.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/hash2curve.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; #[test] fn test_hash2curve_kat_p256() -> Result<(), CanisterThresholdError> { diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/key_derivation.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/key_derivation.rs similarity index 98% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/key_derivation.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/key_derivation.rs index 285c36693b9..8962f68614a 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/key_derivation.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/key_derivation.rs @@ -1,10 +1,10 @@ use assert_matches::assert_matches; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::Rng; use std::convert::{TryFrom, TryInto}; -use ic_crypto_internal_threshold_sig_ecdsa_test_utils::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils::*; #[test] fn verify_bip32_extended_key_derivation_max_length_enforced() -> Result<(), CanisterThresholdError> @@ -477,7 +477,10 @@ fn key_derivation_on_unsupported_alg_fails() { let path = DerivationPath::new_bip32(&[1, 2, 3]); - let derived = ic_crypto_internal_threshold_sig_ecdsa::derive_threshold_public_key(&mpk, &path); + let derived = + ic_crypto_internal_threshold_sig_canister_threshold_sig::derive_threshold_public_key( + &mpk, &path, + ); assert_matches!( derived, diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/mega.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/mega.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/mega.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/mega.rs index 8078e9f55a4..d2c56142da1 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/mega.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/mega.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use std::convert::TryFrom; use strum::IntoEnumIterator; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/poly.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/poly.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/poly.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/poly.rs index d94b9ec84da..1e8b2563e42 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/poly.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/poly.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::Rng; diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/protocol.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/protocol.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/protocol.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/protocol.rs index 781760407e0..124fc0c0dc9 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/protocol.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/protocol.rs @@ -1,11 +1,11 @@ use assert_matches::assert_matches; -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use ic_types::Randomness; use rand::{Rng, RngCore}; use std::collections::BTreeMap; -use ic_crypto_internal_threshold_sig_ecdsa_test_utils::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils::*; fn insufficient_dealings(r: Result) { match r { diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/ro.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/ro.rs similarity index 98% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/ro.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/ro.rs index d1dee8e8166..774f3c2d9bd 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/ro.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/ro.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; #[test] fn test_random_oracle_stability() -> CanisterThresholdResult<()> { diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/serialization.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/serialization.rs similarity index 99% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/serialization.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/serialization.rs index ed10de97a03..165b50cc8d9 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/serialization.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/serialization.rs @@ -1,9 +1,9 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::{CryptoRng, Rng}; use std::collections::BTreeMap; -use ic_crypto_internal_threshold_sig_ecdsa_test_utils::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils::*; fn verify_data(tag: String, expected_hash: &str, serialized: &[u8]) { /* diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/verify_transcript.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/verify_transcript.rs similarity index 97% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/verify_transcript.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/verify_transcript.rs index 1adc55abc44..7240a31e00c 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/verify_transcript.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/verify_transcript.rs @@ -1,7 +1,7 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; -use ic_crypto_internal_threshold_sig_ecdsa_test_utils::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils::*; fn remove_dealing_and_verify( node_index: NodeIndex, diff --git a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/zk.rs b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/zk.rs similarity index 98% rename from rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/zk.rs rename to rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/zk.rs index 6fdfce20dd8..14cb6fa7bc2 100644 --- a/rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/tests/zk.rs +++ b/rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/tests/zk.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::*; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::*; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use rand::Rng; use strum::IntoEnumIterator; diff --git a/rs/crypto/internal/crypto_service_provider/BUILD.bazel b/rs/crypto/internal/crypto_service_provider/BUILD.bazel index d4c241488aa..18f657f8daf 100644 --- a/rs/crypto/internal/crypto_service_provider/BUILD.bazel +++ b/rs/crypto/internal/crypto_service_provider/BUILD.bazel @@ -19,7 +19,7 @@ DEPENDENCIES = [ "//rs/crypto/internal/crypto_lib/multi_sig/bls12_381", "//rs/crypto/internal/crypto_lib/seed", "//rs/crypto/internal/crypto_lib/threshold_sig/bls12_381", - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/internal/crypto_lib/tls", "//rs/crypto/internal/crypto_lib/types", "//rs/crypto/internal/logmon", @@ -66,7 +66,7 @@ DEPENDENCIES = [ DEV_DEPENDENCIES = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa/test_utils", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig/test_utils", "//rs/crypto/internal/crypto_service_provider/csp_proptest_utils", "//rs/crypto/internal/csp_test_utils", "//rs/crypto/node_key_generation", diff --git a/rs/crypto/internal/crypto_service_provider/Cargo.toml b/rs/crypto/internal/crypto_service_provider/Cargo.toml index e58e49f4327..cae3b7e6544 100644 --- a/rs/crypto/internal/crypto_service_provider/Cargo.toml +++ b/rs/crypto/internal/crypto_service_provider/Cargo.toml @@ -24,7 +24,7 @@ ic-crypto-internal-multi-sig-bls12381 = { path = "../crypto_lib/multi_sig/bls12_ ic-crypto-internal-seed = { path = "../crypto_lib/seed" } ic-crypto-internal-test-vectors = { path = "../test_vectors" } ic-crypto-internal-threshold-sig-bls12381 = { path = "../crypto_lib/threshold_sig/bls12_381" } -ic-crypto-internal-threshold-sig-ecdsa = { path = "../crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "../crypto_lib/threshold_sig/canister_threshold_sig" } ic-crypto-internal-tls = { path = "../crypto_lib/tls" } ic-crypto-internal-types = { path = "../crypto_lib/types" } ic-crypto-node-key-validation = { path = "../../../crypto/node_key_validation" } @@ -66,7 +66,7 @@ assert_matches = { workspace = true } ic-crypto-internal-csp-proptest-utils = { path = "./csp_proptest_utils" } ic-crypto-internal-csp-protobuf-generator = { path = "./protobuf_generator" } ic-crypto-internal-csp-test-utils = { path = "../csp_test_utils" } -ic-crypto-internal-threshold-sig-ecdsa-test-utils = { path = "../crypto_lib/threshold_sig/tecdsa/test_utils" } +ic-crypto-internal-threshold-sig-canister-threshold-sig-test-utils = { path = "../crypto_lib/threshold_sig/canister_threshold_sig/test_utils" } ic-crypto-node-key-generation = { path = "../../node_key_generation" } ic-crypto-temp-crypto-vault = { path = "../../temp_crypto/temp_vault" } ic-crypto-test-utils = { path = "../../test_utils" } diff --git a/rs/crypto/internal/crypto_service_provider/src/api/canister_threshold/errors.rs b/rs/crypto/internal/crypto_service_provider/src/api/canister_threshold/errors.rs index 439fc3534d1..d134672795c 100644 --- a/rs/crypto/internal/crypto_service_provider/src/api/canister_threshold/errors.rs +++ b/rs/crypto/internal/crypto_service_provider/src/api/canister_threshold/errors.rs @@ -1,6 +1,6 @@ //! Errors encountered during CSP canister threshold signature operations. use crate::KeyId; -use ic_crypto_internal_threshold_sig_ecdsa::CanisterThresholdSerializationError; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::CanisterThresholdSerializationError; use ic_interfaces::crypto::IDkgDealingEncryptionKeyRotationError; use serde::{Deserialize, Serialize}; diff --git a/rs/crypto/internal/crypto_service_provider/src/key_id/mod.rs b/rs/crypto/internal/crypto_service_provider/src/key_id/mod.rs index 70203f97dd4..b50f3ffc2d8 100644 --- a/rs/crypto/internal/crypto_service_provider/src/key_id/mod.rs +++ b/rs/crypto/internal/crypto_service_provider/src/key_id/mod.rs @@ -1,6 +1,8 @@ use crate::CspPublicKey; use hex::FromHex; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, MEGaPublicKey, PolynomialCommitment}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + EccCurveType, MEGaPublicKey, PolynomialCommitment, +}; use ic_crypto_internal_types::encrypt::forward_secure::CspFsEncryptionPublicKey; use ic_crypto_internal_types::sign::threshold_sig::public_coefficients::CspPublicCoefficients; use ic_crypto_sha2::{Context, DomainSeparationContext, Sha256}; diff --git a/rs/crypto/internal/crypto_service_provider/src/key_id/tests.rs b/rs/crypto/internal/crypto_service_provider/src/key_id/tests.rs index 5d37d6010b4..d69ee0f87b0 100644 --- a/rs/crypto/internal/crypto_service_provider/src/key_id/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/key_id/tests.rs @@ -1,5 +1,7 @@ use crate::KeyId; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, EccPoint, MEGaPublicKey}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + EccCurveType, EccPoint, MEGaPublicKey, +}; use ic_crypto_internal_types::sign::threshold_sig::ni_dkg::ni_dkg_groth20_bls12_381::FsEncryptionPublicKey; #[test] @@ -23,8 +25,10 @@ mod stability_tests { use ic_crypto_internal_test_vectors::multi_bls12_381::TESTVEC_MULTI_BLS12_381_2_PK; use ic_crypto_internal_test_vectors::multi_bls12_381::TESTVEC_MULTI_BLS12_381_3_PK; use ic_crypto_internal_test_vectors::multi_bls12_381::TESTVEC_MULTI_BLS12_381_4_PK; - use ic_crypto_internal_threshold_sig_ecdsa::PedersenCommitment; - use ic_crypto_internal_threshold_sig_ecdsa::{PolynomialCommitment, SimpleCommitment}; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::PedersenCommitment; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + PolynomialCommitment, SimpleCommitment, + }; use ic_crypto_internal_types::curves::bls12_381; use ic_crypto_internal_types::encrypt::forward_secure::CspFsEncryptionPublicKey; use ic_crypto_internal_types::sign::threshold_sig::public_coefficients::bls12_381::PublicCoefficientsBytes; diff --git a/rs/crypto/internal/crypto_service_provider/src/keygen/fixtures.rs b/rs/crypto/internal/crypto_service_provider/src/keygen/fixtures.rs index 13fa378ac23..ae47f21fa4b 100644 --- a/rs/crypto/internal/crypto_service_provider/src/keygen/fixtures.rs +++ b/rs/crypto/internal/crypto_service_provider/src/keygen/fixtures.rs @@ -5,7 +5,7 @@ use ic_crypto_internal_multi_sig_bls12381::types::{PopBytes, PublicKeyBytes}; use ic_crypto_internal_test_vectors::unhex::hex_to_32_bytes; use ic_crypto_internal_test_vectors::unhex::hex_to_48_bytes; use ic_crypto_internal_test_vectors::unhex::hex_to_96_bytes; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, MEGaPublicKey}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{EccCurveType, MEGaPublicKey}; pub struct MultiBlsTestVector { pub seed: u64, diff --git a/rs/crypto/internal/crypto_service_provider/src/keygen/mod.rs b/rs/crypto/internal/crypto_service_provider/src/keygen/mod.rs index ca76f355060..800d61fa704 100644 --- a/rs/crypto/internal/crypto_service_provider/src/keygen/mod.rs +++ b/rs/crypto/internal/crypto_service_provider/src/keygen/mod.rs @@ -6,7 +6,7 @@ mod tests; /// Some key related utils pub mod utils { use crate::types::{CspPop, CspPublicKey}; - use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, MEGaPublicKey}; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::{EccCurveType, MEGaPublicKey}; use ic_crypto_internal_types::encrypt::forward_secure::{ CspFsEncryptionPop, CspFsEncryptionPublicKey, }; diff --git a/rs/crypto/internal/crypto_service_provider/src/secret_key_store/proto_store/tests.rs b/rs/crypto/internal/crypto_service_provider/src/secret_key_store/proto_store/tests.rs index d1de1795d6e..1e49c22b28c 100644 --- a/rs/crypto/internal/crypto_service_provider/src/secret_key_store/proto_store/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/secret_key_store/proto_store/tests.rs @@ -11,7 +11,7 @@ use ic_crypto_internal_basic_sig_ed25519::types as ed25519_types; use ic_crypto_internal_csp_test_utils::files::mk_temp_dir_with_permissions; use ic_crypto_internal_multi_sig_bls12381::types::SecretKeyBytes; use ic_crypto_internal_threshold_sig_bls12381::ni_dkg::types::CspFsEncryptionKeySet; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ EccCurveType, MEGaKeySetK256Bytes, MEGaPrivateKey, MEGaPrivateKeyK256Bytes, MEGaPublicKey, MEGaPublicKeyK256Bytes, }; diff --git a/rs/crypto/internal/crypto_service_provider/src/types.rs b/rs/crypto/internal/crypto_service_provider/src/types.rs index d3ca2b33d2e..9787408f139 100644 --- a/rs/crypto/internal/crypto_service_provider/src/types.rs +++ b/rs/crypto/internal/crypto_service_provider/src/types.rs @@ -14,7 +14,9 @@ use ic_crypto_internal_basic_sig_rsa_pkcs1 as rsa; use ic_crypto_internal_multi_sig_bls12381::types as multi_types; use ic_crypto_internal_threshold_sig_bls12381::ni_dkg::types::CspFsEncryptionKeySet; use ic_crypto_internal_threshold_sig_bls12381::types as threshold_types; -use ic_crypto_internal_threshold_sig_ecdsa::{CommitmentOpeningBytes, MEGaKeySetK256Bytes}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + CommitmentOpeningBytes, MEGaKeySetK256Bytes, +}; use ic_crypto_internal_tls::TlsEd25519SecretKeyDerBytes; use ic_protobuf::registry::crypto::v1::{PublicKey, X509PublicKeyCert}; use ic_types::crypto::AlgorithmId; @@ -26,7 +28,7 @@ pub mod conversions; mod external_conversion_utilities; #[cfg(test)] -use ic_crypto_internal_threshold_sig_ecdsa::EccScalarBytes; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::EccScalarBytes; #[cfg(test)] use proptest::prelude::*; #[cfg(test)] diff --git a/rs/crypto/internal/crypto_service_provider/src/types/test_utils.rs b/rs/crypto/internal/crypto_service_provider/src/types/test_utils.rs index 8093644057b..790decc20b3 100644 --- a/rs/crypto/internal/crypto_service_provider/src/types/test_utils.rs +++ b/rs/crypto/internal/crypto_service_provider/src/types/test_utils.rs @@ -11,7 +11,7 @@ use ic_crypto_internal_test_vectors::unhex::{ use ic_crypto_internal_threshold_sig_bls12381::ni_dkg::groth20_bls12_381::types as ni_dkg_types; use ic_crypto_internal_threshold_sig_bls12381::ni_dkg::groth20_bls12_381::types::FsEncryptionSecretKey; use ic_crypto_internal_threshold_sig_bls12381::types as threshold_sig_types; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ gen_keypair, CommitmentOpeningBytes, EccCurveType, EccScalarBytes, MEGaKeySetK256Bytes, MEGaPrivateKeyK256Bytes, MEGaPublicKeyK256Bytes, }; diff --git a/rs/crypto/internal/crypto_service_provider/src/types/tests.rs b/rs/crypto/internal/crypto_service_provider/src/types/tests.rs index 95a26140915..5a2a9beea4d 100644 --- a/rs/crypto/internal/crypto_service_provider/src/types/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/types/tests.rs @@ -12,7 +12,7 @@ use ic_crypto_internal_threshold_sig_bls12381::ni_dkg::groth20_bls12_381::types: BTENodeBytes, FsEncryptionKeySetWithPop, FsEncryptionSecretKey, }; use ic_crypto_internal_threshold_sig_bls12381::ni_dkg::types::CspFsEncryptionKeySet; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ EccCurveType, MEGaPrivateKey, MEGaPrivateKeyK256Bytes, MEGaPublicKeyK256Bytes, }; use ic_crypto_internal_types::curves::bls12_381::{FrBytes, G1Bytes, G2Bytes}; diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/api.rs b/rs/crypto/internal/crypto_service_provider/src/vault/api.rs index cf564bc4630..7be03c33e53 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/api.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/api.rs @@ -5,7 +5,7 @@ use crate::ExternalPublicKeys; use ic_crypto_internal_logmon::metrics::KeyCounts; use ic_crypto_internal_seed::Seed; use ic_crypto_internal_threshold_sig_bls12381::api::ni_dkg_errors; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CommitmentOpening, IDkgComplaintInternal, MEGaPublicKey, ThresholdEcdsaSigShareInternal, }; use ic_crypto_internal_types::encrypt::forward_secure::{ diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/mod.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/mod.rs index eee01f46402..aa5853f2ad8 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/mod.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/mod.rs @@ -17,7 +17,7 @@ use crate::vault::api::{ }; use crate::vault::local_csp_vault::LocalCspVault; use ic_crypto_internal_logmon::metrics::{MetricsDomain, MetricsResult, MetricsScope}; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ compute_secret_shares, compute_secret_shares_with_openings, create_dealing as clib_create_dealing, gen_keypair, generate_complaints, open_dealing, privately_verify_dealing, CommitmentOpening, CommitmentOpeningBytes, EccCurveType, diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs index 9a3325c944d..9b3c91c4041 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs @@ -43,7 +43,7 @@ mod idkg_gen_dealing_encryption_key_pair { use crate::KeyId; use hex::FromHex; use ic_crypto_internal_seed::Seed; - use ic_crypto_internal_threshold_sig_ecdsa::EccCurveType; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::EccCurveType; use ic_test_utilities_time::FastForwardTimeSource; use ic_types::time::GENESIS; use proptest::prelude::*; @@ -331,7 +331,7 @@ mod idkg_retain_active_keys { use crate::LocalCspVault; use crate::SecretKeyStore; use assert_matches::assert_matches; - use ic_crypto_internal_threshold_sig_ecdsa::MEGaPublicKey; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::MEGaPublicKey; use ic_crypto_internal_types::scope::{ConstScope, Scope}; use ic_crypto_test_utils_keys::public_keys::valid_idkg_dealing_encryption_public_key; use ic_protobuf::registry::crypto::v1::AlgorithmId as AlgorithmIdProto; @@ -877,10 +877,10 @@ mod idkg_create_dealing { use super::*; use crate::vault::api::{IDkgCreateDealingVaultError, IDkgDealingInternalBytes}; use assert_matches::assert_matches; - use ic_crypto_internal_threshold_sig_ecdsa::{ + use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CombinedCommitment, EccCurveType, IDkgTranscriptInternal, PolynomialCommitmentType, }; - use ic_crypto_internal_threshold_sig_ecdsa_test_utils::random_polynomial_commitment; + use ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils::random_polynomial_commitment; use ic_crypto_internal_types::NodeIndex; use ic_crypto_test_utils_canister_threshold_sigs::dummy_values::dummy_idkg_transcript_id_for_tests; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; @@ -1090,8 +1090,8 @@ mod idkg_load_transcript { use assert_matches::assert_matches; use ic_crypto_internal_basic_sig_ed25519::types as ed25519_types; use ic_crypto_internal_seed::Seed; - use ic_crypto_internal_threshold_sig_ecdsa::test_utils::corrupt_dealing; - use ic_crypto_internal_threshold_sig_ecdsa::{ + use ic_crypto_internal_threshold_sig_canister_threshold_sig::test_utils::corrupt_dealing; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ EccCurveType, EccPoint, EccScalar, IDkgComplaintInternal, IDkgTranscriptInternal, IDkgTranscriptOperationInternal, MEGaCiphertext, }; @@ -1491,8 +1491,8 @@ mod idkg_load_transcript_with_openings { use assert_matches::assert_matches; use ic_crypto_internal_basic_sig_ed25519::types as ed25519_types; use ic_crypto_internal_seed::Seed; - use ic_crypto_internal_threshold_sig_ecdsa::test_utils::corrupt_dealing; - use ic_crypto_internal_threshold_sig_ecdsa::{ + use ic_crypto_internal_threshold_sig_canister_threshold_sig::test_utils::corrupt_dealing; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ EccCurveType, EccPoint, EccScalar, IDkgTranscriptInternal, IDkgTranscriptOperationInternal, MEGaCiphertext, }; @@ -1916,7 +1916,9 @@ mod idkg_load_transcript_with_openings { mod idkg_open_dealing { use super::*; use crate::{types::CspSecretKey, vault::api::IDkgDealingInternalBytes}; - use ic_crypto_internal_threshold_sig_ecdsa::{CommitmentOpening, MEGaPublicKeyK256Bytes}; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + CommitmentOpening, MEGaPublicKeyK256Bytes, + }; use ic_types::{ crypto::{ canister_threshold_sig::{ diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/mod.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/mod.rs index 6216b5146b8..438e0794bf8 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/mod.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/mod.rs @@ -23,7 +23,9 @@ use crate::vault::api::ThresholdSchnorrCreateSigShareVaultError; use crate::{CspRwLock, KeyId}; use ic_crypto_internal_logmon::metrics::CryptoMetrics; use ic_crypto_internal_seed::Seed; -use ic_crypto_internal_threshold_sig_ecdsa::{CombinedCommitment, CommitmentOpening}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + CombinedCommitment, CommitmentOpening, +}; use ic_interfaces::time_source::{SysTimeSource, TimeSource}; use ic_logger::{new_logger, ReplicaLogger}; use ic_protobuf::registry::crypto::v1::PublicKey; diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/mod.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/mod.rs index af86e91ac36..5dcb9e5b347 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/mod.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/mod.rs @@ -3,7 +3,7 @@ use crate::secret_key_store::SecretKeyStore; use crate::vault::api::{IDkgTranscriptInternalBytes, ThresholdEcdsaSignerCspVault}; use crate::vault::local_csp_vault::LocalCspVault; use ic_crypto_internal_logmon::metrics::{MetricsDomain, MetricsResult, MetricsScope}; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ create_ecdsa_signature_share as tecdsa_sign_share, IDkgTranscriptInternal, ThresholdEcdsaSigShareInternal, }; diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/tests.rs index 219def56866..3b68cda3d1d 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tecdsa/tests.rs @@ -5,7 +5,7 @@ mod ecdsa_sign_share { use crate::vault::api::{IDkgTranscriptInternalBytes, ThresholdEcdsaSignerCspVault}; use crate::LocalCspVault; use assert_matches::assert_matches; - use ic_crypto_internal_threshold_sig_ecdsa::{ + use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CombinedCommitment, CommitmentOpeningBytes, EccCurveType, EccPoint, EccScalarBytes, IDkgTranscriptInternal, PolynomialCommitment, SimpleCommitment, ThresholdEcdsaSigShareInternal, diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/mod.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/mod.rs index 468c55de5c3..992f6662146 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/mod.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/mod.rs @@ -6,7 +6,7 @@ use crate::vault::api::{ }; use crate::vault::local_csp_vault::LocalCspVault; use ic_crypto_internal_logmon::metrics::{MetricsDomain, MetricsResult, MetricsScope}; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ create_bip340_signature_share, create_ed25519_signature_share, DerivationPath, IDkgTranscriptInternal, ThresholdBip340GenerateSigShareInternalError, ThresholdEd25519GenerateSigShareInternalError, diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/tests.rs index 464d6afedcc..8648658cd1c 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tschnorr/tests.rs @@ -8,7 +8,7 @@ use crate::vault::local_csp_vault::{ use crate::KeyId; use crate::LocalCspVault; use assert_matches::assert_matches; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CombinedCommitment, CommitmentOpeningBytes, EccCurveType, EccPoint, EccScalar, EccScalarBytes, IDkgTranscriptInternal, IdkgProtocolAlgorithm, PolynomialCommitment, SimpleCommitment, }; diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/mod.rs b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/mod.rs index 1019dd88158..3f35677e04f 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/mod.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/mod.rs @@ -9,7 +9,7 @@ use crate::vault::api::{ }; use ic_crypto_internal_seed::Seed; use ic_crypto_internal_threshold_sig_bls12381::api::ni_dkg_errors; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CommitmentOpening, IDkgComplaintInternal, MEGaPublicKey, ThresholdEcdsaSigShareInternal, }; use ic_crypto_internal_types::encrypt::forward_secure::{ diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs index 4e0ef49f8e4..f060d7a2161 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs @@ -25,7 +25,7 @@ use ic_crypto_internal_threshold_sig_bls12381::api::ni_dkg_errors::{ CspDkgCreateFsKeyError, CspDkgCreateReshareDealingError, CspDkgLoadPrivateKeyError, CspDkgRetainThresholdKeysError, CspDkgUpdateFsEpochError, }; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CommitmentOpening, IDkgComplaintInternal, MEGaPublicKey, ThresholdEcdsaSigShareInternal, }; use ic_crypto_internal_types::encrypt::forward_secure::{ diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_server.rs b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_server.rs index 9d134e03c12..51a13436b73 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_server.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_server.rs @@ -22,7 +22,7 @@ use ic_crypto_internal_threshold_sig_bls12381::api::ni_dkg_errors::{ CspDkgCreateFsKeyError, CspDkgCreateReshareDealingError, CspDkgLoadPrivateKeyError, CspDkgRetainThresholdKeysError, CspDkgUpdateFsEpochError, }; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CommitmentOpening, IDkgComplaintInternal, MEGaPublicKey, ThresholdEcdsaSigShareInternal, }; use ic_crypto_internal_types::encrypt::forward_secure::{ diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/pks_and_sks.rs b/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/pks_and_sks.rs index c09a491402c..4d9865ca78d 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/pks_and_sks.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/pks_and_sks.rs @@ -1,7 +1,7 @@ use crate::vault::api::IDkgProtocolCspVault; use crate::CspVault; use crate::ExternalPublicKeys; -use ic_crypto_internal_threshold_sig_ecdsa::MEGaPublicKey; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::MEGaPublicKey; use ic_types::crypto::CurrentNodePublicKeys; use ic_types_test_utils::ids::node_test_id; diff --git a/rs/crypto/node_key_generation/BUILD.bazel b/rs/crypto/node_key_generation/BUILD.bazel index a53265efb05..7c564fd3e24 100644 --- a/rs/crypto/node_key_generation/BUILD.bazel +++ b/rs/crypto/node_key_generation/BUILD.bazel @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"]) DEPENDENCIES = [ # Keep sorted. "//rs/config", - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/internal/crypto_lib/types", "//rs/crypto/internal/crypto_service_provider", "//rs/crypto/internal/logmon", diff --git a/rs/crypto/node_key_generation/Cargo.toml b/rs/crypto/node_key_generation/Cargo.toml index f4cc25ed421..9957cd0bc58 100644 --- a/rs/crypto/node_key_generation/Cargo.toml +++ b/rs/crypto/node_key_generation/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" ic-config = { path = "../../config" } ic-crypto-internal-csp = { path = "../internal/crypto_service_provider" } ic-crypto-internal-logmon = { path = "../internal/logmon" } -ic-crypto-internal-threshold-sig-ecdsa = { path = "../internal/crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "../internal/crypto_lib/threshold_sig/canister_threshold_sig" } ic-crypto-internal-types = { path = "../internal/crypto_lib/types" } ic-crypto-node-key-validation = { path = "../node_key_validation" } ic-crypto-tls-interfaces = { path = "../tls_interfaces" } diff --git a/rs/crypto/node_key_generation/src/tests.rs b/rs/crypto/node_key_generation/src/tests.rs index d9da120bdee..cc6f2fb40dd 100644 --- a/rs/crypto/node_key_generation/src/tests.rs +++ b/rs/crypto/node_key_generation/src/tests.rs @@ -5,7 +5,7 @@ use assert_matches::assert_matches; use ic_crypto_internal_csp_test_utils::types::{ csp_pk_ed25519_from_hex, csp_pk_multi_bls12381_from_hex, csp_pop_multi_bls12381_from_hex, }; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, MEGaPublicKey}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{EccCurveType, MEGaPublicKey}; use ic_crypto_internal_types::sign::threshold_sig::ni_dkg::CspFsEncryptionPop; use ic_crypto_internal_types::sign::threshold_sig::ni_dkg::CspFsEncryptionPublicKey; use ic_crypto_node_key_validation::ValidNodeSigningPublicKey; @@ -97,7 +97,7 @@ mod generate_dkg_dealing_encryption_keys { mod generate_idkg_dealing_encryption_keys { use super::*; use crate::IDkgDealingEncryptionKeysGenerationError; - use ic_crypto_internal_threshold_sig_ecdsa::CanisterThresholdSerializationError; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::CanisterThresholdSerializationError; #[test] fn should_delegate_to_vault() { diff --git a/rs/crypto/node_key_validation/BUILD.bazel b/rs/crypto/node_key_validation/BUILD.bazel index bbf2d57bafe..db7c820e374 100644 --- a/rs/crypto/node_key_validation/BUILD.bazel +++ b/rs/crypto/node_key_validation/BUILD.bazel @@ -7,7 +7,7 @@ DEPENDENCIES = [ "//rs/crypto/internal/crypto_lib/basic_sig/ed25519", "//rs/crypto/internal/crypto_lib/multi_sig/bls12_381", "//rs/crypto/internal/crypto_lib/threshold_sig/bls12_381", - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/internal/crypto_lib/types", "//rs/crypto/node_key_validation/tls_cert_validation", "//rs/protobuf", diff --git a/rs/crypto/node_key_validation/Cargo.toml b/rs/crypto/node_key_validation/Cargo.toml index 131efd3711f..79831fd65c6 100644 --- a/rs/crypto/node_key_validation/Cargo.toml +++ b/rs/crypto/node_key_validation/Cargo.toml @@ -16,7 +16,7 @@ ic-base-types = { path = "../../types/base_types" } ic-crypto-internal-basic-sig-ed25519 = { path = "../internal/crypto_lib/basic_sig/ed25519" } ic-crypto-internal-multi-sig-bls12381 = { path = "../internal/crypto_lib/multi_sig/bls12_381" } ic-crypto-internal-threshold-sig-bls12381 = { path = "../internal/crypto_lib/threshold_sig/bls12_381" } -ic-crypto-internal-threshold-sig-ecdsa = { path = "../internal/crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "../internal/crypto_lib/threshold_sig/canister_threshold_sig" } ic-crypto-internal-types = { path = "../internal/crypto_lib/types" } ic-crypto-tls-cert-validation = { path = "tls_cert_validation" } ic-protobuf = { path = "../../protobuf" } diff --git a/rs/crypto/node_key_validation/src/lib.rs b/rs/crypto/node_key_validation/src/lib.rs index 5686066246f..6254a5fd771 100644 --- a/rs/crypto/node_key_validation/src/lib.rs +++ b/rs/crypto/node_key_validation/src/lib.rs @@ -39,7 +39,9 @@ use ic_base_types::{NodeId, PrincipalId}; use ic_crypto_internal_basic_sig_ed25519::types::PublicKeyBytes as BasicSigEd25519PublicKeyBytes; use ic_crypto_internal_multi_sig_bls12381::types::PopBytes as MultiSigBls12381PopBytes; use ic_crypto_internal_multi_sig_bls12381::types::PublicKeyBytes as MultiSigBls12381PublicKeyBytes; -use ic_crypto_internal_threshold_sig_ecdsa::{verify_mega_public_key, EccCurveType}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + verify_mega_public_key, EccCurveType, +}; pub use ic_crypto_tls_cert_validation::TlsCertValidationError; pub use ic_crypto_tls_cert_validation::ValidTlsCertificate; use ic_protobuf::registry::crypto::v1::AlgorithmId as AlgorithmIdProto; diff --git a/rs/crypto/src/keygen/tests.rs b/rs/crypto/src/keygen/tests.rs index 5baccd0354a..f7f41668349 100644 --- a/rs/crypto/src/keygen/tests.rs +++ b/rs/crypto/src/keygen/tests.rs @@ -13,7 +13,7 @@ use ic_crypto_internal_csp::vault::api::NodeKeysErrors; use ic_crypto_internal_csp::vault::api::PksAndSksContainsErrors; use ic_crypto_internal_csp::vault::api::SecretKeyError; use ic_crypto_internal_logmon::metrics::CryptoMetrics; -use ic_crypto_internal_threshold_sig_ecdsa::MEGaPublicKey; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::MEGaPublicKey; use ic_crypto_temp_crypto::EcdsaSubnetConfig; use ic_crypto_test_utils_csp::MockAllCryptoServiceProvider; use ic_crypto_test_utils_keys::public_keys::{ @@ -933,7 +933,7 @@ mod check_keys_with_registry { mod rotate_idkg_dealing_encryption_keys { use super::*; - use ic_crypto_internal_threshold_sig_ecdsa::EccCurveType; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::EccCurveType; use ic_crypto_test_utils_keys::public_keys::valid_idkg_dealing_encryption_public_key_2; use ic_crypto_test_utils_keys::public_keys::valid_idkg_dealing_encryption_public_key_3; use ic_test_utilities_in_memory_logger::{assertions::LogEntriesAssert, InMemoryReplicaLogger}; diff --git a/rs/crypto/src/sign/canister_threshold_sig.rs b/rs/crypto/src/sign/canister_threshold_sig.rs index 923aa493889..92e4e3ca6d4 100644 --- a/rs/crypto/src/sign/canister_threshold_sig.rs +++ b/rs/crypto/src/sign/canister_threshold_sig.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::IDkgTranscriptInternal; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::IDkgTranscriptInternal; use ic_types::crypto::canister_threshold_sig::idkg::IDkgTranscript; use ic_types::crypto::canister_threshold_sig::idkg::IDkgTranscriptType::{Masked, Unmasked}; use ic_types::crypto::canister_threshold_sig::MasterPublicKey; diff --git a/rs/crypto/src/sign/canister_threshold_sig/ecdsa.rs b/rs/crypto/src/sign/canister_threshold_sig/ecdsa.rs index 665f9297c5b..61beb8a0b15 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/ecdsa.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/ecdsa.rs @@ -1,7 +1,7 @@ //! Implementations of ThresholdEcdsaSigner use super::MasterPublicKeyExtractionError; use ic_crypto_internal_csp::vault::api::{CspVault, IDkgTranscriptInternalBytes}; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ combine_ecdsa_signature_shares, verify_ecdsa_signature_share, verify_ecdsa_threshold_signature, CanisterThresholdSerializationError, DerivationPath, EccCurveType, IDkgTranscriptInternal, ThresholdEcdsaCombinedSigInternal, ThresholdEcdsaSigShareInternal, diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg.rs index 1a9401e41af..21986d2d123 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg.rs @@ -189,14 +189,14 @@ pub use utils::{retrieve_mega_public_key_from_registry, MegaKeyFromRegistryError /// * `P(x) = P(d) * (d'-x)/(d'-d) + P(d') * (d-x)/(d-d')` and so /// * `P(0) = P(d) * d'/(d'-d) + P(d') * d/(d-d')` /// -/// [`hash2curve`]: ic_crypto_internal_threshold_sig_ecdsa +/// [`hash2curve`]: ic_crypto_internal_threshold_sig_canister_threshold_sig /// [`IDkgTranscriptOperation::Random`]: ic_types::crypto::canister_threshold_sig::idkg::IDkgTranscriptOperation::Random /// [`IDkgTranscriptOperation::ReshareOfMasked`]: ic_types::crypto::canister_threshold_sig::idkg::IDkgTranscriptOperation::ReshareOfMasked -/// [`MEGaCiphertextPair::encrypt`]: ic_crypto_internal_threshold_sig_ecdsa::MEGaCiphertextPair::encrypt -/// [`PedersenCommitment`]: ic_crypto_internal_threshold_sig_ecdsa::PedersenCommitment -/// [`ProofOfDLogEquivalence`]: ic_crypto_internal_threshold_sig_ecdsa::zk::ProofOfDLogEquivalence -/// [`ProofOfEqualOpenings`]: ic_crypto_internal_threshold_sig_ecdsa::zk::ProofOfEqualOpenings -/// [`SimpleCommitment`]: ic_crypto_internal_threshold_sig_ecdsa::SimpleCommitment +/// [`MEGaCiphertextPair::encrypt`]: ic_crypto_internal_threshold_sig_canister_threshold_sig::MEGaCiphertextPair::encrypt +/// [`PedersenCommitment`]: ic_crypto_internal_threshold_sig_canister_threshold_sig::PedersenCommitment +/// [`ProofOfDLogEquivalence`]: ic_crypto_internal_threshold_sig_canister_threshold_sig::zk::ProofOfDLogEquivalence +/// [`ProofOfEqualOpenings`]: ic_crypto_internal_threshold_sig_canister_threshold_sig::zk::ProofOfEqualOpenings +/// [`SimpleCommitment`]: ic_crypto_internal_threshold_sig_canister_threshold_sig::SimpleCommitment /// [`xmd`]: ic_crypto_internal_seed::xmd impl IDkgProtocol for CryptoComponentImpl { fn create_dealing( diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint.rs index b51cf0eaf64..1131da15fa3 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint.rs @@ -2,8 +2,8 @@ use super::*; use crate::sign::canister_threshold_sig::idkg::utils::{ index_and_dealing_of_dealer, retrieve_mega_public_key_from_registry, MegaKeyFromRegistryError, }; -use ic_crypto_internal_threshold_sig_ecdsa::verify_complaint as idkg_verify_complaint; -use ic_crypto_internal_threshold_sig_ecdsa::IDkgComplaintInternal; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::verify_complaint as idkg_verify_complaint; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::IDkgComplaintInternal; use ic_interfaces_registry::RegistryClient; use ic_types::NodeIndex; use std::convert::TryFrom; diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint/tests.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint/tests.rs index 6e3dcd66130..524fee3da4f 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint/tests.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/complaint/tests.rs @@ -10,7 +10,7 @@ use crate::sign::tests::{ }; use assert_matches::assert_matches; use ic_crypto_internal_seed::Seed; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, MEGaPublicKey}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{EccCurveType, MEGaPublicKey}; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use ic_protobuf::registry::crypto::v1::AlgorithmId as AlgorithmIdProto; use ic_protobuf::registry::crypto::v1::PublicKey as PublicKeyProto; @@ -413,7 +413,7 @@ fn mega_encryption_pk_record( } fn generate_mega_public_key(rng: &mut R) -> MEGaPublicKey { - let (mega_pk, _mega_sk) = ic_crypto_internal_threshold_sig_ecdsa::gen_keypair( + let (mega_pk, _mega_sk) = ic_crypto_internal_threshold_sig_canister_threshold_sig::gen_keypair( EccCurveType::K256, Seed::from_rng(rng), ); diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs index c91dce9188a..aa8b8db2fbe 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs @@ -10,7 +10,7 @@ use ic_crypto_internal_csp::api::CspSigner; use ic_crypto_internal_csp::vault::api::{ CspVault, IDkgCreateDealingVaultError, IDkgDealingInternalBytes, }; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ publicly_verify_dealing, IDkgDealingInternal, IDkgTranscriptOperationInternal, }; use ic_interfaces_registry::RegistryClient; diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys.rs index 72c78f2a164..f6001da764f 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys.rs @@ -3,7 +3,9 @@ use ic_base_types::{NodeId, RegistryVersion}; use ic_crypto_internal_csp::key_id::KeyId; use ic_crypto_internal_csp::vault::api::CspVault; use ic_crypto_internal_logmon::metrics::CryptoMetrics; -use ic_crypto_internal_threshold_sig_ecdsa::{IDkgTranscriptInternal, MEGaPublicKey}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ + IDkgTranscriptInternal, MEGaPublicKey, +}; use ic_interfaces::crypto::ErrorReproducibility; use ic_interfaces_registry::RegistryClient; use ic_types::crypto::canister_threshold_sig::error::IDkgRetainKeysError; diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys/tests.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys/tests.rs index 5e6ff2e294a..046a9021b74 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys/tests.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/retain_active_keys/tests.rs @@ -5,8 +5,8 @@ use ic_base_types::SubnetId; use ic_base_types::{NodeId, RegistryVersion}; use ic_crypto_internal_csp::keygen::utils::idkg_dealing_encryption_pk_to_proto; use ic_crypto_internal_logmon::metrics::CryptoMetrics; -use ic_crypto_internal_threshold_sig_ecdsa::MEGaPublicKey; -use ic_crypto_internal_threshold_sig_ecdsa::{EccCurveType, EccPoint, EccScalar}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::MEGaPublicKey; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{EccCurveType, EccPoint, EccScalar}; use ic_crypto_test_utils_reproducible_rng::reproducible_rng; use ic_interfaces_registry::RegistryClient; use ic_interfaces_registry_mocks::MockRegistryClient; diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs index 216246eea03..d5adb14c25d 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs @@ -7,7 +7,7 @@ use crate::sign::canister_threshold_sig::idkg::utils::{ }; use ic_crypto_internal_csp::api::CspSigner; use ic_crypto_internal_csp::vault::api::{CspVault, IDkgTranscriptInternalBytes}; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ create_transcript as idkg_create_transcript, verify_dealing_opening as idkg_verify_dealing_opening, verify_transcript as idkg_verify_transcript, CommitmentOpening, IDkgComplaintInternal, diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/utils.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/utils.rs index e50b50e1e8c..24fe2c77bac 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/utils.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/utils.rs @@ -7,7 +7,7 @@ use ic_crypto_internal_csp::key_id::KeyId; use ic_crypto_internal_csp::keygen::utils::{ mega_public_key_from_proto, MEGaPublicKeyFromProtoError, }; -use ic_crypto_internal_threshold_sig_ecdsa::{IDkgDealingInternal, MEGaPublicKey}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{IDkgDealingInternal, MEGaPublicKey}; use ic_interfaces_registry::RegistryClient; use ic_protobuf::registry::crypto::v1::PublicKey; use ic_registry_client_helpers::crypto::CryptoRegistry; diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/utils/tests.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/utils/tests.rs index 883d3aa9854..b2c30f68da3 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/utils/tests.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/utils/tests.rs @@ -8,7 +8,7 @@ mod index_and_dealing_of_dealer { use crate::sign::tests::REG_V1; use assert_matches::assert_matches; use ic_base_types::{PrincipalId, SubnetId}; - use ic_crypto_internal_threshold_sig_ecdsa::IDkgDealingInternal; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::IDkgDealingInternal; use ic_crypto_internal_types::NodeIndex; use ic_crypto_test_utils::set_of; use ic_types::crypto::canister_threshold_sig::idkg::{ diff --git a/rs/crypto/src/sign/canister_threshold_sig/schnorr.rs b/rs/crypto/src/sign/canister_threshold_sig/schnorr.rs index 9ce4da78b40..dd2079b61e6 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/schnorr.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/schnorr.rs @@ -4,7 +4,7 @@ use super::MasterPublicKeyExtractionError; use ic_crypto_internal_csp::vault::api::{ CspVault, IDkgTranscriptInternalBytes, ThresholdSchnorrCreateSigShareVaultError, }; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ combine_bip340_signature_shares, combine_ed25519_signature_shares, verify_bip340_signature_share, verify_ed25519_signature_share, verify_threshold_bip340_signature, verify_threshold_ed25519_signature, DerivationPath, diff --git a/rs/crypto/src/sign/canister_threshold_sig/tests.rs b/rs/crypto/src/sign/canister_threshold_sig/tests.rs index 881e06777ee..3daeb220fb8 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/tests.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/tests.rs @@ -4,7 +4,7 @@ mod get_master_public_key_from_transcript { use crate::sign::tests::REG_V1; use assert_matches::assert_matches; use ic_base_types::SubnetId; - use ic_crypto_internal_threshold_sig_ecdsa::IDkgTranscriptInternal; + use ic_crypto_internal_threshold_sig_canister_threshold_sig::IDkgTranscriptInternal; use ic_crypto_test_utils::set_of; use ic_types::crypto::canister_threshold_sig::idkg::{ IDkgMaskedTranscriptOrigin, IDkgReceivers, IDkgTranscript, IDkgTranscriptId, @@ -100,7 +100,7 @@ mod get_master_public_key_from_transcript { } /// Retrieved from a successful execution of - /// `ic_crypto_internal_threshold_sig_ecdsa::transcript::new`. + /// `ic_crypto_internal_threshold_sig_canister_threshold_sig::transcript::new`. const VALID_SECP256K1_INTERNAL_TRANSCRIPT_RAW: &str = "a173636f6d62696e65645f636f6d6d69746d656e74a16b427953756d6d6174696f\ 6ea168506564657273656ea166706f696e7473825822010252a937b4c129d822412\ diff --git a/rs/crypto/test_utils/canister_threshold_sigs/BUILD.bazel b/rs/crypto/test_utils/canister_threshold_sigs/BUILD.bazel index 98e77e2825f..6dc78288f54 100644 --- a/rs/crypto/test_utils/canister_threshold_sigs/BUILD.bazel +++ b/rs/crypto/test_utils/canister_threshold_sigs/BUILD.bazel @@ -14,7 +14,7 @@ rust_library( version = "0.9.0", deps = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/temp_crypto", "//rs/interfaces", "//rs/monitoring/logger", diff --git a/rs/crypto/test_utils/canister_threshold_sigs/Cargo.toml b/rs/crypto/test_utils/canister_threshold_sigs/Cargo.toml index 96f2058f342..44eb10a6a26 100644 --- a/rs/crypto/test_utils/canister_threshold_sigs/Cargo.toml +++ b/rs/crypto/test_utils/canister_threshold_sigs/Cargo.toml @@ -7,7 +7,7 @@ description.workspace = true documentation.workspace = true [dependencies] -ic-crypto-internal-threshold-sig-ecdsa = { path = "../../internal/crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "../../internal/crypto_lib/threshold_sig/canister_threshold_sig" } ic-crypto-temp-crypto = { path = "../../temp_crypto" } ic-interfaces = { path = "../../../interfaces" } ic-logger = { path = "../../../monitoring/logger" } diff --git a/rs/crypto/test_utils/canister_threshold_sigs/src/lib.rs b/rs/crypto/test_utils/canister_threshold_sigs/src/lib.rs index eabb1a2c602..e89af874596 100644 --- a/rs/crypto/test_utils/canister_threshold_sigs/src/lib.rs +++ b/rs/crypto/test_utils/canister_threshold_sigs/src/lib.rs @@ -1,8 +1,10 @@ //! Utilities for testing IDkg and canister threshold signature operations. use crate::node::{Node, Nodes}; -use ic_crypto_internal_threshold_sig_ecdsa::test_utils::{corrupt_dealing, ComplaintCorrupter}; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::test_utils::{ + corrupt_dealing, ComplaintCorrupter, +}; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ IDkgComplaintInternal, IDkgDealingInternal, NodeIndex, Seed, }; use ic_crypto_temp_crypto::{TempCryptoComponent, TempCryptoComponentGeneric}; @@ -2798,7 +2800,7 @@ fn corrupt_signed_dealing_for_one_receiver( .expect("failed to deserialize internal dealing"); let corrupted_internal_dealing = - ic_crypto_internal_threshold_sig_ecdsa::test_utils::corrupt_dealing( + ic_crypto_internal_threshold_sig_canister_threshold_sig::test_utils::corrupt_dealing( &internal_dealing, &[receiver_index], Seed::from_rng(rng), diff --git a/rs/crypto/test_utils/csp/BUILD.bazel b/rs/crypto/test_utils/csp/BUILD.bazel index 30c26d9b21e..1619677bd79 100644 --- a/rs/crypto/test_utils/csp/BUILD.bazel +++ b/rs/crypto/test_utils/csp/BUILD.bazel @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"]) DEPENDENCIES = [ # Keep sorted. "//rs/crypto/internal/crypto_lib/threshold_sig/bls12_381", - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/internal/crypto_lib/types", "//rs/crypto/internal/crypto_service_provider", "//rs/crypto/node_key_validation", diff --git a/rs/crypto/test_utils/csp/Cargo.toml b/rs/crypto/test_utils/csp/Cargo.toml index aaf643bc5e2..20252a8ab48 100644 --- a/rs/crypto/test_utils/csp/Cargo.toml +++ b/rs/crypto/test_utils/csp/Cargo.toml @@ -10,7 +10,7 @@ documentation.workspace = true ic-base-types = { path = "../../../types/base_types" } ic-crypto-internal-csp = { path = "../../internal/crypto_service_provider" } ic-crypto-internal-threshold-sig-bls12381 = { path = "../../internal/crypto_lib/threshold_sig/bls12_381" } -ic-crypto-internal-threshold-sig-ecdsa = { path = "../../internal/crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "../../internal/crypto_lib/threshold_sig/canister_threshold_sig" } ic-crypto-internal-types = { path = "../../internal/crypto_lib/types" } ic-crypto-node-key-validation = { path = "../../../crypto/node_key_validation" } ic-crypto-tls-interfaces = { path = "../../tls_interfaces" } diff --git a/rs/crypto/test_utils/local_csp_vault/BUILD.bazel b/rs/crypto/test_utils/local_csp_vault/BUILD.bazel index 60759a6fded..f302952d7dd 100644 --- a/rs/crypto/test_utils/local_csp_vault/BUILD.bazel +++ b/rs/crypto/test_utils/local_csp_vault/BUILD.bazel @@ -6,7 +6,7 @@ DEPENDENCIES = [ # Keep sorted. "//rs/crypto/internal/crypto_lib/seed", "//rs/crypto/internal/crypto_lib/threshold_sig/bls12_381", - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/crypto/internal/crypto_lib/types", "//rs/crypto/internal/crypto_service_provider", "//rs/crypto/node_key_validation", diff --git a/rs/crypto/test_utils/local_csp_vault/Cargo.toml b/rs/crypto/test_utils/local_csp_vault/Cargo.toml index 70484d64f8f..df4f1bab508 100644 --- a/rs/crypto/test_utils/local_csp_vault/Cargo.toml +++ b/rs/crypto/test_utils/local_csp_vault/Cargo.toml @@ -10,7 +10,7 @@ documentation.workspace = true ic-crypto-internal-csp = { path = "../../internal/crypto_service_provider" } ic-crypto-internal-seed = { path = "../../internal/crypto_lib/seed" } ic-crypto-internal-threshold-sig-bls12381 = { path = "../../internal/crypto_lib/threshold_sig/bls12_381" } -ic-crypto-internal-threshold-sig-ecdsa = { path = "../../internal/crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "../../internal/crypto_lib/threshold_sig/canister_threshold_sig" } ic-crypto-internal-types = { path = "../../internal/crypto_lib/types" } ic-crypto-node-key-validation = { path = "../../node_key_validation" } ic-crypto-tls-interfaces = { path = "../../tls_interfaces" } diff --git a/rs/crypto/test_utils/local_csp_vault/src/lib.rs b/rs/crypto/test_utils/local_csp_vault/src/lib.rs index a7984c97f52..4aaef26eb46 100644 --- a/rs/crypto/test_utils/local_csp_vault/src/lib.rs +++ b/rs/crypto/test_utils/local_csp_vault/src/lib.rs @@ -31,7 +31,7 @@ use ic_crypto_internal_csp::vault::api::TlsHandshakeCspVault; use ic_crypto_internal_csp::vault::api::ValidatePksAndSksError; use ic_crypto_internal_seed::Seed; use ic_crypto_internal_threshold_sig_bls12381::api::ni_dkg_errors; -use ic_crypto_internal_threshold_sig_ecdsa::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig::{ CommitmentOpening, IDkgComplaintInternal, MEGaPublicKey, ThresholdEcdsaSigShareInternal, }; use ic_crypto_internal_types::encrypt::forward_secure::{ diff --git a/rs/crypto/tests/canister_threshold_idkg.rs b/rs/crypto/tests/canister_threshold_idkg.rs index f61fd1f6fb8..2b1c6b3781f 100644 --- a/rs/crypto/tests/canister_threshold_idkg.rs +++ b/rs/crypto/tests/canister_threshold_idkg.rs @@ -5,7 +5,7 @@ use ic_crypto::CryptoComponentImpl; use ic_crypto_internal_csp::vault::api::IDkgCreateDealingVaultError; use ic_crypto_internal_csp::Csp; use ic_crypto_internal_logmon::metrics::CryptoMetrics; -use ic_crypto_internal_threshold_sig_ecdsa::test_utils::ComplaintCorrupter; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::test_utils::ComplaintCorrupter; use ic_crypto_temp_crypto::TempCryptoComponent; use ic_crypto_test_utils_canister_threshold_sigs::{ build_params_from_previous, copy_dealing_in_transcript, diff --git a/rs/crypto/tests/canister_threshold_schnorr_verify_combined_sig.rs b/rs/crypto/tests/canister_threshold_schnorr_verify_combined_sig.rs index c0b5f5f8b5f..43ebcfe7735 100644 --- a/rs/crypto/tests/canister_threshold_schnorr_verify_combined_sig.rs +++ b/rs/crypto/tests/canister_threshold_schnorr_verify_combined_sig.rs @@ -1,6 +1,6 @@ use assert_matches::assert_matches; use ic_crypto::get_master_public_key_from_transcript; -use ic_crypto_internal_threshold_sig_ecdsa_test_utils::{ +use ic_crypto_internal_threshold_sig_canister_threshold_sig_test_utils::{ verify_bip340_signature_using_third_party, verify_ed25519_signature_using_third_party, }; use ic_crypto_test_utils_canister_threshold_sigs::{ diff --git a/rs/crypto/utils/canister_threshold_sig/BUILD.bazel b/rs/crypto/utils/canister_threshold_sig/BUILD.bazel index 43167df71ee..7d8bb0e27e3 100644 --- a/rs/crypto/utils/canister_threshold_sig/BUILD.bazel +++ b/rs/crypto/utils/canister_threshold_sig/BUILD.bazel @@ -14,7 +14,7 @@ rust_library( version = "0.1.0", deps = [ # Keep sorted. - "//rs/crypto/internal/crypto_lib/threshold_sig/tecdsa", + "//rs/crypto/internal/crypto_lib/threshold_sig/canister_threshold_sig", "//rs/types/types", ], ) diff --git a/rs/crypto/utils/canister_threshold_sig/Cargo.toml b/rs/crypto/utils/canister_threshold_sig/Cargo.toml index ed9d6e02c17..86cebbabcc8 100644 --- a/rs/crypto/utils/canister_threshold_sig/Cargo.toml +++ b/rs/crypto/utils/canister_threshold_sig/Cargo.toml @@ -7,5 +7,5 @@ edition.workspace = true documentation.workspace = true [dependencies] -ic-crypto-internal-threshold-sig-ecdsa = { path = "../../internal/crypto_lib/threshold_sig/tecdsa" } +ic-crypto-internal-threshold-sig-canister-threshold-sig = { path = "../../internal/crypto_lib/threshold_sig/canister_threshold_sig" } ic-types = { path = "../../../types/types" } diff --git a/rs/crypto/utils/canister_threshold_sig/src/lib.rs b/rs/crypto/utils/canister_threshold_sig/src/lib.rs index 5d38eabac86..bf0fe00979e 100644 --- a/rs/crypto/utils/canister_threshold_sig/src/lib.rs +++ b/rs/crypto/utils/canister_threshold_sig/src/lib.rs @@ -1,4 +1,4 @@ -use ic_crypto_internal_threshold_sig_ecdsa::DeriveThresholdPublicKeyError; +use ic_crypto_internal_threshold_sig_canister_threshold_sig::DeriveThresholdPublicKeyError; use ic_types::crypto::canister_threshold_sig::error::CanisterThresholdGetPublicKeyError; use ic_types::crypto::canister_threshold_sig::{ ExtendedDerivationPath, MasterPublicKey, PublicKey, @@ -10,7 +10,7 @@ pub fn derive_threshold_public_key( master_public_key: &MasterPublicKey, extended_derivation_path: &ExtendedDerivationPath, ) -> Result { - ic_crypto_internal_threshold_sig_ecdsa::derive_threshold_public_key( + ic_crypto_internal_threshold_sig_canister_threshold_sig::derive_threshold_public_key( master_public_key, &extended_derivation_path.into(), )