From d80c20193a663d5068433e7d283bff938a6d81f3 Mon Sep 17 00:00:00 2001 From: Frederik Rothenberger Date: Tue, 11 Jun 2024 15:02:25 +0200 Subject: [PATCH] Restructure rust dependencies and switch to dfinity iota fork In preparation of moving `vc_util` to this repository, the following changes are made: * switch to DFINITY iota fork * adjust alias parsing to new library * move issuer dependencies to workspace Cargo.toml * pin bls12_381_plus as a workaround for https://github.com/iotaledger/identity.rs/pull/1378 --- Cargo.lock | 1009 +++++++++++++++++++++------- Cargo.toml | 18 +- dummy-issuer/Cargo.toml | 14 +- dummy-issuer/src/lib.rs | 68 +- dummy-issuer/tests/dummy_issuer.rs | 20 +- 5 files changed, 839 insertions(+), 290 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d021eb8..3284262 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,18 +17,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -38,12 +26,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -59,12 +41,27 @@ dependencies = [ "libc", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anyhow" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + [[package]] name = "arrayvec" version = "0.5.2" @@ -100,6 +97,17 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.3.0" @@ -108,9 +116,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.72" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -207,6 +215,18 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -225,6 +245,25 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bls12_381_plus" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcdcbc984ce4bbbba587f9415ecfd5ed15c59b33defe276482c517b26a6a6716" +dependencies = [ + "arrayref", + "elliptic-curve", + "ff 0.13.0", + "group 0.13.0", + "hex", + "pairing 0.23.0", + "rand_core 0.6.4", + "serde", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -265,6 +304,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + [[package]] name = "candid" version = "0.10.8" @@ -303,11 +351,11 @@ dependencies = [ [[package]] name = "canister_sig_util" version = "0.1.0" -source = "git+https://github.com/dfinity/internet-identity?rev=1417991b69660046cc0b4f1ea93a5903b037f3b1#1417991b69660046cc0b4f1ea93a5903b037f3b1" +source = "git+https://github.com/dfinity/internet-identity?rev=14607ee43877b1ccbbea18d17e5a36cda15480bd#14607ee43877b1ccbbea18d17e5a36cda15480bd" dependencies = [ "candid", "hex", - "ic-cdk 0.12.1", + "ic-cdk", "ic-certification 2.5.0", "ic-representation-independent-hash", "lazy_static", @@ -317,11 +365,54 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "cargo-license" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "653542a7f5db653bf79ee4b6455c23f8e6b8a9c38c6310fbe14528728c14bd19" +dependencies = [ + "ansi_term", + "anyhow", + "atty", + "cargo_metadata", + "clap", + "csv", + "getopts", + "semver", + "serde", + "serde_derive", + "serde_json", + "toml", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" [[package]] name = "cfg-if" @@ -342,6 +433,45 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_derive", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_derive" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "comparable" version = "0.5.4" @@ -471,44 +601,37 @@ dependencies = [ ] [[package]] -name = "curve25519-dalek" -version = "3.2.0" +name = "csv" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", + "csv-core", + "itoa", + "ryu", + "serde", ] [[package]] -name = "curve25519-dalek" -version = "4.1.2" +name = "csv-core" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "platforms", - "rustc_version", - "subtle", - "zeroize", + "memchr", ] [[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" +name = "curve25519-dalek" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", ] [[package]] @@ -626,10 +749,10 @@ dependencies = [ ] [[package]] -name = "did_url" -version = "0.1.0" +name = "did_url_parser" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d5f6334e473e3bb5650ab4ef3e4c910296b76968e62758e7c66157ff767c05" +checksum = "8095a051342f829a19c51eca6949da516b4de2b324e94a1e0dc8c5eb87ebe439" dependencies = [ "form_urlencoded", "serde", @@ -662,14 +785,32 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + [[package]] name = "dummy_issuer" version = "0.1.0" dependencies = [ + "bls12_381_plus", "candid", "canister_sig_util", - "ic-cdk 0.12.1", - "ic-cdk-macros 0.8.4", + "ic-cdk", + "ic-cdk-macros", "ic-certification 2.5.0", "identity_core", "identity_credential", @@ -690,8 +831,8 @@ dependencies = [ "anyhow", "base64 0.21.7", "candid", - "ic-cdk 0.12.1", - "ic-cdk-macros 0.8.4", + "ic-cdk", + "ic-cdk-macros", "ic-http-certification", "include_dir", "lazy_static", @@ -720,15 +861,6 @@ dependencies = [ "spki", ] -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "signature", -] - [[package]] name = "ed25519-consensus" version = "2.1.0" @@ -744,21 +876,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ed25519-zebra" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" -dependencies = [ - "curve25519-dalek 4.1.2", - "ed25519", - "hashbrown 0.14.5", - "hex", - "rand_core 0.6.4", - "sha2 0.10.8", - "zeroize", -] - [[package]] name = "either" version = "1.12.0" @@ -785,6 +902,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "env_logger" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -800,6 +930,16 @@ dependencies = [ "serde", ] +[[package]] +name = "ff" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f40b2dcd8bc322217a5f6559ae5f9e9d1de202a2ecee2e9eafcbece7562a4f" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "ff" version = "0.12.1" @@ -816,16 +956,11 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ + "bitvec", "rand_core 0.6.4", "subtle", ] -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - [[package]] name = "fnv" version = "1.0.7" @@ -841,6 +976,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures-channel" version = "0.3.30" @@ -914,6 +1055,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -948,6 +1098,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "group" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" +dependencies = [ + "byteorder", + "ff 0.10.1", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "group" version = "0.12.1" @@ -982,7 +1144,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -1006,10 +1168,6 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] [[package]] name = "heck" @@ -1017,6 +1175,15 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1032,6 +1199,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + [[package]] name = "hmac" version = "0.12.1" @@ -1075,12 +1251,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http 1.1.0", "http-body", "pin-project-lite", @@ -1088,9 +1264,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "d0e7a4dd27b9476dc40cb050d3632d3bba3a70ddbff012285f7f8559a1e7e545" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" @@ -1216,19 +1398,6 @@ dependencies = [ "serde_bytes", ] -[[package]] -name = "ic-cdk" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3d204af0b11c45715169c997858edb58fa8407d08f4fae78a6b415dd39a362" -dependencies = [ - "candid", - "ic-cdk-macros 0.8.4", - "ic0", - "serde", - "serde_bytes", -] - [[package]] name = "ic-cdk" version = "0.13.2" @@ -1236,26 +1405,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8859bc2b863a77750acf199e1fb7e3fc403e1b475855ba13f59cb4e4036d238" dependencies = [ "candid", - "ic-cdk-macros 0.13.2", + "ic-cdk-macros", "ic0", "serde", "serde_bytes", ] -[[package]] -name = "ic-cdk-macros" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a618e4020cea88e933d8d2f8c7f86d570ec06213506a80d4f2c520a9bba512" -dependencies = [ - "candid", - "proc-macro2", - "quote", - "serde", - "serde_tokenstream", - "syn 1.0.109", -] - [[package]] name = "ic-cdk-macros" version = "0.13.2" @@ -1415,7 +1570,7 @@ version = "0.9.0" source = "git+https://github.com/dfinity/ic?rev=e69bcc7b319cbb3ebc22ec55af35287741244db6#e69bcc7b319cbb3ebc22ec55af35287741244db6" dependencies = [ "base64 0.13.1", - "curve25519-dalek 3.2.0", + "curve25519-dalek", "ed25519-consensus", "hex", "ic-crypto-internal-basic-sig-der-utils", @@ -1478,7 +1633,7 @@ dependencies = [ "ic_bls12_381", "itertools 0.12.1", "lazy_static", - "pairing", + "pairing 0.22.0", "paste", "rand", "rand_chacha", @@ -1792,23 +1947,141 @@ dependencies = [ "digest 0.9.0", "ff 0.12.1", "group 0.12.1", - "pairing", + "pairing 0.22.0", "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] -name = "ic_principal" -version = "0.1.1" +name = "ic_principal" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" +dependencies = [ + "crc32fast", + "data-encoding", + "serde", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ - "crc32fast", - "data-encoding", - "serde", - "sha2 0.10.8", - "thiserror", + "proc-macro2", + "quote", + "syn 2.0.66", ] [[package]] @@ -1819,10 +2092,10 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "identity_core" -version = "0.7.0-alpha.6" -source = "git+https://github.com/frederikrothenberger/identity.rs.git?branch=frederik/wasm-test#be73e6db80562e432e30dc8fcaba0c4f9561d4ed" +version = "1.3.0" +source = "git+https://github.com/dfinity/identity.rs.git?rev=63d3683cf6b6e48136ffb6812125dd8addfbbe75#63d3683cf6b6e48136ffb6812125dd8addfbbe75" dependencies = [ - "ic-cdk 0.12.1", + "ic-cdk", "iota-crypto", "multibase", "serde", @@ -1836,17 +2109,20 @@ dependencies = [ [[package]] name = "identity_credential" -version = "0.7.0-alpha.6" -source = "git+https://github.com/frederikrothenberger/identity.rs.git?branch=frederik/wasm-test#be73e6db80562e432e30dc8fcaba0c4f9561d4ed" +version = "1.3.0" +source = "git+https://github.com/dfinity/identity.rs.git?rev=63d3683cf6b6e48136ffb6812125dd8addfbbe75#63d3683cf6b6e48136ffb6812125dd8addfbbe75" dependencies = [ + "async-trait", "identity_core", "identity_did", "identity_document", "identity_verification", - "indexmap", + "indexmap 2.2.6", "itertools 0.11.0", "once_cell", "serde", + "serde-aux", + "serde_json", "serde_repr", "strum", "thiserror", @@ -1855,10 +2131,10 @@ dependencies = [ [[package]] name = "identity_did" -version = "0.7.0-alpha.6" -source = "git+https://github.com/frederikrothenberger/identity.rs.git?branch=frederik/wasm-test#be73e6db80562e432e30dc8fcaba0c4f9561d4ed" +version = "1.3.0" +source = "git+https://github.com/dfinity/identity.rs.git?rev=63d3683cf6b6e48136ffb6812125dd8addfbbe75#63d3683cf6b6e48136ffb6812125dd8addfbbe75" dependencies = [ - "did_url", + "did_url_parser", "form_urlencoded", "identity_core", "serde", @@ -1868,14 +2144,14 @@ dependencies = [ [[package]] name = "identity_document" -version = "0.7.0-alpha.6" -source = "git+https://github.com/frederikrothenberger/identity.rs.git?branch=frederik/wasm-test#be73e6db80562e432e30dc8fcaba0c4f9561d4ed" +version = "1.3.0" +source = "git+https://github.com/dfinity/identity.rs.git?rev=63d3683cf6b6e48136ffb6812125dd8addfbbe75#63d3683cf6b6e48136ffb6812125dd8addfbbe75" dependencies = [ - "did_url", + "did_url_parser", "identity_core", "identity_did", "identity_verification", - "indexmap", + "indexmap 2.2.6", "serde", "strum", "thiserror", @@ -1883,16 +2159,13 @@ dependencies = [ [[package]] name = "identity_jose" -version = "0.7.0-alpha.6" -source = "git+https://github.com/frederikrothenberger/identity.rs.git?branch=frederik/wasm-test#be73e6db80562e432e30dc8fcaba0c4f9561d4ed" +version = "1.3.0" +source = "git+https://github.com/dfinity/identity.rs.git?rev=63d3683cf6b6e48136ffb6812125dd8addfbbe75#63d3683cf6b6e48136ffb6812125dd8addfbbe75" dependencies = [ - "ic-crypto-standalone-sig-verifier", - "ic-types", "identity_core", "iota-crypto", + "json-proof-token", "serde", - "serde_bytes", - "serde_cbor", "serde_json", "subtle", "thiserror", @@ -1901,25 +2174,28 @@ dependencies = [ [[package]] name = "identity_verification" -version = "0.7.0-alpha.6" -source = "git+https://github.com/frederikrothenberger/identity.rs.git?branch=frederik/wasm-test#be73e6db80562e432e30dc8fcaba0c4f9561d4ed" +version = "1.3.0" +source = "git+https://github.com/dfinity/identity.rs.git?rev=63d3683cf6b6e48136ffb6812125dd8addfbbe75#63d3683cf6b6e48136ffb6812125dd8addfbbe75" dependencies = [ "identity_core", "identity_did", "identity_jose", "serde", + "serde_json", "strum", "thiserror", ] [[package]] name = "idna" -version = "0.5.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", + "smallvec", + "utf8_iter", ] [[package]] @@ -1942,6 +2218,16 @@ dependencies = [ "quote", ] +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.2.6" @@ -1969,14 +2255,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5db0e2d85e258d6d0db66f4a6bf1e8bdf5b10c3353aa87d98b168778d13fdc1" dependencies = [ "autocfg", - "curve25519-dalek 3.2.0", "digest 0.10.7", - "ed25519-zebra", "k256", "serde", "sha2 0.10.8", - "x25519-dalek", - "zeroize", ] [[package]] @@ -1985,6 +2267,17 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "itertools" version = "0.11.0" @@ -2018,6 +2311,34 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json-proof-token" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "179551c27c512c948af1edaf4bd7e1d1486d223f8ec4fd41cd760f7645fd4197" +dependencies = [ + "cargo-license", + "data-encoding", + "indexmap 2.2.6", + "json-unflattening", + "serde", + "serde_json", + "thiserror", + "zkryptium", +] + +[[package]] +name = "json-unflattening" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b1496012e0eb11ec2956f97ab48a5da79bf2889ed69e2774ca5ec4f02d34d28" +dependencies = [ + "regex", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "k256" version = "0.13.3" @@ -2031,6 +2352,15 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -2058,6 +2388,12 @@ 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" @@ -2233,15 +2569,15 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "object" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" dependencies = [ "memchr", ] @@ -2264,6 +2600,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + [[package]] name = "overload" version = "0.1.1" @@ -2291,6 +2633,15 @@ 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" @@ -2407,12 +2758,6 @@ dependencies = [ "spki", ] -[[package]] -name = "platforms" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" - [[package]] name = "pocket-ic" version = "3.1.0" @@ -2423,7 +2768,7 @@ dependencies = [ "base64 0.13.1", "candid", "hex", - "ic-cdk 0.13.2", + "ic-cdk", "reqwest", "schemars", "serde", @@ -2476,11 +2821,35 @@ dependencies = [ "elliptic-curve", ] +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" -version = "1.0.84" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] @@ -2526,6 +2895,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -2576,14 +2951,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", ] [[package]] @@ -2597,13 +2972,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.3", + "regex-syntax 0.8.4", ] [[package]] @@ -2614,9 +2989,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -2717,15 +3092,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - [[package]] name = "rustls" version = "0.22.4" @@ -2879,6 +3245,9 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] [[package]] name = "serde" @@ -2889,6 +3258,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-aux" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2e8bfba469d06512e11e3311d4d051a4a387a5b42d010404fecf3200321c95" +dependencies = [ + "serde", + "serde_json", +] + [[package]] name = "serde_bytes" version = "0.11.14" @@ -2936,6 +3315,7 @@ version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ + "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -3021,6 +3401,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -3117,6 +3507,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" version = "0.1.15" @@ -3198,6 +3594,38 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" + [[package]] name = "thiserror" version = "1.0.61" @@ -3266,25 +3694,20 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.37.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -3301,9 +3724,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", @@ -3346,6 +3769,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + [[package]] name = "tower" version = "0.4.13" @@ -3487,27 +3919,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.11.0" @@ -3516,9 +3933,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "untrusted" @@ -3528,9 +3945,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" dependencies = [ "form_urlencoded", "idna", @@ -3544,12 +3961,24 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "valuable" version = "0.1.0" @@ -3559,7 +3988,7 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vc_util" version = "0.1.0" -source = "git+https://github.com/dfinity/internet-identity?rev=1417991b69660046cc0b4f1ea93a5903b037f3b1#1417991b69660046cc0b4f1ea93a5903b037f3b1" +source = "git+https://github.com/dfinity/internet-identity?rev=14607ee43877b1ccbbea18d17e5a36cda15480bd#14607ee43877b1ccbbea18d17e5a36cda15480bd" dependencies = [ "candid", "canister_sig_util", @@ -3694,9 +4123,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "3c452ad30530b54a4d8e71952716a212b08efd0f3562baa66c29a618b07da7c3" dependencies = [ "rustls-pki-types", ] @@ -3717,6 +4146,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3881,6 +4319,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wsl" version = "0.1.0" @@ -3888,14 +4338,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dab7ac864710bdea6594becbea5b5050333cf34fefb0dc319567eb347950d4" [[package]] -name = "x25519-dalek" -version = "1.1.1" +name = "wyz" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.5.1", - "zeroize", + "tap", ] [[package]] @@ -3905,23 +4353,48 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] -name = "zerocopy" -version = "0.7.34" +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" dependencies = [ - "zerocopy-derive", + "zerofrom-derive", ] [[package]] -name = "zerocopy-derive" -version = "0.7.34" +name = "zerofrom-derive" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", "syn 2.0.66", + "synstructure", ] [[package]] @@ -3943,3 +4416,51 @@ dependencies = [ "quote", "syn 2.0.66", ] + +[[package]] +name = "zerovec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "zkryptium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c734c171ed591a19dc1127351eb1b4d91864d3e53b2b6e9992bffcb7febf364a" +dependencies = [ + "bls12_381_plus", + "cargo-license", + "digest 0.10.7", + "dotenv", + "elliptic-curve", + "env_logger", + "ff 0.13.0", + "group 0.10.0", + "hex", + "hkdf", + "log", + "rand", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] diff --git a/Cargo.toml b/Cargo.toml index a126b75..0947aab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,9 +21,21 @@ lazy_static = "1.4" serde_cbor = "0.11" anyhow = "1.0" candid = "0.10" -ic-cdk = "0.12" -ic-cdk-macros = "0.8" -ic-http-certification = "2.5.0" +ic-cdk = "0.13" +ic-cdk-macros = "0.13" +ic-certification = "2.2" +ic-http-certification = "2.5" + +# II dependencies +vc_util = { git="https://github.com/dfinity/internet-identity", rev="14607ee43877b1ccbbea18d17e5a36cda15480bd" } +canister_sig_util = { git="https://github.com/dfinity/internet-identity", rev="14607ee43877b1ccbbea18d17e5a36cda15480bd" } + +# vc dependencies +identity_core = { git = "https://github.com/dfinity/identity.rs.git", rev = "63d3683cf6b6e48136ffb6812125dd8addfbbe75", default-features = false, features = ["ic-wasm"] } +identity_credential = { git = "https://github.com/dfinity/identity.rs.git", rev = "63d3683cf6b6e48136ffb6812125dd8addfbbe75", default-features = false , features = ["ic-wasm", "validator"] } +identity_jose = { git = "https://github.com/dfinity/identity.rs.git", rev = "63d3683cf6b6e48136ffb6812125dd8addfbbe75", default-features = false} +# Pin dependency due to issues in the upstream iota library: https://github.com/iotaledger/identity.rs/pull/1378 +bls12_381_plus = "=0.8.15" [workspace.dependencies.serde] version = "1.0" diff --git a/dummy-issuer/Cargo.toml b/dummy-issuer/Cargo.toml index 117b87a..2a2ea58 100644 --- a/dummy-issuer/Cargo.toml +++ b/dummy-issuer/Cargo.toml @@ -11,13 +11,15 @@ crate-type = ["cdylib"] candid.workspace = true ic-cdk.workspace = true ic-cdk-macros.workspace = true -ic-certification = "2.2" +ic-certification.workspace = true + # II Dependencies -vc_util = { git="https://github.com/dfinity/internet-identity", rev="1417991b69660046cc0b4f1ea93a5903b037f3b1" } -canister_sig_util = { git="https://github.com/dfinity/internet-identity", rev="1417991b69660046cc0b4f1ea93a5903b037f3b1" } -identity_jose = { git = "https://github.com/frederikrothenberger/identity.rs.git", branch = "frederik/wasm-test", default-features = false, features = ["iccs"]} -identity_credential = { git = "https://github.com/frederikrothenberger/identity.rs.git", branch = "frederik/wasm-test", default-features = false , features = ["validator"] } -identity_core = { git = "https://github.com/frederikrothenberger/identity.rs.git", branch = "frederik/wasm-test", default-features = false } +vc_util.workspace = true +canister_sig_util.workspace = true +identity_jose.workspace = true +identity_credential.workspace = true +identity_core.workspace = true +bls12_381_plus.workspace = true # Other dependencies serde_bytes = "0.11" serde_json = "1" diff --git a/dummy-issuer/src/lib.rs b/dummy-issuer/src/lib.rs index 5b2f85e..bf0c8f6 100644 --- a/dummy-issuer/src/lib.rs +++ b/dummy-issuer/src/lib.rs @@ -6,13 +6,11 @@ use ic_cdk_macros::{query, update}; use ic_certification::{labeled_hash, Hash}; use identity_core::convert::FromJson; use identity_credential::credential::Subject; -use identity_credential::error::Error as JwtVcError; -use identity_credential::validator::JwtValidationError; use identity_jose::jws::Decoder; use identity_jose::jwt::JwtClaims; use lazy_static::lazy_static; use serde_bytes::ByteBuf; -use serde_json::Value; +use serde_json::{Map, Value}; use sha2::{Digest, Sha256}; use std::cell::RefCell; use vc_util::issuer_api::{ @@ -80,50 +78,54 @@ async fn derivation_origin( }) } -fn jwt_error(custom_message: &'static str) -> JwtValidationError { - JwtValidationError::CredentialStructure(JwtVcError::InconsistentCredentialJwtClaims( - custom_message, - )) -} - fn internal_error(msg: &str) -> IssueCredentialError { IssueCredentialError::Internal(String::from(msg)) } // Decodes the id_alias JWS received from II and returns the principal. // This function doesn't perform any verification of the signature. -fn get_id_alias(signed_id_alias: &SignedIdAlias) -> Result { - ///// Decode JWS. - let decoder: Decoder = Decoder::new(); +fn get_id_alias(id_alias: &SignedIdAlias) -> Result { + let decoder = Decoder::new(); let jws = decoder - .decode_compact_serialization(&signed_id_alias.credential_jws.as_ref(), None) - .map_err(|_| jwt_error("credential JWS parsing error"))?; + .decode_compact_serialization(id_alias.credential_jws.as_ref(), None) + .map_err(|e| format!("credential JWS parsing error: {}", e))?; let claims: JwtClaims = serde_json::from_slice(jws.claims()) - .map_err(|_| jwt_error("failed parsing JSON JWT claims"))?; - let vc = claims - .vc() - .ok_or(jwt_error("missing \"vc\" claim in id_alias JWT claims"))?; - let subject_value = vc.get("credentialSubject").ok_or(jwt_error( - "missing \"credentialSubject\" claim in id_alias JWT vc", - ))?; + .map_err(|e| format!("failed parsing JSON JWT claims: {}", e))?; + extract_id_alias(&claims).map_err(|e| e.to_string()) +} + +fn extract_id_alias(claims: &JwtClaims) -> Result { + let vc = extract_vc_claims(claims)?; + let subject_value = vc + .get("credentialSubject") + .ok_or("missing \"credentialSubject\" claim in id_alias JWT vc")?; let subject = Subject::from_json_value(subject_value.clone()) - .map_err(|_| jwt_error("malformed \"credentialSubject\" claim in id_alias JWT vc"))?; + .map_err(|_| "malformed \"credentialSubject\" claim in id_alias JWT vc")?; let Value::Object(ref spec) = subject.properties["InternetIdentityIdAlias"] else { - return Err(jwt_error( - "missing \"InternetIdentityIdAlias\" claim in id_alias JWT vc", - )); + return Err("missing \"InternetIdentityIdAlias\" claim in id_alias JWT vc"); }; - let alias_value = spec.get("hasIdAlias").ok_or(jwt_error( - "missing \"hasIdAlias\" parameter in id_alias JWT vc", - ))?; + let alias_value = spec + .get("hasIdAlias") + .ok_or("missing \"hasIdAlias\" parameter in id_alias JWT vc")?; let Value::String(alias) = alias_value else { - return Err(jwt_error( - "wrong type of \"hasIdAlias\" value in id_alias JWT vc", - )); + return Err("wrong type of \"hasIdAlias\" value in id_alias JWT vc"); }; let id_alias = Principal::from_text(alias) - .map_err(|_| jwt_error("malformed \"hasIdAlias\"-value claim in id_alias JWT vc"))?; - return Ok(id_alias); + .map_err(|_| "malformed \"hasIdAlias\"-value claim in id_alias JWT vc")?; + Ok(id_alias) +} + +fn extract_vc_claims(claims: &JwtClaims) -> Result, &'static str> { + let vc_claims = claims + .custom() + .ok_or("missing custom claims in JWT claims")? + .as_object() + .ok_or("malformed custom claims in JWT claims")? + .get("vc") + .ok_or("missing vc claims in JWT custom claims")? + .as_object() + .ok_or("malformed vc claims in JWT custom claims")?; + Ok(vc_claims.clone()) } fn exp_timestamp_s() -> u32 { diff --git a/dummy-issuer/tests/dummy_issuer.rs b/dummy-issuer/tests/dummy_issuer.rs index e39a217..3f501b5 100644 --- a/dummy-issuer/tests/dummy_issuer.rs +++ b/dummy-issuer/tests/dummy_issuer.rs @@ -8,7 +8,7 @@ use identity_jose::jws::Decoder; use identity_jose::jwt::JwtClaims; use pocket_ic::{PocketIc, WasmResult}; use serde::de::DeserializeOwned; -use serde_json::Value; +use serde_json::{Map, Value}; use vc_util::issuer_api::{ ArgumentValue, CredentialSpec, DerivationOriginData, DerivationOriginError, DerivationOriginRequest, GetCredentialRequest, Icrc21ConsentInfo, Icrc21ConsentPreferences, @@ -203,6 +203,19 @@ fn jwt_error(custom_message: &'static str) -> JwtValidationError { )) } +fn extract_vc_claims(claims: &JwtClaims) -> Result, &'static str> { + let vc_claims = claims + .custom() + .ok_or("missing custom claims in JWT claims")? + .as_object() + .ok_or("malformed custom claims in JWT claims")? + .get("vc") + .ok_or("missing vc claims in JWT custom claims")? + .as_object() + .ok_or("malformed vc claims in JWT custom claims")?; + Ok(vc_claims.clone()) +} + // Decodes a Verifiable Credential JWT and returns the value within `"credentialSubject`. // This function doesn't perform any verification of the signature. fn get_credential_from_jwt(jwt_vc: String) -> Result { @@ -213,9 +226,8 @@ fn get_credential_from_jwt(jwt_vc: String) -> Result .map_err(|_| jwt_error("credential JWS parsing error"))?; let claims: JwtClaims = serde_json::from_slice(jws.claims()) .map_err(|_| jwt_error("failed parsing JSON JWT claims"))?; - let vc = claims - .vc() - .ok_or(jwt_error("missing \"vc\" claim in id_alias JWT claims"))?; + let vc = extract_vc_claims(&claims) + .map_err(|_| jwt_error("missing \"vc\" claim in id_alias JWT claims"))?; let subject_value = vc.get("credentialSubject").ok_or(jwt_error( "missing \"credentialSubject\" claim in id_alias JWT vc", ))?;