diff --git a/Cargo.lock b/Cargo.lock index 71dc2f2..eca871f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -26,21 +26,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - [[package]] name = "ansi_term" version = "0.12.1" @@ -68,12 +53,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "assert_matches" version = "1.5.0" @@ -108,6 +87,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "autocfg" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.3.0", +] + [[package]] name = "autocfg" version = "1.3.0" @@ -141,12 +129,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base32" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" - [[package]] name = "base64" version = "0.13.1" @@ -171,15 +153,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "binread" version = "2.2.0" @@ -245,6 +218,20 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bls12_381" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" +dependencies = [ + "digest 0.9.0", + "ff 0.12.1", + "group 0.12.1", + "pairing 0.22.0", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "bls12_381_plus" version = "0.8.15" @@ -270,16 +257,6 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -[[package]] -name = "byte-unit" -version = "4.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" -dependencies = [ - "serde", - "utf8-width", -] - [[package]] name = "byteorder" version = "1.5.0" @@ -292,18 +269,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -[[package]] -name = "cached" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6d20b3d24b6c74e2c5331d2d3d8d1976a9883c7da179aa851afa4c90d62e36" -dependencies = [ - "hashbrown 0.12.3", - "instant", - "once_cell", - "thiserror", -] - [[package]] name = "camino" version = "1.1.7" @@ -348,23 +313,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "canister_sig_util" -version = "0.1.0" -source = "git+https://github.com/dfinity/internet-identity?rev=f668535241bb01fa9a7fb508b6579407c8afe59c#f668535241bb01fa9a7fb508b6579407c8afe59c" -dependencies = [ - "candid", - "hex", - "ic-cdk", - "ic-certification 2.5.0", - "ic-representation-independent-hash", - "lazy_static", - "serde", - "serde_bytes", - "serde_cbor", - "sha2 0.10.8", -] - [[package]] name = "cargo-license" version = "0.5.1" @@ -420,19 +368,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets 0.52.5", -] - [[package]] name = "clap" version = "3.2.25" @@ -473,39 +408,12 @@ dependencies = [ ] [[package]] -name = "comparable" -version = "0.5.4" +name = "cloudabi" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb513ee8037bf08c5270ecefa48da249f4c58e57a71ccfce0a5b0877d2a20eb2" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "comparable_derive", - "comparable_helper", - "pretty_assertions", - "serde", -] - -[[package]] -name = "comparable_derive" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54b9c40054eb8999c5d1d36fdc90e4e5f7ff0d1d9621706f360b3cbc8beb828" -dependencies = [ - "convert_case 0.4.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "comparable_helper" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5437e327e861081c91270becff184859f706e3e50f5301a9d4dc8eb50752c3" -dependencies = [ - "convert_case 0.6.0", - "proc-macro2", - "quote", - "syn 1.0.109", + "bitflags 1.3.2", ] [[package]] @@ -514,21 +422,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -621,76 +514,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", - "subtle-ng", - "zeroize", -] - -[[package]] -name = "cvt" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ae9bf77fbf2d39ef573205d554d87e86c12f1994e9ea335b0651b9b278bcf1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - [[package]] name = "data-encoding" version = "2.6.0" @@ -724,7 +547,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", - "pem-rfc7468", "zeroize", ] @@ -738,16 +560,6 @@ dependencies = [ "serde", ] -[[package]] -name = "derive_more" -version = "0.99.8-alpha.0" -source = "git+https://github.com/dfinity-lab/derive_more?rev=9f1b894e6fde640da4e9ea71a8fc0e4dd98d01da#9f1b894e6fde640da4e9ea71a8fc0e4dd98d01da" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "did_url_parser" version = "0.2.0" @@ -758,12 +570,6 @@ dependencies = [ "serde", ] -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "digest" version = "0.9.0" @@ -808,10 +614,11 @@ version = "0.1.0" dependencies = [ "base64 0.21.7", "candid", - "canister_sig_util", - "ic-cdk", - "ic-cdk-macros", - "ic-certification 2.5.0", + "ic-canister-sig-creation", + "ic-cdk 0.13.2", + "ic-cdk-macros 0.13.2", + "ic-certification", + "ic-crypto-getrandom-for-wasm", "ic-verifiable-credentials", "lazy_static", "pocket-ic", @@ -828,8 +635,8 @@ dependencies = [ "anyhow", "base64 0.21.7", "candid", - "ic-cdk", - "ic-cdk-macros", + "ic-cdk 0.13.2", + "ic-cdk-macros 0.13.2", "ic-http-certification", "include_dir", "lazy_static", @@ -858,21 +665,6 @@ dependencies = [ "spki", ] -[[package]] -name = "ed25519-consensus" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" -dependencies = [ - "curve25519-dalek-ng", - "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", - "thiserror", - "zeroize", -] - [[package]] name = "either" version = "1.12.0" @@ -891,7 +683,6 @@ dependencies = [ "ff 0.13.0", "generic-array", "group 0.13.0", - "pem-rfc7468", "pkcs8", "rand_core 0.6.4", "sec1", @@ -918,15 +709,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "erased-serde" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" -dependencies = [ - "serde", -] - [[package]] name = "ff" version = "0.10.1" @@ -973,6 +755,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + [[package]] name = "funty" version = "2.0.0" @@ -1061,17 +849,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.15" @@ -1080,7 +857,7 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1329,81 +1106,46 @@ dependencies = [ ] [[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" +name = "ic-canister-sig-creation" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ic-base-types" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base32", - "byte-unit", - "bytes", - "candid", - "comparable", - "crc32fast", - "ic-crypto-sha2", - "ic-protobuf", - "ic-stable-structures", - "phantom_newtype", - "prost", - "serde", - "strum", - "strum_macros", -] - -[[package]] -name = "ic-btc-interface" -version = "0.1.0" -source = "git+https://github.com/dfinity/bitcoin-canister?rev=9b239d1d67253eb14a35be6061e3967d5ec9db9d#9b239d1d67253eb14a35be6061e3967d5ec9db9d" +checksum = "5db33deb06e0edb366d8d86ef67d7bc1e1759bc7046b0323a33b85b21b8d8d87" dependencies = [ "candid", + "hex", + "ic-cdk 0.14.0", + "ic-certification", + "ic-representation-independent-hash", + "lazy_static", "serde", "serde_bytes", + "serde_cbor", + "sha2 0.10.8", + "thiserror", ] [[package]] -name = "ic-btc-types-internal" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" +name = "ic-cdk" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8859bc2b863a77750acf199e1fb7e3fc403e1b475855ba13f59cb4e4036d238" dependencies = [ "candid", - "ic-btc-interface", - "ic-error-types", - "ic-protobuf", + "ic-cdk-macros 0.13.2", + "ic0 0.21.1", "serde", "serde_bytes", ] [[package]] name = "ic-cdk" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8859bc2b863a77750acf199e1fb7e3fc403e1b475855ba13f59cb4e4036d238" +checksum = "ff384f182459bec490a7f50a58bbdf8f7a6934de4dcc259e30c70641bcbcb917" dependencies = [ "candid", - "ic-cdk-macros", - "ic0", + "ic-cdk-macros 0.14.0", + "ic0 0.23.0", "serde", "serde_bytes", ] @@ -1418,23 +1160,22 @@ dependencies = [ "proc-macro2", "quote", "serde", - "serde_tokenstream", + "serde_tokenstream 0.1.7", "syn 1.0.109", ] [[package]] -name = "ic-certification" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" +name = "ic-cdk-macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01dc6bc425ec048d6ac4137c7c0f2cfbd6f8b0be8efc568feae2b265f566117c" dependencies = [ - "hex", - "ic-crypto-tree-hash", - "ic-crypto-utils-threshold-sig", - "ic-crypto-utils-threshold-sig-der", - "ic-types", + "candid", + "proc-macro2", + "quote", "serde", - "serde_cbor", - "tree-deserializer", + "serde_tokenstream 0.2.2", + "syn 2.0.66", ] [[package]] @@ -1450,350 +1191,11 @@ dependencies = [ ] [[package]] -name = "ic-constants" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" - -[[package]] -name = "ic-crypto-ecdsa-secp256k1" +name = "ic-crypto-getrandom-for-wasm" version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" +source = "git+https://github.com/dfinity/ic?rev=faacac31032a9b98020475eb608fd63455603556#faacac31032a9b98020475eb608fd63455603556" dependencies = [ - "k256", - "lazy_static", - "num-bigint", - "pem", - "rand", - "simple_asn1", - "zeroize", -] - -[[package]] -name = "ic-crypto-ecdsa-secp256r1" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-crypto-getrandom-for-wasm", - "lazy_static", - "num-bigint", - "p256", - "pem", - "rand", - "rand_chacha", - "simple_asn1", - "zeroize", -] - -[[package]] -name = "ic-crypto-getrandom-for-wasm" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "getrandom 0.2.15", -] - -[[package]] -name = "ic-crypto-iccsa" -version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-crypto-internal-basic-sig-iccsa", -] - -[[package]] -name = "ic-crypto-internal-basic-sig-cose" -version = "0.1.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-crypto-internal-basic-sig-der-utils", - "ic-crypto-internal-basic-sig-ecdsa-secp256r1", - "ic-crypto-internal-basic-sig-rsa-pkcs1", - "ic-types", - "serde", - "serde_cbor", - "simple_asn1", -] - -[[package]] -name = "ic-crypto-internal-basic-sig-der-utils" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "hex", - "ic-types", - "simple_asn1", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-basic-sig-ecdsa-secp256k1" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base64 0.13.1", - "ic-crypto-ecdsa-secp256k1", - "ic-crypto-internal-basic-sig-der-utils", - "ic-crypto-internal-types", - "ic-crypto-secrets-containers", - "ic-types", - "serde", - "serde_bytes", - "simple_asn1", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-basic-sig-ecdsa-secp256r1" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base64 0.13.1", - "ic-crypto-ecdsa-secp256r1", - "ic-crypto-internal-basic-sig-der-utils", - "ic-crypto-internal-types", - "ic-crypto-secrets-containers", - "ic-types", - "p256", - "rand", - "serde", - "serde_bytes", - "simple_asn1", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-basic-sig-ed25519" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base64 0.13.1", - "curve25519-dalek", - "ed25519-consensus", - "hex", - "ic-crypto-internal-basic-sig-der-utils", - "ic-crypto-internal-seed", - "ic-crypto-internal-types", - "ic-crypto-secrets-containers", - "ic-protobuf", - "ic-types", - "rand", - "rand_chacha", - "serde", - "simple_asn1", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-basic-sig-iccsa" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base64 0.13.1", - "hex", - "ic-certification 0.9.0", - "ic-crypto-internal-basic-sig-der-utils", - "ic-crypto-internal-types", - "ic-crypto-sha2", - "ic-crypto-tree-hash", - "ic-types", - "serde", - "serde_bytes", - "serde_cbor", - "simple_asn1", -] - -[[package]] -name = "ic-crypto-internal-basic-sig-rsa-pkcs1" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-crypto-getrandom-for-wasm", - "ic-crypto-internal-basic-sig-der-utils", - "ic-crypto-sha2", - "ic-types", - "num-bigint", - "num-traits", - "pkcs8", - "rsa", - "serde", - "sha2 0.10.8", - "simple_asn1", -] - -[[package]] -name = "ic-crypto-internal-bls12-381-type" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "hex", - "ic-crypto-getrandom-for-wasm", - "ic_bls12_381", - "itertools 0.12.1", - "lazy_static", - "pairing 0.22.0", - "paste", - "rand", - "rand_chacha", - "sha2 0.9.9", - "subtle", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-seed" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "hex", - "ic-crypto-sha2", - "ic-types", - "rand", - "rand_chacha", - "serde", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-sha2" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "sha2 0.10.8", -] - -[[package]] -name = "ic-crypto-internal-threshold-sig-bls12381" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base64 0.13.1", - "cached", - "hex", - "ic-crypto-internal-bls12-381-type", - "ic-crypto-internal-seed", - "ic-crypto-internal-threshold-sig-bls12381-der", - "ic-crypto-internal-types", - "ic-crypto-secrets-containers", - "ic-crypto-sha2", - "ic-types", - "lazy_static", - "parking_lot", - "rand", - "rand_chacha", - "serde", - "serde_bytes", - "serde_cbor", - "strum_macros", - "subtle", - "zeroize", -] - -[[package]] -name = "ic-crypto-internal-threshold-sig-bls12381-der" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "simple_asn1", -] - -[[package]] -name = "ic-crypto-internal-types" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "arrayvec 0.7.4", - "hex", - "ic-protobuf", - "phantom_newtype", - "serde", - "serde_cbor", - "strum", - "strum_macros", - "thiserror", - "zeroize", -] - -[[package]] -name = "ic-crypto-secrets-containers" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "serde", - "zeroize", -] - -[[package]] -name = "ic-crypto-sha2" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-crypto-internal-sha2", -] - -[[package]] -name = "ic-crypto-standalone-sig-verifier" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-crypto-iccsa", - "ic-crypto-internal-basic-sig-cose", - "ic-crypto-internal-basic-sig-der-utils", - "ic-crypto-internal-basic-sig-ecdsa-secp256k1", - "ic-crypto-internal-basic-sig-ecdsa-secp256r1", - "ic-crypto-internal-basic-sig-ed25519", - "ic-crypto-internal-basic-sig-iccsa", - "ic-crypto-internal-basic-sig-rsa-pkcs1", - "ic-crypto-internal-types", - "ic-crypto-sha2", - "ic-types", -] - -[[package]] -name = "ic-crypto-tree-hash" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "assert_matches", - "ic-crypto-internal-types", - "ic-crypto-sha2", - "ic-protobuf", - "serde", - "serde_bytes", - "thiserror", -] - -[[package]] -name = "ic-crypto-utils-threshold-sig" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base64 0.13.1", - "ic-crypto-internal-threshold-sig-bls12381", - "ic-crypto-internal-types", - "ic-types", -] - -[[package]] -name = "ic-crypto-utils-threshold-sig-der" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "base64 0.13.1", - "ic-crypto-internal-threshold-sig-bls12381", - "ic-crypto-internal-threshold-sig-bls12381-der", - "ic-crypto-internal-types", - "ic-types", -] - -[[package]] -name = "ic-error-types" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-utils", - "serde", - "strum", - "strum_macros", + "getrandom", ] [[package]] @@ -1804,47 +1206,13 @@ checksum = "7ddb96501529c2380e087fa9f4552fd0d416f5784bb1e48142d746e9b3d6ae13" dependencies = [ "candid", "http 0.2.12", - "ic-certification 2.5.0", + "ic-certification", "ic-representation-independent-hash", "serde", "thiserror", "urlencoding", ] -[[package]] -name = "ic-ic00-types" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "candid", - "ic-base-types", - "ic-btc-interface", - "ic-btc-types-internal", - "ic-error-types", - "ic-protobuf", - "num-traits", - "serde", - "serde_bytes", - "serde_cbor", - "strum", - "strum_macros", -] - -[[package]] -name = "ic-protobuf" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "bincode", - "candid", - "erased-serde", - "maplit", - "prost", - "serde", - "serde_json", - "slog", -] - [[package]] name = "ic-representation-independent-hash" version = "2.5.0" @@ -1856,77 +1224,19 @@ dependencies = [ ] [[package]] -name = "ic-stable-structures" -version = "0.5.6" +name = "ic-signature-verification" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95dce29e3ceb0e6da3e78b305d95365530f2efd2146ca18590c0ef3aa6038568" - -[[package]] -name = "ic-sys" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "hex", - "ic-crypto-sha2", - "lazy_static", - "libc", - "nix", - "phantom_newtype", - "tokio", - "wsl", -] - -[[package]] -name = "ic-types" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" +checksum = "1d8a8115bcd1bfa672e2213a66326b3c93483d3a7a29e33dff6e381c7786c091" dependencies = [ - "base64 0.13.1", - "bincode", - "candid", - "chrono", - "derive_more", - "hex", - "ic-base-types", - "ic-btc-types-internal", - "ic-constants", - "ic-crypto-internal-types", - "ic-crypto-sha2", - "ic-crypto-tree-hash", - "ic-error-types", - "ic-ic00-types", - "ic-protobuf", - "ic-utils", - "maplit", - "once_cell", - "phantom_newtype", - "prost", + "ic-canister-sig-creation", + "ic-certification", + "ic-verify-bls-signature", + "ic_principal", "serde", "serde_bytes", "serde_cbor", - "serde_json", - "serde_with", - "strum", - "strum_macros", - "thiserror", - "thousands", -] - -[[package]] -name = "ic-utils" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "cvt", - "hex", - "ic-sys", - "libc", - "nix", - "prost", - "rand", - "scoped_threadpool", - "serde", - "thiserror", + "sha2 0.10.8", ] [[package]] @@ -1935,10 +1245,9 @@ version = "0.1.0" dependencies = [ "assert_matches", "candid", - "canister_sig_util", - "ic-certification 2.5.0", - "ic-crypto-standalone-sig-verifier", - "ic-types", + "ic-canister-sig-creation", + "ic-certification", + "ic-signature-verification", "identity_core", "identity_credential", "identity_jose", @@ -1949,6 +1258,20 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "ic-verify-bls-signature" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f1f8d75f50002970cc2136f909287bf1d59024fbc80ebffbee871afcbd237" +dependencies = [ + "bls12_381", + "hex", + "lazy_static", + "pairing 0.22.0", + "rand 0.6.5", + "sha2 0.9.9", +] + [[package]] name = "ic0" version = "0.21.1" @@ -1956,19 +1279,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a54b5297861c651551676e8c43df805dad175cc33bc97dbd992edbbb85dcbcdf" [[package]] -name = "ic_bls12_381" -version = "0.8.0" +name = "ic0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c682cb199cd8fcb582a6023325d571a6464edda26c8063fe04b6f6082a1a363c" -dependencies = [ - "digest 0.9.0", - "ff 0.12.1", - "group 0.12.1", - "pairing 0.22.0", - "rand_core 0.6.4", - "subtle", - "zeroize", -] +checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" [[package]] name = "ic_principal" @@ -2101,18 +1415,12 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "identity_core" version = "1.3.1" source = "git+https://github.com/dfinity/identity.rs.git?rev=aa510ef7f441848d6c78058fe51ad4ad1d9bd5d8#aa510ef7f441848d6c78058fe51ad4ad1d9bd5d8" dependencies = [ - "ic-cdk", + "ic-cdk 0.13.2", "iota-crypto", "multibase", "serde", @@ -2135,7 +1443,7 @@ dependencies = [ "identity_document", "identity_verification", "indexmap 2.2.6", - "itertools 0.11.0", + "itertools", "once_cell", "serde", "serde-aux", @@ -2242,7 +1550,7 @@ version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg", + "autocfg 1.3.0", "hashbrown 0.12.3", ] @@ -2257,22 +1565,13 @@ dependencies = [ "serde", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "iota-crypto" version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5db0e2d85e258d6d0db66f4a6bf1e8bdf5b10c3353aa87d98b168778d13fdc1" dependencies = [ - "autocfg", + "autocfg 1.3.0", "digest 0.10.7", "k256", "serde", @@ -2305,15 +1604,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -2384,9 +1674,6 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] [[package]] name = "leb128" @@ -2400,40 +1687,18 @@ version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - [[package]] name = "litemap" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - [[package]] name = "matchers" version = "0.1.0" @@ -2449,15 +1714,6 @@ version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" @@ -2480,7 +1736,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -2495,18 +1751,6 @@ dependencies = [ "data-encoding-macro", ] -[[package]] -name = "nix" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2528,23 +1772,6 @@ dependencies = [ "serde", ] -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand", - "smallvec", - "zeroize", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -2560,25 +1787,13 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg", - "libm", + "autocfg 1.3.0", ] [[package]] @@ -2631,56 +1846,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] -name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2 0.10.8", -] - -[[package]] -name = "pairing" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" -dependencies = [ - "group 0.12.1", -] - -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group 0.13.0", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" +name = "pairing" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" dependencies = [ - "lock_api", - "parking_lot_core", + "group 0.12.1", ] [[package]] -name = "parking_lot_core" -version = "0.9.10" +name = "pairing" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.52.5", + "group 0.13.0", ] [[package]] @@ -2689,40 +1869,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "phantom_newtype" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "candid", - "serde", - "slog", -] - [[package]] name = "pin-project" version = "1.1.5" @@ -2755,17 +1907,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs1" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der", - "pkcs8", - "spki", -] - [[package]] name = "pkcs8" version = "0.10.2" @@ -2786,7 +1927,7 @@ dependencies = [ "base64 0.13.1", "candid", "hex", - "ic-cdk", + "ic-cdk 0.13.2", "reqwest", "schemars", "serde", @@ -2815,30 +1956,11 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b55c4d17d994b637e2f4daf6e5dc5d660d209d5642377d675d7a1c3ab69fa579" dependencies = [ - "arrayvec 0.5.2", + "arrayvec", "typed-arena", "unicode-width", ] -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "primeorder" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" -dependencies = [ - "elliptic-curve", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2872,29 +1994,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "psm" version = "0.1.21" @@ -2919,6 +2018,25 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.8", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.2", + "rand_hc", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi", +] + [[package]] name = "rand" version = "0.8.5" @@ -2926,10 +2044,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", + "rand_chacha 0.3.1", "rand_core 0.6.4", ] +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.3.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -2942,29 +2070,97 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.5.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" dependencies = [ - "getrandom 0.1.16", + "rand_core 0.4.2", ] +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + [[package]] name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom", ] [[package]] -name = "redox_syscall" -version = "0.5.1" +name = "rand_hc" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" dependencies = [ - "bitflags 2.5.0", + "rand_core 0.3.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.8", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", ] [[package]] @@ -3076,34 +2272,13 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom", "libc", - "spin 0.9.8", + "spin", "untrusted", "windows-sys 0.52.0", ] -[[package]] -name = "rsa" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" -dependencies = [ - "const-oid", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8", - "rand_core 0.6.4", - "sha2 0.10.8", - "signature", - "spki", - "subtle", - "zeroize", -] - [[package]] name = "rustc-demangle" version = "0.1.24" @@ -3209,18 +2384,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "scoped_threadpool" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - [[package]] name = "sec1" version = "0.7.3" @@ -3362,37 +2525,27 @@ dependencies = [ ] [[package]] -name = "serde_urlencoded" -version = "0.7.1" +name = "serde_tokenstream" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" dependencies = [ - "form_urlencoded", - "itoa", - "ryu", + "proc-macro2", + "quote", "serde", + "syn 2.0.66", ] [[package]] -name = "serde_with" -version = "1.14.0" +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ + "form_urlencoded", + "itoa", + "ryu", "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", ] [[package]] @@ -3438,15 +2591,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - [[package]] name = "signature" version = "2.2.0" @@ -3457,34 +2601,13 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - [[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg", -] - -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", + "autocfg 1.3.0", ] [[package]] @@ -3503,12 +2626,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -3578,12 +2695,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "subtle-ng" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" - [[package]] name = "syn" version = "1.0.109" @@ -3664,12 +2775,6 @@ dependencies = [ "syn 2.0.66", ] -[[package]] -name = "thousands" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" - [[package]] name = "thread_local" version = "1.1.8" @@ -3732,25 +2837,11 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot", "pin-project-lite", - "signal-hook-registry", "socket2", - "tokio-macros", "windows-sys 0.48.0", ] -[[package]] -name = "tokio-macros" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "tokio-rustls" version = "0.25.0" @@ -3909,16 +3000,6 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "tree-deserializer" -version = "0.9.0" -source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" -dependencies = [ - "ic-crypto-tree-hash", - "leb128", - "serde", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -3943,12 +3024,6 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - [[package]] name = "unicode-width" version = "0.1.13" @@ -3985,12 +3060,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" -[[package]] -name = "utf8-width" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -4018,12 +3087,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4159,15 +3222,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.5", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -4329,12 +3383,6 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" -[[package]] -name = "wsl" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dab7ac864710bdea6594becbea5b5050333cf34fefb0dc319567eb347950d4" - [[package]] name = "wyz" version = "0.5.1" @@ -4344,12 +3392,6 @@ dependencies = [ "tap", ] -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "yoke" version = "0.7.4" @@ -4454,7 +3496,7 @@ dependencies = [ "hex", "hkdf", "log", - "rand", + "rand 0.8.5", "serde", "serde_json", "sha2 0.10.8", diff --git a/Cargo.toml b/Cargo.toml index 9c71ad9..bbeb8ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,9 +28,8 @@ ic-cdk-macros = "0.13" ic-certification = "2.2" ic-http-certification = "2.5" ic-verifiable-credentials = { path = "rust-packages/ic-verifiable-credentials" } - -# II dependencies -canister_sig_util = { git="https://github.com/dfinity/internet-identity", rev="f668535241bb01fa9a7fb508b6579407c8afe59c" } +ic-canister-sig-creation = "1.1" +ic-signature-verification = "0.1.0" [workspace.dependencies.serde] version = "1.0" diff --git a/dummy-issuer/Cargo.toml b/dummy-issuer/Cargo.toml index da813d4..bfe67cb 100644 --- a/dummy-issuer/Cargo.toml +++ b/dummy-issuer/Cargo.toml @@ -9,13 +9,13 @@ crate-type = ["cdylib"] [dependencies] # IC Dependencies candid.workspace = true +ic-canister-sig-creation.workspace = true ic-cdk.workspace = true ic-cdk-macros.workspace = true ic-certification.workspace = true ic-verifiable-credentials.workspace = true - -# II Dependencies -canister_sig_util.workspace = true +# unfortunately, there is a transitive dependency on getrandom which does _not_ compile to wasm unless we add this hacky workaround +ic-crypto-getrandom-for-wasm = { git="https://github.com/dfinity/ic", rev="faacac31032a9b98020475eb608fd63455603556" } # Other dependencies serde_bytes = "0.11" diff --git a/dummy-issuer/src/lib.rs b/dummy-issuer/src/lib.rs index b713c7a..f471c00 100644 --- a/dummy-issuer/src/lib.rs +++ b/dummy-issuer/src/lib.rs @@ -1,7 +1,7 @@ use base64::Engine; use candid::{candid_method, Principal}; -use canister_sig_util::signature_map::{SignatureMap, LABEL_SIG}; -use canister_sig_util::CanisterSigPublicKey; +use ic_canister_sig_creation::signature_map::{CanisterSigInputs, SignatureMap, LABEL_SIG}; +use ic_canister_sig_creation::CanisterSigPublicKey; use ic_cdk::api::{set_certified_data, time}; use ic_cdk_macros::{query, update}; use ic_certification::{labeled_hash, Hash}; @@ -12,8 +12,8 @@ use ic_verifiable_credentials::issuer_api::{ PrepareCredentialRequest, PreparedCredentialData, }; use ic_verifiable_credentials::{ - build_credential_jwt, did_for_principal, vc_jwt_to_jws, vc_signing_input, - vc_signing_input_hash, CredentialParams, + build_credential_jwt, did_for_principal, vc_jwt_to_jws, vc_signing_input, CredentialParams, + VC_SIGNING_INPUT_DOMAIN, }; use lazy_static::lazy_static; use serde_bytes::ByteBuf; @@ -153,16 +153,15 @@ async fn prepare_credential( let Ok(id_alias) = get_alias_from_jwt(&req.signed_id_alias.credential_jws) else { return Err(internal_error("Error getting id_alias")); }; - // let id_alias = get_id_alias(&req.signed_id_alias).unwrap_or(default); let credential_jwt = verified_credential(id_alias, &req.credential_spec); let signing_input = vc_signing_input(&credential_jwt, &CANISTER_SIG_PK).expect("failed getting signing_input"); - let msg_hash = vc_signing_input_hash(&signing_input); - - SIGNATURES.with(|sigs| { - let mut sigs = sigs.borrow_mut(); - sigs.add_signature(&CANISTER_SIG_SEED, msg_hash); - }); + let sig_inputs = CanisterSigInputs { + domain: VC_SIGNING_INPUT_DOMAIN, + message: &signing_input, + seed: &CANISTER_SIG_SEED, + }; + SIGNATURES.with_borrow_mut(|sigs| sigs.add_signature(&sig_inputs)); update_root_hash(); Ok(PreparedCredentialData { prepared_context: Some(ByteBuf::from(credential_jwt.as_bytes())), @@ -190,11 +189,12 @@ fn get_credential(req: GetCredentialRequest) -> Result sig, Err(e) => { diff --git a/rust-packages/ic-verifiable-credentials/Cargo.toml b/rust-packages/ic-verifiable-credentials/Cargo.toml index 44c88c3..58b5c49 100644 --- a/rust-packages/ic-verifiable-credentials/Cargo.toml +++ b/rust-packages/ic-verifiable-credentials/Cargo.toml @@ -9,12 +9,11 @@ edition = "2021" [dependencies] # ic dependencies candid.workspace = true +ic-canister-sig-creation.workspace = true ic-certification.workspace = true -canister_sig_util.workspace = true +ic-signature-verification.workspace = true # vc dependencies -ic-crypto-standalone-sig-verifier = { git = "https://github.com/dfinity/ic", rev = "e69bcc7b319cbb3ebc22ec55af35287741244db6" } -ic-types = { git = "https://github.com/dfinity/ic", rev = "e69bcc7b319cbb3ebc22ec55af35287741244db6" } identity_core = { git = "https://github.com/dfinity/identity.rs.git", rev = "aa510ef7f441848d6c78058fe51ad4ad1d9bd5d8", default-features = false, features = ["ic-wasm"] } identity_credential = { git = "https://github.com/dfinity/identity.rs.git", rev = "aa510ef7f441848d6c78058fe51ad4ad1d9bd5d8", default-features = false , features = ["ic-wasm", "validator"] } identity_jose = { git = "https://github.com/dfinity/identity.rs.git", rev = "aa510ef7f441848d6c78058fe51ad4ad1d9bd5d8", default-features = false} diff --git a/rust-packages/ic-verifiable-credentials/src/lib.rs b/rust-packages/ic-verifiable-credentials/src/lib.rs index 320a2ca..796dff1 100644 --- a/rust-packages/ic-verifiable-credentials/src/lib.rs +++ b/rust-packages/ic-verifiable-credentials/src/lib.rs @@ -1,9 +1,8 @@ use crate::issuer_api::CredentialSpec; use candid::Principal; -use canister_sig_util::{extract_raw_canister_sig_pk_from_der, CanisterSigPublicKey}; +use ic_canister_sig_creation::{extract_raw_canister_sig_pk_from_der, CanisterSigPublicKey}; use ic_certification::Hash; -use ic_crypto_standalone_sig_verifier::verify_canister_sig; -use ic_types::crypto::threshold_sig::IcRootOfTrust; +use ic_signature_verification::verify_canister_sig; use identity_core::common::{Timestamp, Url}; use identity_core::convert::FromJson; use identity_credential::credential::{Credential, CredentialBuilder, Jwt, Subject}; @@ -218,12 +217,13 @@ pub fn verify_credential_jws_with_canister_id( ))); } - let root_pk_bytes: [u8; 96] = root_pk_raw - .try_into() - .map_err(|e| key_decoding_err(&format!("invalid root public key: {}", e)))?; - let root_pk = IcRootOfTrust::from(root_pk_bytes); - verify_canister_sig(&message, signature, canister_sig_pk_raw.as_slice(), root_pk) - .map_err(|e| invalid_signature_err(&format!("signature verification error: {}", e)))?; + verify_canister_sig( + &message, + signature, + canister_sig_pk_raw.as_slice(), + root_pk_raw, + ) + .map_err(|e| invalid_signature_err(&format!("signature verification error: {}", e)))?; let claims: JwtClaims = serde_json::from_slice(jws.claims()) .map_err(|e| invalid_signature_err(&format!("failed parsing JSON JWT claims: {}", e)))?; @@ -686,7 +686,7 @@ mod tests { use super::*; use crate::issuer_api::ArgumentValue; use assert_matches::assert_matches; - use canister_sig_util::{extract_raw_root_pk_from_der, IC_ROOT_PK_DER_PREFIX}; + use ic_canister_sig_creation::{extract_raw_root_pk_from_der, IC_ROOT_PK_DER_PREFIX}; use identity_core::common::Url; use std::collections::HashMap;