From 386b1bb06ecb00f0bb197d30eb5ec1d963965c7e Mon Sep 17 00:00:00 2001 From: themicp Date: Tue, 1 Oct 2024 09:52:44 +0000 Subject: [PATCH 01/20] Add as_element to PrivateKey --- fastcrypto-tbls/src/ecies_v0.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fastcrypto-tbls/src/ecies_v0.rs b/fastcrypto-tbls/src/ecies_v0.rs index f545375559..351d01a992 100644 --- a/fastcrypto-tbls/src/ecies_v0.rs +++ b/fastcrypto-tbls/src/ecies_v0.rs @@ -76,6 +76,10 @@ where proof, } } + + pub fn as_element(&self) -> &G::ScalarType { + &self.0 + } } impl PublicKey From 560d2582b39727f7e685ac2b924391bb00fce26d Mon Sep 17 00:00:00 2001 From: themicp Date: Tue, 29 Oct 2024 19:14:50 +0000 Subject: [PATCH 02/20] Add new implementation for secp256k1 that works with DKG --- Cargo.lock | 1624 ++++++++++++---------------- fastcrypto/Cargo.toml | 27 +- fastcrypto/src/groups/mod.rs | 1 + fastcrypto/src/groups/secp256k1.rs | 298 +++++ fastcrypto/src/secp256r1/mod.rs | 7 +- 5 files changed, 991 insertions(+), 966 deletions(-) create mode 100644 fastcrypto/src/groups/secp256k1.rs diff --git a/Cargo.lock b/Cargo.lock index 3362762737..73f951e8ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,24 +15,24 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", "generic-array", @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if 1.0.0", "cipher", @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -65,46 +65,85 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "anes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" +[[package]] +name = "anstream" +version = "0.6.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" +dependencies = [ + "anstyle", + "windows-sys 0.59.0", +] [[package]] name = "ark-bls12-377" @@ -156,7 +195,7 @@ dependencies = [ "blake2", "derivative", "digest 0.10.7", - "sha2 0.10.6", + "sha2 0.10.8", "tracing", ] @@ -190,7 +229,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -213,7 +252,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -259,7 +298,7 @@ dependencies = [ "ark-relations", "ark-std", "derivative", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-traits", "tracing", @@ -297,7 +336,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -335,25 +374,26 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "assert_cmd" -version = "2.0.11" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" +checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d" dependencies = [ "anstyle", "bstr", "doc-comment", + "libc", "predicates", "predicates-core", "predicates-tree", @@ -379,31 +419,25 @@ checksum = "7460f7dd8e100147b82a63afca1a20eb6c231ee36b90ba7272e14951cb58af59" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -418,15 +452,9 @@ checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.0" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" @@ -458,13 +486,13 @@ checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bellpepper" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89c91b2463f99a3a527a16a5b6862f257ee8188d3cf1fbc53af06fb61c09f4f" +checksum = "9ae286c2cb403324ab644c7cc68dceb25fe52ca9429908a726d7ed272c1edf7b" dependencies = [ "bellpepper-core", "byteorder", - "ff 0.13.0", + "ff", ] [[package]] @@ -475,7 +503,7 @@ checksum = "1d8abb418570756396d722841b19edfec21d4e89e1cf8990610663040ecb1aea" dependencies = [ "blake2s_simd", "byteorder", - "ff 0.13.0", + "ff", "serde", "thiserror", ] @@ -527,9 +555,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitmaps" @@ -610,18 +638,18 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "block-padding" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a90ec2df9600c28a01c56c4784c9207a96d2451833aeceb8cc97e4c9548bb78" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ "generic-array", ] [[package]] name = "blst" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" dependencies = [ "cc", "glob", @@ -637,8 +665,8 @@ checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29" dependencies = [ "blst", "byte-slice-cast", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "pairing", "rand_core", "serde", @@ -653,12 +681,11 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.4.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", - "once_cell", "regex-automata", "serde", ] @@ -685,9 +712,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -697,15 +724,15 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cast" @@ -724,9 +751,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.6" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -740,6 +770,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -752,9 +788,9 @@ dependencies = [ [[package]] name = "ciborium" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" dependencies = [ "ciborium-io", "ciborium-ll", @@ -763,15 +799,15 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" [[package]] name = "ciborium-ll" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", "half", @@ -789,9 +825,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.23" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "bitflags 1.3.2", "clap_lex 0.2.4", @@ -801,30 +837,36 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ - "bitflags 1.3.2", + "clap_builder", "clap_derive", - "clap_lex 0.3.2", - "is-terminal", - "once_cell", - "strsim 0.10.0", - "termcolor", +] + +[[package]] +name = "clap_builder" +version = "4.5.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" +dependencies = [ + "anstream", + "anstyle", + "clap_lex 0.7.2", + "strsim", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] @@ -838,12 +880,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" -dependencies = [ - "os_str_bytes", -] +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clear_on_drop" @@ -854,17 +893,23 @@ dependencies = [ "cc", ] +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -874,9 +919,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -891,7 +936,7 @@ dependencies = [ "atty", "cast", "ciborium", - "clap 3.2.23", + "clap 3.2.25", "criterion-plot", "itertools 0.10.5", "lazy_static", @@ -916,7 +961,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.1.8", + "clap 4.5.20", "criterion-plot", "is-terminal", "itertools 0.10.5", @@ -945,54 +990,40 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if 1.0.0", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] -name = "crypto-bigint" -version = "0.4.9" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core", @@ -1054,8 +1085,8 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", - "syn 2.0.77", + "strsim", + "syn 2.0.85", ] [[package]] @@ -1066,9 +1097,15 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.85", ] +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + [[package]] name = "der" version = "0.6.1" @@ -1082,9 +1119,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.5" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e58dffcdcc8ee7b22f0c1f71a69243d7c2d9ad87b5a14361f2424a1565c219" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468 0.7.0", @@ -1113,15 +1150,15 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] @@ -1159,33 +1196,22 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dyn-clone" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" - -[[package]] -name = "ecdsa" -version = "0.14.8" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" -version = "0.16.6" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a48e5d537b8a30c0b023116d981b16334be1485af7ca68db3a2b7024cbc957fd" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.7.5", + "der 0.7.9", "digest 0.10.7", - "elliptic-curve 0.13.4", - "rfc6979 0.4.0", - "signature 2.1.0", + "elliptic-curve", + "rfc6979", + "signature", + "spki 0.7.3", ] [[package]] @@ -1205,81 +1231,46 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" - -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array", - "group 0.12.1", - "pkcs8 0.9.0", - "rand_core", - "sec1 0.3.0", - "subtle", - "zeroize", -] +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" -version = "0.13.4" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c71eaa367f2e5d556414a8eea812bc62985c879748d6403edabd9cb03f16e7" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.1", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array", - "group 0.13.0", + "group", "pem-rfc7468 0.7.0", "pkcs8 0.10.2", "rand_core", - "sec1 0.7.1", + "sec1", "subtle", "zeroize", ] [[package]] -name = "errno" -version = "0.2.8" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "exitcode" version = "1.1.2" @@ -1298,7 +1289,7 @@ dependencies = [ "ark-serialize", "auto_ops", "base58", - "base64 0.21.0", + "base64 0.21.7", "base64ct", "bcs", "bech32", @@ -1313,9 +1304,9 @@ dependencies = [ "curve25519-dalek-ng", "derive_more", "digest 0.10.7", - "ecdsa 0.16.6", + "ecdsa", "ed25519-consensus", - "elliptic-curve 0.13.4", + "elliptic-curve", "fastcrypto-derive", "faster-hex", "generic-array", @@ -1325,14 +1316,14 @@ dependencies = [ "k256", "lazy_static", "merlin", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "once_cell", "p256", "proptest", "radix64", "rand", "readonly", - "rfc6979 0.4.0", + "rfc6979", "rsa", "rust-base58", "rustc-hex", @@ -1343,9 +1334,9 @@ dependencies = [ "serde-reflection", "serde_json", "serde_with", - "sha2 0.10.6", - "sha3 0.10.6", - "signature 2.1.0", + "sha2 0.10.8", + "sha3 0.10.8", + "signature", "static_assertions", "thiserror", "tokio", @@ -1361,7 +1352,7 @@ version = "0.1.1" dependencies = [ "assert_cmd", "bcs", - "clap 4.1.8", + "clap 4.5.20", "exitcode", "fastcrypto", "fastcrypto-vdf", @@ -1392,7 +1383,7 @@ dependencies = [ "itertools 0.10.5", "rand", "serde", - "sha3 0.10.6", + "sha3 0.10.8", "tap", "tracing", "typenum", @@ -1408,7 +1399,7 @@ dependencies = [ "fastcrypto", "hex", "lazy_static", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-bigint-dig", "num-integer", "num-prime", @@ -1440,13 +1431,13 @@ dependencies = [ "criterion 0.5.1", "derive_more", "fastcrypto", - "ff 0.13.0", + "ff", "hex", "im", "itertools 0.12.1", "lazy_static", "neptune", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "once_cell", "poseidon-ark", "proptest", @@ -1468,22 +1459,9 @@ checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" [[package]] name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "ff" -version = "0.12.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core", - "subtle", -] +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "ff" @@ -1520,11 +1498,17 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -1537,9 +1521,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1547,33 +1531,33 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-io", @@ -1621,9 +1605,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -1631,9 +1615,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1641,24 +1625,13 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core", - "subtle", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand", "rand_core", "rand_xorshift", @@ -1667,18 +1640,19 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +dependencies = [ + "cfg-if 1.0.0", + "crunchy", +] [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.6", -] [[package]] name = "hashbrown" @@ -1686,14 +1660,25 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", ] [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1706,18 +1691,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" @@ -1736,9 +1718,9 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -1788,15 +1770,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1813,9 +1795,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", @@ -1831,9 +1813,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -1842,9 +1824,8 @@ dependencies = [ "http-body", "hyper", "pin-project-lite", - "socket2 0.5.7", + "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1857,9 +1838,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1881,9 +1862,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1895,45 +1876,32 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "block-padding 0.3.2", + "block-padding 0.3.3", "generic-array", ] [[package]] -name = "instant" -version = "0.1.12" +name = "ipnet" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] -name = "io-lifetimes" -version = "1.0.6" +name = "is-terminal" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ + "hermit-abi 0.4.0", "libc", - "windows-sys 0.45.0", + "windows-sys 0.52.0", ] [[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" - -[[package]] -name = "is-terminal" -version = "0.4.9" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi 0.3.1", - "rustix 0.38.31", - "windows-sys 0.48.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -1955,109 +1923,95 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.11.6" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if 1.0.0", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.6", - "sha3 0.10.6", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2 0.10.8", + "signature", ] [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin", ] [[package]] name = "libc" -version = "0.2.155" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libm" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" - -[[package]] -name = "linux-raw-sys" -version = "0.1.4" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.7.8" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.15.0", ] [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] -name = "memoffset" -version = "0.8.0" +name = "merlin" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - -[[package]] -name = "merlin" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ "byteorder", "keccak", @@ -2073,22 +2027,23 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2102,7 +2057,7 @@ dependencies = [ "blake2s_simd", "blstrs", "byteorder", - "ff 0.13.0", + "ff", "generic-array", "log", "pasta_curves", @@ -2112,11 +2067,11 @@ dependencies = [ [[package]] name = "num" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-complex", "num-integer", "num-iter", @@ -2137,11 +2092,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", "rand", @@ -2168,9 +2122,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -2183,19 +2137,18 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.43" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2208,21 +2161,21 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a5fe11d4135c3bcdf3a95b18b194afa9608a5f6ff034f5d857bc9a27fb0119" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-traits", ] [[package]] name = "num-prime" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4e3bc495f6e95bc15a6c0c55ac00421504a5a43d09e3cc455d1fea7015581d" +checksum = "e238432a7881ec7164503ccc516c014bf009be7984cde1ba56837862543bdec3" dependencies = [ "bitvec", "either", "lru", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-modular", "num-traits", @@ -2231,21 +2184,20 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -2253,46 +2205,46 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.9", "libc", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "p256" @@ -2300,10 +2252,10 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "ecdsa 0.16.6", - "elliptic-curve 0.13.4", + "ecdsa", + "elliptic-curve", "primeorder", - "sha2 0.10.6", + "sha2 0.10.8", ] [[package]] @@ -2312,7 +2264,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ - "group 0.13.0", + "group", ] [[package]] @@ -2322,8 +2274,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" dependencies = [ "blake2b_simd", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "hex", "lazy_static", "rand", @@ -2334,9 +2286,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pem-rfc7468" @@ -2358,35 +2310,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pin-project" -version = "1.1.5" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2422,15 +2354,15 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.5", + "der 0.7.9", "spki 0.7.3", ] [[package]] name = "plotters" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -2441,24 +2373,24 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.3" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -2484,33 +2416,35 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "predicates" -version = "3.0.3" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "difflib", - "itertools 0.10.5", "predicates-core", ] [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -2518,61 +2452,37 @@ dependencies = [ [[package]] name = "primeorder" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7613fdcc0831c10060fa69833ea8fa2caa94b6456f51e25356a885b530a2e3d0" -dependencies = [ - "elliptic-curve 0.13.4", -] - -[[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" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "elliptic-curve", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.4.0", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.3", + "regex-syntax", "rusty-fork", "tempfile", "unarray", @@ -2586,9 +2496,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quinn" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ "bytes", "pin-project-lite", @@ -2596,6 +2506,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", + "socket2", "thiserror", "tokio", "tracing", @@ -2603,9 +2514,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.3" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ "bytes", "rand", @@ -2620,14 +2531,16 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bffec3605b73c6f1754535084a85229fa8a30f86014e6c81aeec4abb68b0285" +checksum = "e346e016eacfff12233c243718197ca12f148c84e1e84268a896699b41c71780" dependencies = [ + "cfg_aliases", "libc", "once_cell", - "socket2 0.5.7", - "windows-sys 0.52.0", + "socket2", + "tracing", + "windows-sys 0.59.0", ] [[package]] @@ -2705,9 +2618,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2715,9 +2628,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -2725,58 +2638,49 @@ dependencies = [ [[package]] name = "readonly" -version = "0.2.5" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75a383c2bcaa4139436e9826a2e606fac946406cf635f5b2363b86f95c3b756" +checksum = "a25d631e41bfb5fdcde1d4e2215f62f7f0afa3ff11e26563765bd6ea1d229aeb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", + "syn 2.0.85", ] [[package]] name = "regex" -version = "1.8.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.1", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - -[[package]] -name = "regex-syntax" -version = "0.7.1" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", @@ -2812,18 +2716,7 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg", -] - -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac", - "zeroize", + "windows-registry", ] [[package]] @@ -2846,7 +2739,7 @@ dependencies = [ "cfg-if 1.0.0", "getrandom", "libc", - "spin 0.9.8", + "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2866,8 +2759,8 @@ dependencies = [ "pkcs1", "pkcs8 0.9.0", "rand_core", - "sha2 0.10.6", - "signature 2.1.0", + "sha2 0.10.8", + "signature", "subtle", "zeroize", ] @@ -2883,15 +2776,15 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustc-hex" @@ -2901,45 +2794,31 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.36.9" +version = "0.38.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes", - "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.0", - "errno 0.3.8", + "bitflags 2.6.0", + "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" dependencies = [ "once_cell", "ring", @@ -2951,25 +2830,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2990,9 +2868,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3005,9 +2883,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "schemars_derive", @@ -3017,44 +2895,24 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", -] - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array", - "pkcs8 0.9.0", - "subtle", - "zeroize", + "syn 2.0.85", ] [[package]] name = "sec1" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct 0.2.0", - "der 0.7.5", + "base16ct", + "der 0.7.9", "generic-array", "pkcs8 0.10.2", "subtle", @@ -3083,15 +2941,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -3118,33 +2976,34 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -3163,9 +3022,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.3" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", @@ -3179,14 +3038,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.3" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] @@ -3204,9 +3063,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -3227,29 +3086,25 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ "digest 0.10.7", "keccak", ] [[package]] -name = "signature" -version = "1.6.4" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core", -] +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core", @@ -3267,9 +3122,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -3280,16 +3135,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.5.7" @@ -3300,12 +3145,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" @@ -3329,7 +3168,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.5", + "der 0.7.9", ] [[package]] @@ -3338,12 +3177,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" @@ -3359,7 +3192,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] @@ -3370,7 +3203,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] @@ -3398,9 +3231,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -3412,17 +3245,8 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", + "futures-core", ] [[package]] @@ -3433,24 +3257,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if 1.0.0", "fastrand", - "redox_syscall", - "rustix 0.36.9", - "windows-sys 0.42.0", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] @@ -3468,33 +3283,33 @@ dependencies = [ "proc-macro2", "quote", "structmeta", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] name = "textwrap" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.49" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.49" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] @@ -3537,9 +3352,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -3552,31 +3367,29 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", - "socket2 0.4.9", + "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.85", ] [[package]] @@ -3590,40 +3403,18 @@ dependencies = [ "tokio", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if 1.0.0", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3631,20 +3422,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -3672,9 +3463,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twox-hash" @@ -3689,9 +3480,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unarray" @@ -3701,31 +3492,25 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "universal-hash" version = "0.5.1" @@ -3744,15 +3529,21 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "valuable" version = "0.1.0" @@ -3761,9 +3552,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" @@ -3776,9 +3567,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3801,34 +3592,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if 1.0.0", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3838,9 +3630,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3848,28 +3640,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3877,9 +3669,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -3902,11 +3694,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -3916,36 +3708,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-registry" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-result", + "windows-strings", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.45.0" +name = "windows-result" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-targets 0.42.2", + "windows-targets", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-targets 0.48.2", + "windows-result", + "windows-targets", ] [[package]] @@ -3954,209 +3743,121 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.2" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1eeca1c172a285ee6c2c84c341ccea837e7c01b12fbb2d0fe3c9e550ce49ec8" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.2", - "windows_aarch64_msvc 0.48.2", - "windows_i686_gnu 0.48.2", - "windows_i686_msvc 0.48.2", - "windows_x86_64_gnu 0.48.2", - "windows_x86_64_gnullvm 0.48.2", - "windows_x86_64_msvc 0.48.2", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10d0c968ba7f6166195e13d593af609ec2e3d24f916f081690695cf5eaffb2f" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571d8d4e62f26d4932099a9efe89660e8bd5087775a2ab5cdd8b747b811f1058" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_gnu" -version = "0.48.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2229ad223e178db5fbbc8bd8d3835e51e566b8474bfca58d2e6150c48bb723cd" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.2" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600956e2d840c194eedfc5d18f8242bc2e17c7775b6684488af3a9fff6fe3287" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea99ff3f8b49fb7a8e0d305e5aec485bd068c2ba691b6e277d29eaeac945868a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1a05a1ece9a7a0d5a7ccf30ba2c33e3a61a30e042ffd247567d1de1d94120d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d419259aba16b663966e29e6d7c6ecfa0bb8425818bb96f6f1f3c3eb71a6e7b9" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_msvc" -version = "0.52.4" +name = "wycheproof" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "71039afb8a94cba8b3fbcd400af2d259eb0ecd833fca548130f9e7681ef2c53a" +dependencies = [ + "data-encoding", + "serde", + "serde_json", +] [[package]] -name = "winreg" -version = "0.52.0" +name = "wyz" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", + "tap", ] [[package]] -name = "wycheproof" -version = "0.5.0" +name = "zerocopy" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaef718f69c19f7f66faacc10f747180ceb4883a53c35548be4cac4cec1591c" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "base64 0.13.1", - "hex", - "serde", - "serde_json", + "byteorder", + "zerocopy-derive", ] [[package]] -name = "wyz" -version = "0.5.1" +name = "zerocopy-derive" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ - "tap", + "proc-macro2", + "quote", + "syn 2.0.85", ] [[package]] @@ -4170,12 +3871,11 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.85", ] diff --git a/fastcrypto/Cargo.toml b/fastcrypto/Cargo.toml index e3b1560570..d7b83872e7 100644 --- a/fastcrypto/Cargo.toml +++ b/fastcrypto/Cargo.toml @@ -10,6 +10,13 @@ description = "Common cryptographic library used at Mysten Labs" repository = "https://github.com/MystenLabs/fastcrypto" [dependencies] +k256 = { version = "0.13.4", features = [ + "ecdsa", + "sha256", + "hash2curve", + "arithmetic", + "expose-field", +] } base64ct = { version = "1.5.3", features = ["alloc"] } bs58 = "0.4.0" ed25519-consensus = { version = "2.1.0", features = ["serde"] } @@ -17,9 +24,17 @@ hex = "0.4.3" hex-literal = "0.4.1" hkdf = { version = "0.12.3", features = ["std"] } rand.workspace = true -rust_secp256k1 = { version = "0.27.0", package = "secp256k1", features = ["recovery", "rand-std", "bitcoin_hashes", "global-context"] } +rust_secp256k1 = { version = "0.27.0", package = "secp256k1", features = [ + "recovery", + "rand-std", + "bitcoin_hashes", + "global-context", +] } serde.workspace = true -serde_with = { version = "3", default-features = false, features = ["alloc", "macros"] } +serde_with = { version = "3", default-features = false, features = [ + "alloc", + "macros", +] } signature = { version = "2.0.0" } tokio = { version = "1.24.1", features = ["sync", "rt", "macros"] } zeroize.workspace = true @@ -115,7 +130,13 @@ aes = ["dep:aes", "dep:cbc", "dep:aes-gcm", "dep:ctr"] [dev-dependencies] criterion = "0.4.0" -k256 = { version = "0.11.6", features = ["ecdsa", "sha256", "keccak256"] } +k256 = { version = "0.13.4", features = [ + "ecdsa", + "sha256", + "hash2curve", + "arithmetic", + "expose-field", +] } proptest = "1.1.0" serde-reflection = "0.3.6" wycheproof = "0.5.0" diff --git a/fastcrypto/src/groups/mod.rs b/fastcrypto/src/groups/mod.rs index f002a6f49a..85bdf213b3 100644 --- a/fastcrypto/src/groups/mod.rs +++ b/fastcrypto/src/groups/mod.rs @@ -11,6 +11,7 @@ use std::ops::{AddAssign, SubAssign}; pub mod bls12381; pub mod ristretto255; +pub mod secp256k1; pub mod secp256r1; pub mod multiplier; diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs new file mode 100644 index 0000000000..bccdcb14f3 --- /dev/null +++ b/fastcrypto/src/groups/secp256k1.rs @@ -0,0 +1,298 @@ +// Copyright (c) 2022, Mysten Labs, Inc. +// SPDX-License-Identifier: Apache-2.0 + +use std::ops::{Add, Div, Mul, Neg, Sub}; + +use crate::serde_helpers::BytesRepresentation; +use elliptic_curve::bigint::{Encoding, Integer, NonZero, Zero, U384, U512}; +use elliptic_curve::group::GroupEncoding; +use elliptic_curve::scalar::FromUintUnchecked; +use elliptic_curve::Curve; +use fastcrypto_derive::GroupOpsExtend; +use k256::elliptic_curve::hash2curve::FromOkm; +use k256::elliptic_curve::hash2curve::{hash_to_field, ExpandMsgXmd, MapToCurve}; +use k256::elliptic_curve::PrimeField; +use k256::Secp256k1; +use k256::{FieldElement, ProjectivePoint, Scalar, U256}; +use serde::{de, Deserialize}; +use sha2::{Digest, Sha256, Sha512}; +use zeroize::Zeroize; + +use crate::groups::{GroupElement, Scalar as ScalarType}; +use crate::serde_helpers::ToFromByteArray; +use crate::{ + error::{FastCryptoError, FastCryptoResult}, + traits::AllowedRng, +}; +use crate::{generate_bytes_representation, serialize_deserialize_with_to_from_byte_array}; + +use super::{FiatShamirChallenge, FromTrustedByteArray, HashToGroupElement, MultiScalarMul}; + +/// Elements of the group G_1 in BLS 12-381. +#[derive(Clone, Copy, Eq, PartialEq, GroupOpsExtend, Debug)] +#[repr(transparent)] +pub struct MyProjectivePoint(ProjectivePoint); + +#[derive(Clone, Copy, Eq, PartialEq, GroupOpsExtend, Debug)] +pub struct MyScalar(Scalar); + +impl Div for MyScalar { + type Output = FastCryptoResult; + + fn div(self, rhs: Self) -> Self::Output { + let inv = rhs.0.invert().unwrap(); + Ok(MyScalar(self.0.mul(inv))) + } +} + +impl Mul for MyScalar { + type Output = Self; + + fn mul(self, rhs: Self) -> Self::Output { + Self(self.0.mul(&rhs.0)) + } +} + +impl Neg for MyScalar { + type Output = Self; + + fn neg(self) -> Self::Output { + Self(self.0.negate()) + } +} + +impl Sub for MyScalar { + type Output = Self; + + fn sub(self, rhs: Self) -> Self::Output { + Self(self.0.sub(rhs.0)) + } +} + +impl Add for MyScalar { + type Output = Self; + + fn add(self, rhs: Self) -> Self::Output { + Self(self.0.add(rhs.0)) + } +} + +pub const SCALAR_BYTE_LENGTH: usize = 32; +impl FromTrustedByteArray for MyScalar { + fn from_trusted_byte_array(bytes: &[u8; SCALAR_BYTE_LENGTH]) -> FastCryptoResult { + let mut padded_bytes = [0u8; 48]; + padded_bytes[16..48].copy_from_slice(bytes); + + Ok(MyScalar(Scalar::from_okm(padded_bytes.as_slice().into()))) + } +} + +impl ToFromByteArray for MyScalar { + fn from_byte_array(bytes: &[u8; SCALAR_BYTE_LENGTH]) -> FastCryptoResult { + Self::from_trusted_byte_array(bytes) + } + + fn to_byte_array(&self) -> [u8; SCALAR_BYTE_LENGTH] { + self.0.to_bytes().into() + } +} + +serialize_deserialize_with_to_from_byte_array!(MyScalar); + +impl From for MyScalar { + fn from(value: u128) -> Self { + Self(Scalar::from_u128(value)) + } +} + +impl GroupElement for MyScalar { + type ScalarType = Self; + + fn zero() -> Self { + Self(Scalar::ZERO) + } + + fn generator() -> Self { + MyScalar(Scalar::ONE) + } +} + +impl ScalarType for MyScalar { + fn rand(rng: &mut R) -> Self { + let mut buffer = [0u8; 48]; + rng.fill_bytes(&mut buffer); + reduce_mod_uniform_buffer(&buffer) + } + + fn inverse(&self) -> FastCryptoResult { + if self.0 == Scalar::ZERO { + return Err(FastCryptoError::InvalidInput); + } + Ok(Self(self.0.invert().unwrap())) + } +} + +/// Reduce a big-endian integer of arbitrary size modulo the scalar field size and return the scalar. +/// If the input bytes are uniformly distributed, the output will be uniformly distributed in the +/// scalar field. +/// +/// The input buffer must be at least 48 bytes long to ensure that there is only negligible bias in +/// the output. +fn reduce_mod_uniform_buffer(buffer: &[u8]) -> MyScalar { + match buffer_to_scalar_mod_r(buffer) { + Ok(scalar) => scalar, + Err(_) => panic!("Invalid input length"), + } +} + +/// Similar to `reduce_mod_uniform_buffer`, returns a result of scalar, and does not panic on invalid length. +fn buffer_to_scalar_mod_r(buffer: &[u8]) -> FastCryptoResult { + let hash = Sha512::digest(buffer); + + let mut order_bytes_padded = [0u8; 64]; + order_bytes_padded[32..64].copy_from_slice(&Secp256k1::ORDER.to_be_bytes()); + + let mut n = U512::from_be_slice(&hash); + n = n.rem(&NonZero::from_uint(U512::from_be_slice( + &order_bytes_padded, + ))); + + Ok(MyScalar(Scalar::from_uint_unchecked(U256::from_be_slice( + &n.to_be_bytes()[32..64], + )))) +} + +impl Zeroize for MyScalar { + fn zeroize(&mut self) { + self.0.zeroize(); + } +} + +impl FiatShamirChallenge for MyScalar { + fn fiat_shamir_reduction_to_group_element(uniform_buffer: &[u8]) -> Self { + reduce_mod_uniform_buffer(uniform_buffer) + } +} + +impl GroupElement for MyProjectivePoint { + type ScalarType = MyScalar; + + fn zero() -> Self { + Self(ProjectivePoint::default()) + } + + fn generator() -> Self { + Self(ProjectivePoint::GENERATOR) + } +} + +impl Div for MyProjectivePoint { + type Output = FastCryptoResult; + + fn div(self, rhs: MyScalar) -> Self::Output { + let inv = rhs.0.invert().unwrap(); + Ok(Self(self.0.mul(inv))) + } +} + +impl Mul for MyProjectivePoint { + type Output = Self; + + fn mul(self, rhs: MyScalar) -> Self::Output { + Self(self.0.mul(rhs.0)) + } +} + +impl Sub for MyProjectivePoint { + type Output = Self; + + fn sub(self, rhs: Self) -> Self::Output { + Self(self.0.sub(rhs.0)) + } +} + +impl Add for MyProjectivePoint { + type Output = Self; + + fn add(self, rhs: Self) -> Self::Output { + Self(self.0.add(rhs.0)) + } +} + +impl Neg for MyProjectivePoint { + type Output = Self; + + fn neg(self) -> Self::Output { + Self(self.0.neg()) + } +} + +impl MultiScalarMul for MyProjectivePoint { + fn multi_scalar_mul(scalars: &[Self::ScalarType], points: &[Self]) -> FastCryptoResult { + // Input validation + if scalars.len() != points.len() || scalars.is_empty() { + return Err(FastCryptoError::GeneralError(String::from( + "Invalid input: Scalars and points must have the same non-zero length", + ))); + } + + // Initialize the result to the identity element + let mut result = ProjectivePoint::IDENTITY; + + // Iterate over the scalars and points + for (scalar, point) in scalars.iter().zip(points.iter()) { + // Skip zero scalars or identity points + if scalar.0.is_zero().into() || point.0 == ProjectivePoint::IDENTITY { + continue; + } + + // Perform scalar multiplication + let scalar_mul = point.0.mul(scalar.0); + + // Accumulate the result + result += scalar_mul; + } + + Ok(MyProjectivePoint(result)) + } +} + +pub const PROJECTIVE_POINT_BYTE_LENGTH: usize = 33; + +impl FromTrustedByteArray for MyProjectivePoint { + fn from_trusted_byte_array( + bytes: &[u8; PROJECTIVE_POINT_BYTE_LENGTH], + ) -> FastCryptoResult { + Ok(MyProjectivePoint( + ProjectivePoint::from_bytes(bytes.as_slice().into()).unwrap(), + )) + } +} + +impl ToFromByteArray for MyProjectivePoint { + fn from_byte_array(bytes: &[u8; PROJECTIVE_POINT_BYTE_LENGTH]) -> FastCryptoResult { + Self::from_trusted_byte_array(bytes) + } + + fn to_byte_array(&self) -> [u8; PROJECTIVE_POINT_BYTE_LENGTH] { + let mut bytes = [0u8; PROJECTIVE_POINT_BYTE_LENGTH]; + self.0.to_bytes().into() + } +} + +impl HashToGroupElement for MyProjectivePoint { + fn hash_to_group_element(msg: &[u8]) -> Self { + let domain = "FOOBAR".as_bytes(); + let mut u = [FieldElement::ZERO]; + hash_to_field::, FieldElement>(&[msg], &[domain], &mut u) + .expect("should never return error according to error cases described in ExpandMsgXmd"); + Self(u[0].map_to_curve()) + } +} + +serialize_deserialize_with_to_from_byte_array!(MyProjectivePoint); +generate_bytes_representation!( + MyProjectivePoint, + PROJECTIVE_POINT_BYTE_LENGTH, + MyProjectivePointAsBytes +); diff --git a/fastcrypto/src/secp256r1/mod.rs b/fastcrypto/src/secp256r1/mod.rs index cae20cb46d..d06213d38e 100644 --- a/fastcrypto/src/secp256r1/mod.rs +++ b/fastcrypto/src/secp256r1/mod.rs @@ -382,10 +382,15 @@ impl Secp256r1KeyPair { // Generate nonce according to RFC6979. The unwrap is safe because k is generated smaller // than the group size. + let order_bytes = + as FieldBytesEncoding>::encode_field_bytes( + &NistP256::ORDER, + ); + let k = fr_p256_to_arkworks( &Scalar::from_repr(rfc6979::generate_k::( &x.to_bytes(), - &NistP256::ORDER.encode_field_bytes(), + &order_bytes, &fr_arkworks_to_p256(&z).to_bytes(), &[], )) From bab4cfa01a4e6e44877d0fe62d35b4ab2809ebe9 Mon Sep 17 00:00:00 2001 From: themicp Date: Tue, 29 Oct 2024 19:39:58 +0000 Subject: [PATCH 03/20] Lint imports, update names for ProjectivePoint and Scalar --- fastcrypto/src/groups/secp256k1.rs | 143 +++++++++++++++-------------- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index bccdcb14f3..d46a447382 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -1,51 +1,52 @@ // Copyright (c) 2022, Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 -use std::ops::{Add, Div, Mul, Neg, Sub}; - -use crate::serde_helpers::BytesRepresentation; -use elliptic_curve::bigint::{Encoding, Integer, NonZero, Zero, U384, U512}; -use elliptic_curve::group::GroupEncoding; -use elliptic_curve::scalar::FromUintUnchecked; -use elliptic_curve::Curve; -use fastcrypto_derive::GroupOpsExtend; -use k256::elliptic_curve::hash2curve::FromOkm; -use k256::elliptic_curve::hash2curve::{hash_to_field, ExpandMsgXmd, MapToCurve}; -use k256::elliptic_curve::PrimeField; -use k256::Secp256k1; -use k256::{FieldElement, ProjectivePoint, Scalar, U256}; -use serde::{de, Deserialize}; -use sha2::{Digest, Sha256, Sha512}; -use zeroize::Zeroize; - -use crate::groups::{GroupElement, Scalar as ScalarType}; -use crate::serde_helpers::ToFromByteArray; +use super::{FiatShamirChallenge, FromTrustedByteArray, HashToGroupElement, MultiScalarMul}; use crate::{ error::{FastCryptoError, FastCryptoResult}, + generate_bytes_representation, + groups::{GroupElement, Scalar as ScalarType}, + serde_helpers::{BytesRepresentation, ToFromByteArray}, + serialize_deserialize_with_to_from_byte_array, traits::AllowedRng, }; -use crate::{generate_bytes_representation, serialize_deserialize_with_to_from_byte_array}; - -use super::{FiatShamirChallenge, FromTrustedByteArray, HashToGroupElement, MultiScalarMul}; +use elliptic_curve::{ + bigint::{Encoding, NonZero, U512}, + group::GroupEncoding, + scalar::FromUintUnchecked, + Curve, +}; +use fastcrypto_derive::GroupOpsExtend; +use k256::{ + elliptic_curve::{ + hash2curve::{hash_to_field, ExpandMsgXmd, FromOkm, MapToCurve}, + PrimeField, + }, + FieldElement, ProjectivePoint as SecpProjectivePoint, Scalar as SecpScalar, Secp256k1, U256, +}; +use serde::{de, Deserialize}; +use sha2::{Digest, Sha256, Sha512}; +use std::ops::{Add, Div, Mul, Neg, Sub}; +use zeroize::Zeroize; /// Elements of the group G_1 in BLS 12-381. #[derive(Clone, Copy, Eq, PartialEq, GroupOpsExtend, Debug)] #[repr(transparent)] -pub struct MyProjectivePoint(ProjectivePoint); +pub struct ProjectivePoint(SecpProjectivePoint); #[derive(Clone, Copy, Eq, PartialEq, GroupOpsExtend, Debug)] -pub struct MyScalar(Scalar); +pub struct Scalar(SecpScalar); -impl Div for MyScalar { +impl Div for Scalar { type Output = FastCryptoResult; fn div(self, rhs: Self) -> Self::Output { let inv = rhs.0.invert().unwrap(); - Ok(MyScalar(self.0.mul(inv))) + Ok(Scalar(self.0.mul(inv))) } } -impl Mul for MyScalar { +impl Mul for Scalar { type Output = Self; fn mul(self, rhs: Self) -> Self::Output { @@ -53,7 +54,7 @@ impl Mul for MyScalar { } } -impl Neg for MyScalar { +impl Neg for Scalar { type Output = Self; fn neg(self) -> Self::Output { @@ -61,7 +62,7 @@ impl Neg for MyScalar { } } -impl Sub for MyScalar { +impl Sub for Scalar { type Output = Self; fn sub(self, rhs: Self) -> Self::Output { @@ -69,7 +70,7 @@ impl Sub for MyScalar { } } -impl Add for MyScalar { +impl Add for Scalar { type Output = Self; fn add(self, rhs: Self) -> Self::Output { @@ -78,16 +79,16 @@ impl Add for MyScalar { } pub const SCALAR_BYTE_LENGTH: usize = 32; -impl FromTrustedByteArray for MyScalar { +impl FromTrustedByteArray for Scalar { fn from_trusted_byte_array(bytes: &[u8; SCALAR_BYTE_LENGTH]) -> FastCryptoResult { let mut padded_bytes = [0u8; 48]; padded_bytes[16..48].copy_from_slice(bytes); - Ok(MyScalar(Scalar::from_okm(padded_bytes.as_slice().into()))) + Ok(Scalar(SecpScalar::from_okm(padded_bytes.as_slice().into()))) } } -impl ToFromByteArray for MyScalar { +impl ToFromByteArray for Scalar { fn from_byte_array(bytes: &[u8; SCALAR_BYTE_LENGTH]) -> FastCryptoResult { Self::from_trusted_byte_array(bytes) } @@ -97,27 +98,27 @@ impl ToFromByteArray for MyScalar { } } -serialize_deserialize_with_to_from_byte_array!(MyScalar); +serialize_deserialize_with_to_from_byte_array!(Scalar); -impl From for MyScalar { +impl From for Scalar { fn from(value: u128) -> Self { - Self(Scalar::from_u128(value)) + Self(SecpScalar::from_u128(value)) } } -impl GroupElement for MyScalar { +impl GroupElement for Scalar { type ScalarType = Self; fn zero() -> Self { - Self(Scalar::ZERO) + Self(SecpScalar::ZERO) } fn generator() -> Self { - MyScalar(Scalar::ONE) + Scalar(SecpScalar::ONE) } } -impl ScalarType for MyScalar { +impl ScalarType for Scalar { fn rand(rng: &mut R) -> Self { let mut buffer = [0u8; 48]; rng.fill_bytes(&mut buffer); @@ -125,7 +126,7 @@ impl ScalarType for MyScalar { } fn inverse(&self) -> FastCryptoResult { - if self.0 == Scalar::ZERO { + if self.0 == SecpScalar::ZERO { return Err(FastCryptoError::InvalidInput); } Ok(Self(self.0.invert().unwrap())) @@ -138,7 +139,7 @@ impl ScalarType for MyScalar { /// /// The input buffer must be at least 48 bytes long to ensure that there is only negligible bias in /// the output. -fn reduce_mod_uniform_buffer(buffer: &[u8]) -> MyScalar { +fn reduce_mod_uniform_buffer(buffer: &[u8]) -> Scalar { match buffer_to_scalar_mod_r(buffer) { Ok(scalar) => scalar, Err(_) => panic!("Invalid input length"), @@ -146,7 +147,7 @@ fn reduce_mod_uniform_buffer(buffer: &[u8]) -> MyScalar { } /// Similar to `reduce_mod_uniform_buffer`, returns a result of scalar, and does not panic on invalid length. -fn buffer_to_scalar_mod_r(buffer: &[u8]) -> FastCryptoResult { +fn buffer_to_scalar_mod_r(buffer: &[u8]) -> FastCryptoResult { let hash = Sha512::digest(buffer); let mut order_bytes_padded = [0u8; 64]; @@ -157,53 +158,53 @@ fn buffer_to_scalar_mod_r(buffer: &[u8]) -> FastCryptoResult { &order_bytes_padded, ))); - Ok(MyScalar(Scalar::from_uint_unchecked(U256::from_be_slice( - &n.to_be_bytes()[32..64], - )))) + Ok(Scalar(SecpScalar::from_uint_unchecked( + U256::from_be_slice(&n.to_be_bytes()[32..64]), + ))) } -impl Zeroize for MyScalar { +impl Zeroize for Scalar { fn zeroize(&mut self) { self.0.zeroize(); } } -impl FiatShamirChallenge for MyScalar { +impl FiatShamirChallenge for Scalar { fn fiat_shamir_reduction_to_group_element(uniform_buffer: &[u8]) -> Self { reduce_mod_uniform_buffer(uniform_buffer) } } -impl GroupElement for MyProjectivePoint { - type ScalarType = MyScalar; +impl GroupElement for ProjectivePoint { + type ScalarType = Scalar; fn zero() -> Self { - Self(ProjectivePoint::default()) + Self(SecpProjectivePoint::default()) } fn generator() -> Self { - Self(ProjectivePoint::GENERATOR) + Self(SecpProjectivePoint::GENERATOR) } } -impl Div for MyProjectivePoint { +impl Div for ProjectivePoint { type Output = FastCryptoResult; - fn div(self, rhs: MyScalar) -> Self::Output { + fn div(self, rhs: Scalar) -> Self::Output { let inv = rhs.0.invert().unwrap(); Ok(Self(self.0.mul(inv))) } } -impl Mul for MyProjectivePoint { +impl Mul for ProjectivePoint { type Output = Self; - fn mul(self, rhs: MyScalar) -> Self::Output { + fn mul(self, rhs: Scalar) -> Self::Output { Self(self.0.mul(rhs.0)) } } -impl Sub for MyProjectivePoint { +impl Sub for ProjectivePoint { type Output = Self; fn sub(self, rhs: Self) -> Self::Output { @@ -211,7 +212,7 @@ impl Sub for MyProjectivePoint { } } -impl Add for MyProjectivePoint { +impl Add for ProjectivePoint { type Output = Self; fn add(self, rhs: Self) -> Self::Output { @@ -219,7 +220,7 @@ impl Add for MyProjectivePoint { } } -impl Neg for MyProjectivePoint { +impl Neg for ProjectivePoint { type Output = Self; fn neg(self) -> Self::Output { @@ -227,7 +228,7 @@ impl Neg for MyProjectivePoint { } } -impl MultiScalarMul for MyProjectivePoint { +impl MultiScalarMul for ProjectivePoint { fn multi_scalar_mul(scalars: &[Self::ScalarType], points: &[Self]) -> FastCryptoResult { // Input validation if scalars.len() != points.len() || scalars.is_empty() { @@ -237,12 +238,12 @@ impl MultiScalarMul for MyProjectivePoint { } // Initialize the result to the identity element - let mut result = ProjectivePoint::IDENTITY; + let mut result = SecpProjectivePoint::IDENTITY; // Iterate over the scalars and points for (scalar, point) in scalars.iter().zip(points.iter()) { // Skip zero scalars or identity points - if scalar.0.is_zero().into() || point.0 == ProjectivePoint::IDENTITY { + if scalar.0.is_zero().into() || point.0 == SecpProjectivePoint::IDENTITY { continue; } @@ -253,23 +254,23 @@ impl MultiScalarMul for MyProjectivePoint { result += scalar_mul; } - Ok(MyProjectivePoint(result)) + Ok(ProjectivePoint(result)) } } pub const PROJECTIVE_POINT_BYTE_LENGTH: usize = 33; -impl FromTrustedByteArray for MyProjectivePoint { +impl FromTrustedByteArray for ProjectivePoint { fn from_trusted_byte_array( bytes: &[u8; PROJECTIVE_POINT_BYTE_LENGTH], ) -> FastCryptoResult { - Ok(MyProjectivePoint( - ProjectivePoint::from_bytes(bytes.as_slice().into()).unwrap(), + Ok(ProjectivePoint( + SecpProjectivePoint::from_bytes(bytes.as_slice().into()).unwrap(), )) } } -impl ToFromByteArray for MyProjectivePoint { +impl ToFromByteArray for ProjectivePoint { fn from_byte_array(bytes: &[u8; PROJECTIVE_POINT_BYTE_LENGTH]) -> FastCryptoResult { Self::from_trusted_byte_array(bytes) } @@ -280,7 +281,7 @@ impl ToFromByteArray for MyProjectivePoint { } } -impl HashToGroupElement for MyProjectivePoint { +impl HashToGroupElement for ProjectivePoint { fn hash_to_group_element(msg: &[u8]) -> Self { let domain = "FOOBAR".as_bytes(); let mut u = [FieldElement::ZERO]; @@ -290,9 +291,9 @@ impl HashToGroupElement for MyProjectivePoint { } } -serialize_deserialize_with_to_from_byte_array!(MyProjectivePoint); +serialize_deserialize_with_to_from_byte_array!(ProjectivePoint); generate_bytes_representation!( - MyProjectivePoint, + ProjectivePoint, PROJECTIVE_POINT_BYTE_LENGTH, - MyProjectivePointAsBytes + ProjectivePointAsBytes ); From 32652f5f3160e8c8b3c4749d8ea9142e750a73af Mon Sep 17 00:00:00 2001 From: themicp Date: Wed, 30 Oct 2024 15:09:09 +0000 Subject: [PATCH 04/20] Update secp256k1 tests to work with updated k256 crate --- .../src/tests/secp256k1_recoverable_tests.rs | 38 +++++++++++-------- fastcrypto/src/tests/secp256k1_tests.rs | 10 ++--- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/fastcrypto/src/tests/secp256k1_recoverable_tests.rs b/fastcrypto/src/tests/secp256k1_recoverable_tests.rs index c10a903654..d4e844d12b 100644 --- a/fastcrypto/src/tests/secp256k1_recoverable_tests.rs +++ b/fastcrypto/src/tests/secp256k1_recoverable_tests.rs @@ -18,12 +18,8 @@ use std::collections::hash_map::DefaultHasher; use std::hash::{Hash, Hasher}; use crate::encoding::{Base64, Encoding}; -#[cfg(feature = "copy_key")] -use k256::ecdsa::signature::Signature as ExternalSignature; -#[cfg(feature = "copy_key")] -use k256::ecdsa::signature::Signer as ExternalSigner; -#[cfg(feature = "copy_key")] -use k256::ecdsa::signature::Verifier as ExternalVerifier; +use digest::Digest; +use k256::ecdsa::signature::DigestVerifier; #[cfg(feature = "copy_key")] use proptest::arbitrary::Arbitrary; use proptest::{prelude::*, strategy::Strategy}; @@ -355,10 +351,14 @@ proptest::proptest! { assert!(key_pair.public().verify_recoverable_with_hash::(message, &malleated_signature).is_err()); // use k256 to construct private key with the same bytes and signs the same message - let priv_key_1 = k256::ecdsa::SigningKey::from_bytes(key_pair_copied_3.private().as_bytes()).unwrap(); + let priv_key_1 = k256::ecdsa::SigningKey::from_bytes(key_pair_copied_3.private().as_bytes().into()).unwrap(); let pub_key_1 = priv_key_1.verifying_key(); - let signature_1: k256::ecdsa::recoverable::Signature = priv_key_1.sign(message); - assert!(pub_key_1.verify(message, &signature_1).is_ok()); + let message_digest = sha3::Keccak256::new_with_prefix(&message); + let (signature_1, recid_1) = priv_key_1.sign_digest_recoverable(message_digest.clone()).unwrap(); + let mut recoverable_signature_1 = [0u8; 65]; + recoverable_signature_1[..64].copy_from_slice(&signature_1.to_bytes()); + recoverable_signature_1[64] = recid_1.to_byte(); + assert!(pub_key_1.verify_digest(message_digest.clone(), &signature_1).is_ok()); // two private keys are serialized the same assert_eq!(key_pair_copied.private().as_bytes(), priv_key_1.to_bytes().as_slice()); @@ -366,24 +366,30 @@ proptest::proptest! { // two pubkeys are the same assert_eq!( key_pair.public().as_bytes(), - pub_key_1.to_bytes().as_slice() + pub_key_1.to_sec1_bytes().as_ref() ); // same recovered pubkey are recovered let recovered_key = signature.sig.recover(&hashed_msg).unwrap(); - let recovered_key_1 = signature_1.recover_verifying_key(message).expect("couldn't recover pubkey"); - assert_eq!(recovered_key.serialize(),recovered_key_1.to_bytes().as_slice()); + let recovered_key_1 = k256::ecdsa::VerifyingKey::recover_from_digest( + message_digest.clone(), + &signature_1, + recid_1 + )?; + assert_eq!(pub_key_1.to_sec1_bytes(),recovered_key_1.to_sec1_bytes()); + assert_eq!(recovered_key.serialize(),recovered_key_1.to_sec1_bytes().as_ref()); // same signatures produced from both implementations - assert_eq!(signature.as_ref(), signature_1.as_bytes()); + // ignore the recovery id byte + assert_eq!(ToFromBytes::as_bytes(&signature), recoverable_signature_1); // use ffi-implemented keypair to verify sig constructed by k256 - let secp_sig1 = bincode::deserialize::(signature_1.as_ref()).unwrap(); + let secp_sig1 = bincode::deserialize::(&recoverable_signature_1).unwrap(); assert!(key_pair_copied_2.public().verify_recoverable_with_hash::(message, &secp_sig1).is_ok()); // use k256 keypair to verify sig constructed by ffi-implementation - let typed_sig = k256::ecdsa::recoverable::Signature::try_from(signature.as_ref()).unwrap(); - assert!(pub_key_1.verify(message, &typed_sig).is_ok()); + let typed_sig = k256::ecdsa::Signature::from_slice(&signature.sig.serialize_compact().1).unwrap(); + assert!(pub_key_1.verify_digest(message_digest, &typed_sig).is_ok()); } } diff --git a/fastcrypto/src/tests/secp256k1_tests.rs b/fastcrypto/src/tests/secp256k1_tests.rs index 13996380c9..1b2123cd92 100644 --- a/fastcrypto/src/tests/secp256k1_tests.rs +++ b/fastcrypto/src/tests/secp256k1_tests.rs @@ -1,8 +1,6 @@ // Copyright (c) 2022, Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 -#[cfg(feature = "copy_key")] -use k256::ecdsa::signature::Signature as ExternalSignature; #[cfg(feature = "copy_key")] use k256::ecdsa::signature::Signer as ExternalSigner; #[cfg(feature = "copy_key")] @@ -483,7 +481,7 @@ proptest::proptest! { assert!(key_pair.public().verify(message, &signature).is_ok()); // Use k256 to construct private key with the same bytes and sign the same message - let priv_key_1 = k256::ecdsa::SigningKey::from_bytes(key_pair_copied_3.private().as_bytes()).unwrap(); + let priv_key_1 = k256::ecdsa::SigningKey::from_bytes(key_pair_copied_3.private().as_bytes().into()).unwrap(); let pub_key_1 = priv_key_1.verifying_key(); let signature_1: k256::ecdsa::Signature = priv_key_1.sign(message); assert!(pub_key_1.verify(message, &signature_1).is_ok()); @@ -494,14 +492,14 @@ proptest::proptest! { // Two pubkeys are the same assert_eq!( key_pair.public().as_bytes(), - pub_key_1.to_bytes().as_slice() + pub_key_1.to_sec1_bytes().as_ref() ); // Same signatures produced from both implementations - assert_eq!(signature.as_ref(), signature_1.as_bytes()); + assert_eq!(signature.as_ref(), signature_1.to_bytes().as_slice()); // Use fastcrypto keypair to verify a signature constructed by k256 - let secp_sig1 = bincode::deserialize::(signature_1.as_ref()).unwrap(); + let secp_sig1 = bincode::deserialize::(signature_1.to_bytes().as_slice()).unwrap(); assert!(key_pair_copied_2.public().verify(message, &secp_sig1).is_ok()); // Use k256 keypair to verify sig constructed by fastcrypto From a4490e5a7576b267aa1dbc8fec2f663ca905eb16 Mon Sep 17 00:00:00 2001 From: themicp Date: Wed, 30 Oct 2024 15:43:01 +0000 Subject: [PATCH 05/20] Test DKG happy path for secp256k1 --- fastcrypto-tbls/src/tests/dkg_v1_tests.rs | 73 +++++++++++++++++------ 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/fastcrypto-tbls/src/tests/dkg_v1_tests.rs b/fastcrypto-tbls/src/tests/dkg_v1_tests.rs index 61982db700..69b55ba9f1 100644 --- a/fastcrypto-tbls/src/tests/dkg_v1_tests.rs +++ b/fastcrypto-tbls/src/tests/dkg_v1_tests.rs @@ -1,7 +1,7 @@ // Copyright (c) 2022, Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 -use crate::dkg::{Confirmation, Party, DKG_MESSAGES_MAX_SIZE}; +use crate::dkg::{Confirmation, Output, Party, DKG_MESSAGES_MAX_SIZE}; use crate::dkg_v0::create_fake_complaint; use crate::dkg_v1::{Message, ProcessedMessage}; use crate::ecies::{PrivateKey, PublicKey}; @@ -13,11 +13,16 @@ use crate::tbls::ThresholdBls; use crate::types::ThresholdBls12381MinSig; use fastcrypto::error::FastCryptoError; use fastcrypto::groups::bls12381::{G2Element, Scalar}; -use fastcrypto::groups::GroupElement; +use fastcrypto::groups::secp256k1::ProjectivePoint; +use fastcrypto::groups::{FiatShamirChallenge, GroupElement, HashToGroupElement, MultiScalarMul}; use fastcrypto::traits::AllowedRng; use itertools::Itertools; use rand::prelude::StdRng; +use rand::rngs::ThreadRng; use rand::{thread_rng, SeedableRng}; +use serde::de::DeserializeOwned; +use serde::Serialize; +use zeroize::Zeroize; const MSG: [u8; 4] = [1, 2, 3, 4]; @@ -27,14 +32,22 @@ type EG = G2Element; type KeyNodePair = (PartyId, PrivateKey, PublicKey); -fn gen_keys_and_nodes(n: usize) -> (Vec>, Nodes) { - gen_keys_and_nodes_rng(n, &mut thread_rng()) +fn gen_keys_and_nodes(n: usize) -> (Vec>, Nodes) +where + EG: GroupElement + Serialize + DeserializeOwned, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ + gen_keys_and_nodes_rng::(n, &mut thread_rng()) } -fn gen_keys_and_nodes_rng( +fn gen_keys_and_nodes_rng( n: usize, rng: &mut R, -) -> (Vec>, Nodes) { +) -> (Vec>, Nodes) +where + EG: GroupElement + Serialize + DeserializeOwned, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ let keys = (0..n) .map(|id| { let sk = PrivateKey::::new(rng); @@ -54,13 +67,15 @@ fn gen_keys_and_nodes_rng( (keys, nodes) } -// Enable if logs are needed -// #[traced_test] -#[test] -fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { +fn dkg_e2e_5_parties_min_weight_2_threshold_3() -> (u16, Vec>>) +where + G: GroupElement + MultiScalarMul + Serialize + DeserializeOwned, + EG: GroupElement + Serialize + DeserializeOwned + HashToGroupElement, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ let ro = RandomOracle::new("dkg"); let t = 3; - let (keys, nodes) = gen_keys_and_nodes(6); + let (keys, nodes) = gen_keys_and_nodes::(6); // Create the parties let d0 = Party::::new( @@ -125,7 +140,7 @@ fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { ); // d5 will receive invalid shares from d0, but its complaint will not be processed on time. let mut msg0 = d0.create_message_v1(&mut thread_rng()).unwrap(); - let mut pk_and_msgs = decrypt_and_prepare_for_reenc(&keys, &nodes, &msg0, &ro); + let mut pk_and_msgs = decrypt_and_prepare_for_reenc::(&keys, &nodes, &msg0, &ro); pk_and_msgs[5] = pk_and_msgs[0].clone(); msg0.encrypted_shares = MultiRecipientEncryption::encrypt(&pk_and_msgs, &ro.extend("encs 0"), &mut thread_rng()); @@ -133,7 +148,7 @@ fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { // We will modify d1's message to make it invalid (emulating a cheating party). d0 and d1 // should detect that and send complaints. let mut msg1 = d1.create_message_v1(&mut thread_rng()).unwrap(); - let mut pk_and_msgs = decrypt_and_prepare_for_reenc(&keys, &nodes, &msg1, &ro); + let mut pk_and_msgs = decrypt_and_prepare_for_reenc::(&keys, &nodes, &msg1, &ro); pk_and_msgs.swap(0, 1); msg1.encrypted_shares = MultiRecipientEncryption::encrypt(&pk_and_msgs, &ro.extend("encs 1"), &mut thread_rng()); @@ -250,7 +265,7 @@ fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { assert_eq!(ver_msg5.len(), 2); let o0 = d0.aggregate_v1(&ver_msg0); - let _o1 = d1.aggregate_v1(&ver_msg1); + let o1 = d1.aggregate_v1(&ver_msg1); let o2 = d2.aggregate_v1(&ver_msg2); let o3 = d3.aggregate_v1(&ver_msg3); let o5 = d5.aggregate_v1(&ver_msg5); @@ -267,6 +282,16 @@ fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { poly += &msg5.vss_pk; assert_eq!(poly, o0.vss_pk); + ( + t, + vec![Some(o0), Some(o1), Some(o2), Some(o3), None, Some(o5)], + ) +} + +fn sign_with_shares(threshold: u16, outputs: Vec>>) { + let o0 = outputs[0].clone().unwrap(); + let o3 = outputs[3].clone().unwrap(); + // Use the shares to sign the message. let sig00 = S::partial_sign(&o0.shares.as_ref().unwrap()[0], &MSG); let sig30 = S::partial_sign(&o3.shares.as_ref().unwrap()[0], &MSG); @@ -277,16 +302,30 @@ fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { S::partial_verify(&o3.vss_pk, &MSG, &sig31).unwrap(); let sigs = vec![sig00, sig30, sig31]; - let sig = S::aggregate(d0.t(), sigs.iter()).unwrap(); + let sig = S::aggregate(threshold, sigs.iter()).unwrap(); S::verify(o0.vss_pk.c0(), &MSG, &sig).unwrap(); } -fn decrypt_and_prepare_for_reenc( +// Enable if logs are needed +// #[traced_test] +#[test] +fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { + dkg_e2e_5_parties_min_weight_2_threshold_3::(); + let (threshold, outputs) = dkg_e2e_5_parties_min_weight_2_threshold_3::(); + sign_with_shares(threshold, outputs); +} + +fn decrypt_and_prepare_for_reenc( keys: &[KeyNodePair], nodes: &Nodes, msg0: &Message, ro: &RandomOracle, -) -> Vec<(PublicKey, Vec)> { +) -> Vec<(PublicKey, Vec)> +where + G: GroupElement + MultiScalarMul + Serialize + DeserializeOwned, + EG: GroupElement + Serialize + DeserializeOwned + HashToGroupElement, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ nodes .iter() .map(|n| { From dcca4dcdcc4d0abcf6b65a6a95d456720676210f Mon Sep 17 00:00:00 2001 From: themicp Date: Wed, 30 Oct 2024 16:19:24 +0000 Subject: [PATCH 06/20] Update DKG tests: run for secp256k1 as well --- Cargo.lock | 1 + fastcrypto-tbls/Cargo.toml | 1 + fastcrypto-tbls/src/tests/dkg_v1_tests.rs | 116 +++++++++++++++++----- 3 files changed, 91 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 73f951e8ff..01837f069e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1381,6 +1381,7 @@ dependencies = [ "generic-tests", "hex", "itertools 0.10.5", + "paste", "rand", "serde", "sha3 0.10.8", diff --git a/fastcrypto-tbls/Cargo.toml b/fastcrypto-tbls/Cargo.toml index ef10381d31..4643f7dfd6 100644 --- a/fastcrypto-tbls/Cargo.toml +++ b/fastcrypto-tbls/Cargo.toml @@ -23,6 +23,7 @@ zeroize.workspace = true itertools = "0.10.5" hex = "0.4.3" tap = { version = "1.0.1", features = [] } +paste = "1.0.15" [dev-dependencies] criterion = "0.4.0" diff --git a/fastcrypto-tbls/src/tests/dkg_v1_tests.rs b/fastcrypto-tbls/src/tests/dkg_v1_tests.rs index 69b55ba9f1..887ccb449a 100644 --- a/fastcrypto-tbls/src/tests/dkg_v1_tests.rs +++ b/fastcrypto-tbls/src/tests/dkg_v1_tests.rs @@ -12,11 +12,12 @@ use crate::random_oracle::RandomOracle; use crate::tbls::ThresholdBls; use crate::types::ThresholdBls12381MinSig; use fastcrypto::error::FastCryptoError; -use fastcrypto::groups::bls12381::{G2Element, Scalar}; +use fastcrypto::groups::bls12381::G2Element; use fastcrypto::groups::secp256k1::ProjectivePoint; use fastcrypto::groups::{FiatShamirChallenge, GroupElement, HashToGroupElement, MultiScalarMul}; use fastcrypto::traits::AllowedRng; use itertools::Itertools; +use paste::paste; use rand::prelude::StdRng; use rand::rngs::ThreadRng; use rand::{thread_rng, SeedableRng}; @@ -26,12 +27,23 @@ use zeroize::Zeroize; const MSG: [u8; 4] = [1, 2, 3, 4]; -type G = G2Element; type S = ThresholdBls12381MinSig; -type EG = G2Element; type KeyNodePair = (PartyId, PrivateKey, PublicKey); +macro_rules! generate_tests { + ($test_fn:ident, $( ($type1:ty, $type2:ty, $alias:ident) ),* $(,)? ) => { + $( + paste! { + #[test] + fn []() { + $test_fn::<$type1, $type2>(); + } + } + )* + } +} + fn gen_keys_and_nodes(n: usize) -> (Vec>, Nodes) where EG: GroupElement + Serialize + DeserializeOwned, @@ -306,15 +318,6 @@ fn sign_with_shares(threshold: u16, outputs: Vec(); - let (threshold, outputs) = dkg_e2e_5_parties_min_weight_2_threshold_3::(); - sign_with_shares(threshold, outputs); -} - fn decrypt_and_prepare_for_reenc( keys: &[KeyNodePair], nodes: &Nodes, @@ -342,8 +345,21 @@ where .collect::>() } +// Enable if logs are needed +// #[traced_test] #[test] -fn test_party_new_errors() { +fn test_dkg_e2e_5_parties_min_weight_2_threshold_3() { + dkg_e2e_5_parties_min_weight_2_threshold_3::(); + let (threshold, outputs) = dkg_e2e_5_parties_min_weight_2_threshold_3::(); + sign_with_shares(threshold, outputs); +} + +fn party_new_errors() +where + G: GroupElement + MultiScalarMul + Serialize + DeserializeOwned, + EG: GroupElement + Serialize + DeserializeOwned + HashToGroupElement, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ let ro = RandomOracle::new("dkg"); let (keys, nodes) = gen_keys_and_nodes(4); @@ -376,8 +392,18 @@ fn test_party_new_errors() { .is_err()); } -#[test] -fn test_process_message_failures() { +generate_tests!( + party_new_errors, + (ProjectivePoint, ProjectivePoint, secp256k1), + (G2Element, G2Element, bls12381), +); + +fn process_message_failures() +where + G: GroupElement + MultiScalarMul + Serialize + DeserializeOwned, + EG: GroupElement + Serialize + DeserializeOwned + HashToGroupElement, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ let ro = RandomOracle::new("dkg"); let t = 3; let (keys, nodes) = gen_keys_and_nodes(4); @@ -507,8 +533,18 @@ fn test_process_message_failures() { }; } -#[test] -fn test_test_process_confirmations() { +generate_tests!( + process_message_failures, + (ProjectivePoint, ProjectivePoint, secp256k1), + (G2Element, G2Element, bls12381), +); + +fn process_confirmations() +where + G: GroupElement + MultiScalarMul + Serialize + DeserializeOwned, + EG: GroupElement + Serialize + DeserializeOwned + HashToGroupElement, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ let ro = RandomOracle::new("dkg"); let t = 3; let (keys, nodes) = gen_keys_and_nodes(6); @@ -646,8 +682,18 @@ fn test_test_process_confirmations() { ); } -#[test] -fn create_message_generates_valid_message() { +generate_tests!( + process_confirmations, + (ProjectivePoint, ProjectivePoint, secp256k1), + (G2Element, G2Element, bls12381), +); + +fn create_message_generates_valid_message() +where + G: GroupElement + MultiScalarMul + Serialize + DeserializeOwned, + EG: GroupElement + Serialize + DeserializeOwned + HashToGroupElement, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ let (keys, nodes) = gen_keys_and_nodes(4); let d = Party::::new( keys.get(1_usize).unwrap().1.clone(), @@ -664,8 +710,18 @@ fn create_message_generates_valid_message() { assert_eq!(msg.vss_pk.degree(), 2); } -#[test] -fn test_size_limits() { +generate_tests!( + create_message_generates_valid_message, + (ProjectivePoint, ProjectivePoint, secp256k1), + (G2Element, G2Element, bls12381), +); + +fn size_limits() +where + G: GroupElement, + EG: GroupElement + Serialize + DeserializeOwned + HashToGroupElement, + EG::ScalarType: FiatShamirChallenge + Zeroize, +{ // Confirm that messages sizes are within the limit for the extreme expected parameters. let n = 3333; let t = n / 3; @@ -673,9 +729,9 @@ fn test_size_limits() { // an approximation of the weights let w = n / k; - let shares = (0..w).map(Scalar::from).collect_vec(); + let shares = (0..w).map(G::ScalarType::from).collect_vec(); - let p = Poly::<::ScalarType>::rand(t as u16, &mut thread_rng()); + let p = Poly::::rand(t as u16, &mut thread_rng()); let ro = RandomOracle::new("test"); let keys_and_msg = (0..k) .map(|_| { @@ -709,6 +765,12 @@ fn test_size_limits() { assert!(bcs::to_bytes(&conf).unwrap().len() <= DKG_MESSAGES_MAX_SIZE); } +generate_tests!( + size_limits, + (ProjectivePoint, ProjectivePoint, secp256k1), + (G2Element, G2Element, bls12381), +); + #[test] fn test_serialized_message_regression() { let ro = RandomOracle::new("dkg"); @@ -716,7 +778,7 @@ fn test_serialized_message_regression() { let mut rng = StdRng::from_seed([1; 32]); let (keys, nodes) = gen_keys_and_nodes_rng(6, &mut rng); - let d0 = Party::::new( + let d0 = Party::::new( keys.first().unwrap().1.clone(), nodes.clone(), t, @@ -724,7 +786,7 @@ fn test_serialized_message_regression() { &mut rng, ) .unwrap(); - let d1 = Party::::new( + let d1 = Party::::new( keys.get(1_usize).unwrap().1.clone(), nodes.clone(), t, @@ -732,7 +794,7 @@ fn test_serialized_message_regression() { &mut rng, ) .unwrap(); - let _d2 = Party::::new( + let _d2 = Party::::new( keys.get(2_usize).unwrap().1.clone(), nodes.clone(), t, @@ -740,7 +802,7 @@ fn test_serialized_message_regression() { &mut rng, ) .unwrap(); - let d3 = Party::::new( + let d3 = Party::::new( keys.get(3_usize).unwrap().1.clone(), nodes.clone(), t, From be923760b48fa1b81f8e2d9e76766523ca79f046 Mon Sep 17 00:00:00 2001 From: themicp Date: Wed, 30 Oct 2024 16:22:10 +0000 Subject: [PATCH 07/20] Remove unnecessary generics --- fastcrypto-tbls/src/tests/dkg_v1_tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastcrypto-tbls/src/tests/dkg_v1_tests.rs b/fastcrypto-tbls/src/tests/dkg_v1_tests.rs index 887ccb449a..29e14cd90f 100644 --- a/fastcrypto-tbls/src/tests/dkg_v1_tests.rs +++ b/fastcrypto-tbls/src/tests/dkg_v1_tests.rs @@ -87,7 +87,7 @@ where { let ro = RandomOracle::new("dkg"); let t = 3; - let (keys, nodes) = gen_keys_and_nodes::(6); + let (keys, nodes) = gen_keys_and_nodes(6); // Create the parties let d0 = Party::::new( @@ -152,7 +152,7 @@ where ); // d5 will receive invalid shares from d0, but its complaint will not be processed on time. let mut msg0 = d0.create_message_v1(&mut thread_rng()).unwrap(); - let mut pk_and_msgs = decrypt_and_prepare_for_reenc::(&keys, &nodes, &msg0, &ro); + let mut pk_and_msgs = decrypt_and_prepare_for_reenc(&keys, &nodes, &msg0, &ro); pk_and_msgs[5] = pk_and_msgs[0].clone(); msg0.encrypted_shares = MultiRecipientEncryption::encrypt(&pk_and_msgs, &ro.extend("encs 0"), &mut thread_rng()); @@ -160,7 +160,7 @@ where // We will modify d1's message to make it invalid (emulating a cheating party). d0 and d1 // should detect that and send complaints. let mut msg1 = d1.create_message_v1(&mut thread_rng()).unwrap(); - let mut pk_and_msgs = decrypt_and_prepare_for_reenc::(&keys, &nodes, &msg1, &ro); + let mut pk_and_msgs = decrypt_and_prepare_for_reenc(&keys, &nodes, &msg1, &ro); pk_and_msgs.swap(0, 1); msg1.encrypted_shares = MultiRecipientEncryption::encrypt(&pk_and_msgs, &ro.extend("encs 1"), &mut thread_rng()); From e6bfdd5884f50f02acbc32a5481409827a87b341 Mon Sep 17 00:00:00 2001 From: themicp Date: Wed, 30 Oct 2024 16:36:34 +0000 Subject: [PATCH 08/20] Update domain --- fastcrypto/src/groups/secp256k1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index d46a447382..dc01a62e42 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -283,7 +283,7 @@ impl ToFromByteArray for ProjectivePoint { impl HashToGroupElement for ProjectivePoint { fn hash_to_group_element(msg: &[u8]) -> Self { - let domain = "FOOBAR".as_bytes(); + let domain = "secp256k1_XMD:SHA-256_SSWU_RO_".as_bytes(); let mut u = [FieldElement::ZERO]; hash_to_field::, FieldElement>(&[msg], &[domain], &mut u) .expect("should never return error according to error cases described in ExpandMsgXmd"); From ec985450b2c8fe4321a024e173d64fab0adc290b Mon Sep 17 00:00:00 2001 From: themicp Date: Wed, 30 Oct 2024 16:38:06 +0000 Subject: [PATCH 09/20] Remove unnecessary comments --- fastcrypto/src/groups/secp256k1.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index dc01a62e42..ea4369048b 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -29,7 +29,6 @@ use sha2::{Digest, Sha256, Sha512}; use std::ops::{Add, Div, Mul, Neg, Sub}; use zeroize::Zeroize; -/// Elements of the group G_1 in BLS 12-381. #[derive(Clone, Copy, Eq, PartialEq, GroupOpsExtend, Debug)] #[repr(transparent)] pub struct ProjectivePoint(SecpProjectivePoint); @@ -133,12 +132,6 @@ impl ScalarType for Scalar { } } -/// Reduce a big-endian integer of arbitrary size modulo the scalar field size and return the scalar. -/// If the input bytes are uniformly distributed, the output will be uniformly distributed in the -/// scalar field. -/// -/// The input buffer must be at least 48 bytes long to ensure that there is only negligible bias in -/// the output. fn reduce_mod_uniform_buffer(buffer: &[u8]) -> Scalar { match buffer_to_scalar_mod_r(buffer) { Ok(scalar) => scalar, @@ -146,7 +139,6 @@ fn reduce_mod_uniform_buffer(buffer: &[u8]) -> Scalar { } } -/// Similar to `reduce_mod_uniform_buffer`, returns a result of scalar, and does not panic on invalid length. fn buffer_to_scalar_mod_r(buffer: &[u8]) -> FastCryptoResult { let hash = Sha512::digest(buffer); @@ -230,27 +222,21 @@ impl Neg for ProjectivePoint { impl MultiScalarMul for ProjectivePoint { fn multi_scalar_mul(scalars: &[Self::ScalarType], points: &[Self]) -> FastCryptoResult { - // Input validation if scalars.len() != points.len() || scalars.is_empty() { return Err(FastCryptoError::GeneralError(String::from( "Invalid input: Scalars and points must have the same non-zero length", ))); } - // Initialize the result to the identity element let mut result = SecpProjectivePoint::IDENTITY; - // Iterate over the scalars and points for (scalar, point) in scalars.iter().zip(points.iter()) { - // Skip zero scalars or identity points if scalar.0.is_zero().into() || point.0 == SecpProjectivePoint::IDENTITY { continue; } - // Perform scalar multiplication let scalar_mul = point.0.mul(scalar.0); - // Accumulate the result result += scalar_mul; } From 04d86fb679edc5bf72a8db0f8608669f668b7d61 Mon Sep 17 00:00:00 2001 From: themicp Date: Thu, 31 Oct 2024 10:36:49 +0000 Subject: [PATCH 10/20] Move paste to dev-dependencies --- fastcrypto-tbls/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastcrypto-tbls/Cargo.toml b/fastcrypto-tbls/Cargo.toml index 4643f7dfd6..cefae09056 100644 --- a/fastcrypto-tbls/Cargo.toml +++ b/fastcrypto-tbls/Cargo.toml @@ -23,11 +23,11 @@ zeroize.workspace = true itertools = "0.10.5" hex = "0.4.3" tap = { version = "1.0.1", features = [] } -paste = "1.0.15" [dev-dependencies] criterion = "0.4.0" generic-tests = "0.1.2" +paste = "1.0.15" [[bench]] name = "polynomial" From 801fe96e62f82c2c53cfa896fa96b53dd12fb209 Mon Sep 17 00:00:00 2001 From: themicp Date: Thu, 31 Oct 2024 10:40:28 +0000 Subject: [PATCH 11/20] Linting --- fastcrypto/src/groups/secp256k1.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index ea4369048b..4624bbdc7e 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -36,6 +36,9 @@ pub struct ProjectivePoint(SecpProjectivePoint); #[derive(Clone, Copy, Eq, PartialEq, GroupOpsExtend, Debug)] pub struct Scalar(SecpScalar); +pub const PROJECTIVE_POINT_BYTE_LENGTH: usize = 33; +pub const SCALAR_BYTE_LENGTH: usize = 32; + impl Div for Scalar { type Output = FastCryptoResult; @@ -77,7 +80,6 @@ impl Add for Scalar { } } -pub const SCALAR_BYTE_LENGTH: usize = 32; impl FromTrustedByteArray for Scalar { fn from_trusted_byte_array(bytes: &[u8; SCALAR_BYTE_LENGTH]) -> FastCryptoResult { let mut padded_bytes = [0u8; 48]; @@ -244,8 +246,6 @@ impl MultiScalarMul for ProjectivePoint { } } -pub const PROJECTIVE_POINT_BYTE_LENGTH: usize = 33; - impl FromTrustedByteArray for ProjectivePoint { fn from_trusted_byte_array( bytes: &[u8; PROJECTIVE_POINT_BYTE_LENGTH], @@ -262,7 +262,6 @@ impl ToFromByteArray for ProjectivePoint { } fn to_byte_array(&self) -> [u8; PROJECTIVE_POINT_BYTE_LENGTH] { - let mut bytes = [0u8; PROJECTIVE_POINT_BYTE_LENGTH]; self.0.to_bytes().into() } } From aa1b4ad746fc364b31b91bb059d6c361ab041877 Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 12:38:36 +0000 Subject: [PATCH 12/20] Remove duplicate package requirement --- fastcrypto/Cargo.toml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/fastcrypto/Cargo.toml b/fastcrypto/Cargo.toml index d7b83872e7..e410c0b40a 100644 --- a/fastcrypto/Cargo.toml +++ b/fastcrypto/Cargo.toml @@ -130,13 +130,6 @@ aes = ["dep:aes", "dep:cbc", "dep:aes-gcm", "dep:ctr"] [dev-dependencies] criterion = "0.4.0" -k256 = { version = "0.13.4", features = [ - "ecdsa", - "sha256", - "hash2curve", - "arithmetic", - "expose-field", -] } proptest = "1.1.0" serde-reflection = "0.3.6" wycheproof = "0.5.0" From 3930b6c8fcaad76b71f67ed55613523275766449 Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 12:44:16 +0000 Subject: [PATCH 13/20] Add directive to enable secp256k1 only during testing or with the 'experimental' feature --- fastcrypto/src/groups/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/fastcrypto/src/groups/mod.rs b/fastcrypto/src/groups/mod.rs index 85bdf213b3..8f022d1c0d 100644 --- a/fastcrypto/src/groups/mod.rs +++ b/fastcrypto/src/groups/mod.rs @@ -11,6 +11,7 @@ use std::ops::{AddAssign, SubAssign}; pub mod bls12381; pub mod ristretto255; +#[cfg(any(test, feature = "experimental"))] pub mod secp256k1; pub mod secp256r1; From 736f6cf1e5224b70be28cd510a64ce23c05d566b Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 12:54:44 +0000 Subject: [PATCH 14/20] Properly handle error when dividing Scalar by 0 --- fastcrypto/src/groups/secp256k1.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index 4624bbdc7e..704f03955b 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -43,7 +43,8 @@ impl Div for Scalar { type Output = FastCryptoResult; fn div(self, rhs: Self) -> Self::Output { - let inv = rhs.0.invert().unwrap(); + let inv: Option = rhs.0.invert().into(); + let inv = inv.ok_or(FastCryptoError::InvalidInput)?; Ok(Scalar(self.0.mul(inv))) } } From 91432382a3dae3f03e88a0b9bd3eef1740db9aeb Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 12:59:58 +0000 Subject: [PATCH 15/20] Avoid the use of unwrap --- fastcrypto/src/groups/secp256k1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index 704f03955b..b251606de5 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -131,7 +131,7 @@ impl ScalarType for Scalar { if self.0 == SecpScalar::ZERO { return Err(FastCryptoError::InvalidInput); } - Ok(Self(self.0.invert().unwrap())) + Ok(Self(self.0.invert().expect("checked above"))) } } From 6060b55bd7570bda6b3d63b50ae03585b47f0ef8 Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 13:00:16 +0000 Subject: [PATCH 16/20] Properly handle error when dividing ProjectivePoint by 0 --- fastcrypto/src/groups/secp256k1.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index b251606de5..28cb9520c2 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -186,7 +186,8 @@ impl Div for ProjectivePoint { type Output = FastCryptoResult; fn div(self, rhs: Scalar) -> Self::Output { - let inv = rhs.0.invert().unwrap(); + let inv: Option = rhs.0.invert().into(); + let inv = inv.ok_or(FastCryptoError::InvalidInput)?; Ok(Self(self.0.mul(inv))) } } From 39128cdf78f29983fef09dc42d3ffd5860388083 Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 13:01:29 +0000 Subject: [PATCH 17/20] Use proper error when invalid input is provided in multi_scalar_mul --- fastcrypto/src/groups/secp256k1.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index 28cb9520c2..0157d4f6e0 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -227,9 +227,7 @@ impl Neg for ProjectivePoint { impl MultiScalarMul for ProjectivePoint { fn multi_scalar_mul(scalars: &[Self::ScalarType], points: &[Self]) -> FastCryptoResult { if scalars.len() != points.len() || scalars.is_empty() { - return Err(FastCryptoError::GeneralError(String::from( - "Invalid input: Scalars and points must have the same non-zero length", - ))); + return Err(FastCryptoError::InvalidInput); } let mut result = SecpProjectivePoint::IDENTITY; From 93ea9ce48e1bc47cab5e712b934a0af2bc471bd3 Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 13:02:05 +0000 Subject: [PATCH 18/20] Use IDENTITY instead of default() --- fastcrypto/src/groups/secp256k1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index 0157d4f6e0..97cae53888 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -174,7 +174,7 @@ impl GroupElement for ProjectivePoint { type ScalarType = Scalar; fn zero() -> Self { - Self(SecpProjectivePoint::default()) + Self(SecpProjectivePoint::IDENTITY) } fn generator() -> Self { From 83d2050b03dbe0a7cb7900bf90a0fea2dfaaf3ac Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 13:04:12 +0000 Subject: [PATCH 19/20] Avoid the use of unwrap --- fastcrypto/src/groups/secp256k1.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastcrypto/src/groups/secp256k1.rs b/fastcrypto/src/groups/secp256k1.rs index 97cae53888..db9fc59f8e 100644 --- a/fastcrypto/src/groups/secp256k1.rs +++ b/fastcrypto/src/groups/secp256k1.rs @@ -251,7 +251,8 @@ impl FromTrustedByteArray for ProjectivePoint { bytes: &[u8; PROJECTIVE_POINT_BYTE_LENGTH], ) -> FastCryptoResult { Ok(ProjectivePoint( - SecpProjectivePoint::from_bytes(bytes.as_slice().into()).unwrap(), + SecpProjectivePoint::from_bytes(bytes.as_slice().into()) + .expect("trusted input should be a valid point"), )) } } From 0d346fa6c929700468956246f838d3e6adc846d2 Mon Sep 17 00:00:00 2001 From: themicp Date: Mon, 11 Nov 2024 13:44:50 +0000 Subject: [PATCH 20/20] Remove .as_element() from PrivateKey --- fastcrypto-tbls/src/ecies_v0.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fastcrypto-tbls/src/ecies_v0.rs b/fastcrypto-tbls/src/ecies_v0.rs index 351d01a992..f545375559 100644 --- a/fastcrypto-tbls/src/ecies_v0.rs +++ b/fastcrypto-tbls/src/ecies_v0.rs @@ -76,10 +76,6 @@ where proof, } } - - pub fn as_element(&self) -> &G::ScalarType { - &self.0 - } } impl PublicKey