From e2f5c1987d972d0be3e929d87996786428419273 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 2 Jun 2026 11:19:17 +0200 Subject: [PATCH 1/7] feat: adopt mpz #403 (bounded map concurrency) + rand 0.10 Integrates the mpz executor refactor (privacy-ethereum/mpz#403), which bounds `Context::map` concurrency to a constant (default 32) via `buffered`, so the number of concurrently open mux streams no longer scales with protocol work. This fixes `TooManyStreams` at the root rather than by raising the mux cap (cf. tlsn#1159). Measured peak streams at the production config (max_recv=70000) drop 555 -> ~133, under the mux default of 512. Changes: - session.rs: migrate from `mpz_common::Executor`/`ExecutorBuilder` to the new `Session`/`SessionBuilder` + `ThreadPool` API. - Bump workspace rand/rand_chacha/rand_core 0.9 -> 0.10 to match mpz; work through the API fallout (`fill`->`fill_bytes`/`RngExt`, `thread_rng`->`rng`, `gen`->`random`, `RngCore` no longer re-exported). - Replace `rand06-compat` (bridges rand_core 0.6<->0.9 only) with a local `Compat` adapter bridging rand_core 0.10 -> 0.6 for p256/k256 key gen. TEMPORARY (revert before merge): - mpz-* are pinned to the #403 branch SHA 3acfac3, not a release. Re-pin to a tagged mpz rev once #403 merges to dev. REVIEW NOTES: - crypto-sensitive: rand 0.10 upgrade in an MPC protocol; the `Compat` adapter and RNG semantics need scrutiny. - two `EphemeralSecret::random(&mut OsRng)` sites now use `Compat(rand::rng())` (ThreadRng, a CSPRNG) since rand 0.10 dropped `rngs::OsRng` in favor of `SysRng`; confirm this substitution is acceptable for ephemeral key generation. - the `Compat` adapter is duplicated in key-exchange, tls-client, and attestation; consider a shared helper crate. --- Cargo.lock | 846 +++++++++--------- Cargo.toml | 36 +- crates/attestation/src/builder.rs | 2 +- crates/attestation/src/signing.rs | 36 +- crates/attestation/tests/api.rs | 2 +- .../fixtures/generate_presentation_fixture.rs | 2 +- crates/components/hmac-sha256/src/lib.rs | 2 +- .../hmac-sha256/src/prf/function.rs | 2 +- .../components/hmac-sha256/src/test_utils.rs | 2 +- crates/components/key-exchange/Cargo.toml | 1 - .../components/key-exchange/src/exchange.rs | 45 +- .../key-exchange/src/point_addition.rs | 2 +- crates/core/src/fixtures/transcript.rs | 2 +- crates/core/src/hash.rs | 2 +- crates/core/src/transcript/proof.rs | 6 +- crates/mpc-tls/src/decode.rs | 2 +- crates/mpc-tls/src/record_layer.rs | 2 +- crates/mpc-tls/src/record_layer/aead/ghash.rs | 2 +- crates/mpc-tls/src/record_layer/aes_gcm.rs | 2 +- crates/tls/client/src/backend/standard.rs | 6 +- crates/tls/client/src/crypto/standard.rs | 11 +- crates/tls/client/src/lib.rs | 1 + crates/tls/client/src/rand_compat.rs | 33 + crates/tls/core/src/rand.rs | 2 +- crates/tlsn/src/deps/prover.rs | 2 +- crates/tlsn/src/session.rs | 21 +- crates/tlsn/src/transcript_internal/auth.rs | 2 +- 27 files changed, 598 insertions(+), 476 deletions(-) create mode 100644 crates/tls/client/src/rand_compat.rs diff --git a/Cargo.lock b/Cargo.lock index 774ec73e77..da47e122e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,11 +42,11 @@ dependencies = [ [[package]] name = "aes" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66bd29a732b644c0431c6140f370d097879203d79b80c94a6747ba0872adaef8" +checksum = "f1fc76eaeac4c9164506c466d4ffdd8ec9d0c5bf57ee97177c4d8eceb3a0e138" dependencies = [ - "cipher 0.5.1", + "cipher 0.5.2", "cpubits", "cpufeatures 0.3.0", ] @@ -65,18 +65,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -112,7 +100,7 @@ dependencies = [ "k256", "once_cell", "rand 0.8.6", - "secp256k1", + "secp256k1 0.30.0", "serde", "serde_json", "serde_with", @@ -173,15 +161,16 @@ dependencies = [ [[package]] name = "alloy-eip7928" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec6ae911a2fc304a7cb80a79fb7bed6d1474aed4e7c203df1f8ff538f64fc78d" +checksum = "6b827a6d7784fe3eb3489d40699407a4cdcce74271421a01bdffe60cf573bb16" dependencies = [ "alloy-primitives", "alloy-rlp", "borsh", "once_cell", "serde", + "thiserror 2.0.18", ] [[package]] @@ -209,9 +198,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dbe713da0c737d9e5e387b0ba790eb98b14dd207fe53eef50e19a5a8ec3dac" +checksum = "7c36c9d7f9021601b04bfef14a4b64849f6d73116a4e91e071d7fbfe10247901" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -227,7 +216,7 @@ checksum = "422d110f1c40f1f8d0e5562b0b649c35f345fccb7093d9f02729943dcd1eef71" dependencies = [ "alloy-primitives", "alloy-sol-types", - "http 1.4.0", + "http 1.4.1", "serde", "serde_json", "thiserror 2.0.18", @@ -275,9 +264,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3b431b4e72cd8bd0ec7a50b4be18e73dab74de0dba180eef171055e5d5926e" +checksum = "4885c1409b6936c4898e646ef58baf6ec54edaf6d8179f79df805a7b85b7cf3e" dependencies = [ "alloy-rlp", "bytes", @@ -285,7 +274,7 @@ dependencies = [ "const-hex", "derive_more", "foldhash 0.2.0", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "indexmap 2.14.0", "itoa", "k256", @@ -296,6 +285,7 @@ dependencies = [ "rapidhash", "ruint", "rustc-hash", + "secp256k1 0.31.1", "serde", "sha3", ] @@ -398,9 +388,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab81bab693da9bb79f7a95b64b394718259fdd7e41dceeced4cad57cb71c4f6a" +checksum = "840128ed2b2971d6d4668a553fe403a82683d3acc646c73e75887e7157408033" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -412,9 +402,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489f1620bb7e2483fb5819ed01ab6edc1d2f93939dce35a5695085a1afd1d699" +checksum = "63ec265e5d65d725175f6ca7711c970824c90ef9c0d1f1973711d4150ee612dd" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -430,9 +420,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56cef806ad22d4392c5fc83cf8f2089f988eb99c7067b4e0c6f1971fc1cca318" +checksum = "89bf01077f18650876cfa682eb1f949967b5cde03f1a51c955c469d2c9b4aa67" dependencies = [ "const-hex", "dunce", @@ -446,19 +436,19 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6df77fea9d6a2a75c0ef8d2acbdfd92286cc599983d3175ccdc170d3433d249" +checksum = "857b470ecdd2ed38beaf82ad1a38c516a8ff75266750f38b9eeed001d575241b" dependencies = [ "serde", - "winnow 0.7.15", + "winnow 1.0.3", ] [[package]] name = "alloy-sol-types" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64612d29379782a5dde6f4b6570d9c756d734d760c0c94c254d361e678a6591f" +checksum = "384cf252de0db2dec52821eac037a7f57e2aa33fe5b900ce6fe39973402341f1" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -565,23 +555,6 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "zeroize", -] - [[package]] name = "ark-ff" version = "0.3.0" @@ -708,30 +681,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-secp256r1" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3975a01b0a6e3eae0f72ec7ca8598a6620fc72fa5981f6f5cca33b7cd788f633" -dependencies = [ - "ark-ec", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - [[package]] name = "ark-serialize" version = "0.3.0" @@ -748,7 +697,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ - "ark-serialize-derive", "ark-std 0.4.0", "digest 0.10.7", "num-bigint", @@ -766,17 +714,6 @@ dependencies = [ "num-bigint", ] -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-std" version = "0.3.0" @@ -899,9 +836,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "axum" @@ -913,7 +850,7 @@ dependencies = [ "axum-core 0.4.5", "bytes", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body", "http-body-util", "hyper", @@ -947,7 +884,7 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body", "http-body-util", "hyper", @@ -979,7 +916,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body", "http-body-util", "mime", @@ -999,7 +936,7 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http 1.4.0", + "http 1.4.1", "http-body", "http-body-util", "mime", @@ -1023,7 +960,7 @@ dependencies = [ "bytes", "bytesize", "cookie", - "http 1.4.0", + "http 1.4.1", "http-body-util", "hyper", "hyper-util", @@ -1090,6 +1027,15 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "bcs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350f2b5fa7b76b498158ec1079dc0ea842c5b622b6b3f675005fddd889f2c9a7" +dependencies = [ + "serde_core", +] + [[package]] name = "bimap" version = "0.6.3" @@ -1124,7 +1070,7 @@ dependencies = [ "quote", "regex", "rustc-hash", - "shlex", + "shlex 1.3.0", "syn 2.0.117", ] @@ -1145,15 +1091,15 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitcoin-io" -version = "0.1.4" +version = "0.1.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dee39a0ee5b4095224a0cfc6bf4cc1baf0f9624b96b367e53b66d974e51d953" +checksum = "11301df0b06f22dea7bb1916403fdd88a371031e495c49b8f96931b28189e175" [[package]] name = "bitcoin_hashes" -version = "0.14.1" +version = "0.14.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ec84b80c482df901772e931a9a681e26a1b9ee2302edeff23cb30328745c8b" +checksum = "0c9901a56e133a1fc86eeb1113e2591f45f4682451ca893bff494d2f88918e3f" dependencies = [ "bitcoin-io", "hex-conservative", @@ -1203,6 +1149,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +dependencies = [ + "hybrid-array", +] + [[package]] name = "blst" version = "0.3.16" @@ -1264,11 +1219,20 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "byte-slice-cast" @@ -1360,12 +1324,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.61" +version = "1.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" dependencies = [ "find-msvc-tools", - "shlex", + "shlex 2.0.1", ] [[package]] @@ -1389,6 +1353,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + [[package]] name = "charming" version = "0.5.1" @@ -1530,11 +1505,12 @@ dependencies = [ [[package]] name = "cipher" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34d8227fe1ba289043aeb13792056ff80fd6de1a9f49137a5f499de8e8c78ea" +checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c" dependencies = [ - "crypto-common 0.2.1", + "block-buffer 0.12.0", + "crypto-common 0.2.2", "inout 0.2.2", ] @@ -1592,13 +1568,19 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "clmul" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "bytemuck", "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.0", ] +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + [[package]] name = "colorchoice" version = "1.0.5" @@ -1630,9 +1612,9 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.18.1" +version = "1.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531185e432bb31db1ecda541e9e7ab21468d4d844ad7505e0546a49b4945d49b" +checksum = "33e2a781ebdf4467d1428dc4593067825fb646f6871475098d8577421af73558" dependencies = [ "cfg-if", "cpufeatures 0.2.17", @@ -1858,6 +1840,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a0d26b245348befa0c121944541476763dcc46ede886c88f9d12e1697d27c3" +dependencies = [ + "cpubits", + "ctutils", + "hybrid-array", + "num-traits", + "rand_core 0.10.1", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -1870,9 +1865,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" dependencies = [ "hybrid-array", ] @@ -1916,17 +1911,35 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "ctr" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaca1c4b237092596f64d571e9db6ce4109c4ef9742e27590f1709594461f21" +dependencies = [ + "cipher 0.5.2", +] + +[[package]] +name = "ctutils" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" +dependencies = [ + "cmov", +] + [[package]] name = "curve25519-dalek" -version = "4.1.3" +version = "5.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "4f359e08ca85e7bd759e1fd933ff2bccd81864c60a8fba0e259c7f822b0924bf" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.0", "curve25519-dalek-derive", "fiat-crypto", - "rand_core 0.6.4", + "rand_core 0.10.1", "rustc_version 0.4.1", "serde", "subtle", @@ -2217,15 +2230,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro 0.11.2", -] - [[package]] name = "derive_builder" version = "0.12.0" @@ -2244,18 +2248,6 @@ dependencies = [ "derive_builder_macro 0.20.2", ] -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive_builder_core" version = "0.12.0" @@ -2280,16 +2272,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core 0.11.2", - "syn 1.0.109", -] - [[package]] name = "derive_builder_macro" version = "0.12.0" @@ -2354,17 +2336,27 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid 0.9.6", "crypto-common 0.1.7", "subtle", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.0", + "crypto-common 0.2.2", +] + [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", @@ -2424,9 +2416,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" dependencies = [ "serde", ] @@ -2438,7 +2430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", - "crypto-bigint", + "crypto-bigint 0.5.5", "digest 0.10.7", "ff", "generic-array", @@ -2560,9 +2552,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.9" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" [[package]] name = "find-msvc-tools" @@ -2717,9 +2709,9 @@ checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-timer" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" [[package]] name = "futures-util" @@ -2791,6 +2783,7 @@ dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", + "rand_core 0.10.1", "wasip2", "wasip3", ] @@ -2856,16 +2849,16 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.4.0", + "http 1.4.1", "indexmap 2.14.0", "slab", "tokio", @@ -2886,9 +2879,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "6.4.0" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3f9296c208515b87bd915a2f5d1163d4b3f863ba83337d7713cf478055948e" +checksum = "d43ccdfe15a81ab0a8af639e90254227c9a46afd9c5f5b6ec7efaa345c4b0f00" dependencies = [ "derive_builder 0.20.2", "log", @@ -2906,25 +2899,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -2936,21 +2910,17 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [ + "allocator-api2", + "equivalent", "foldhash 0.2.0", "serde", "serde_core", ] -[[package]] -name = "hashbrown" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" - [[package]] name = "heck" version = "0.4.1" @@ -3024,9 +2994,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "8be7462df143984c4598a256ef469b251d7d7f9e271135073e78fc535414f3d0" dependencies = [ "bytes", "itoa", @@ -3039,7 +3009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.4.0", + "http 1.4.1", ] [[package]] @@ -3050,7 +3020,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.4.0", + "http 1.4.1", "http-body", "pin-project-lite", ] @@ -3081,9 +3051,9 @@ checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "hybrid-array" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d46837a0ed51fe95bd3b05de33cd64a1ee88fc797477ca48446872504507c5" +checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" dependencies = [ "serde", "typenum", @@ -3091,16 +3061,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", "h2", - "http 1.4.0", + "http 1.4.1", "http-body", "httparse", "httpdate", @@ -3121,7 +3091,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body", "hyper", "ipnet", @@ -3320,7 +3290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.17.0", + "hashbrown 0.17.1", "serde", "serde_core", ] @@ -3374,16 +3344,6 @@ dependencies = [ "serde", ] -[[package]] -name = "iri-string" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is-terminal" version = "0.4.17" @@ -3442,18 +3402,18 @@ checksum = "f242558c18a6d4ec99bc1eaf1603ab49e857ab36b4c1b911ebd0028cb8165e79" [[package]] name = "itybity" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0e73cb5daa3b9fa8b85908c8698cc6f8004addacdaa6a574e0161b8e659c6a" +checksum = "3e831417be61de8009d16a63677d5d0326b420ee946ca590dcd54ba2c25f65b8" dependencies = [ "rayon", ] [[package]] name = "js-sys" -version = "0.3.97" +version = "0.3.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf" +checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11" dependencies = [ "cfg-if", "futures-util", @@ -3478,18 +3438,19 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" +checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa" dependencies = [ - "cpufeatures 0.2.17", + "cfg-if", + "cpufeatures 0.3.0", ] [[package]] name = "keccak-asm" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa468878266ad91431012b3e5ef1bf9b170eab22883503a318d46857afa4579a" +checksum = "1766b89733097006f3a1388a02849865d6bc98c89273cb622e29fdd209922183" dependencies = [ "digest 0.10.7", "sha3-asm", @@ -3573,15 +3534,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5" [[package]] name = "macro-string" -version = "0.1.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +checksum = "59a9dbbfc75d2688ed057456ce8a3ee3f48d12eec09229f560f3643b9f275653" dependencies = [ "proc-macro2", "quote", @@ -3612,16 +3573,16 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "matrix-transpose" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" [[package]] name = "mime" @@ -3656,9 +3617,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ "libc", "wasi", @@ -3668,7 +3629,7 @@ dependencies = [ [[package]] name = "mpz-circuits" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "mpz-circuits-core", "mpz-circuits-data", @@ -3677,22 +3638,22 @@ dependencies = [ [[package]] name = "mpz-circuits-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "bincode", - "itybity 0.3.2", + "itybity 0.3.3", "once_cell", - "rand 0.9.4", + "rand 0.10.1", "regex", "serde", "serde_arrays", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-circuits-data" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "bincode", "mpz-circuits-core", @@ -3702,31 +3663,31 @@ dependencies = [ [[package]] name = "mpz-cointoss" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "futures", "mpz-cointoss-core", "mpz-common", "mpz-core", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-cointoss-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "mpz-core", "opaque-debug", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-common" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-task", "async-trait", @@ -3740,7 +3701,7 @@ dependencies = [ "pollster", "serde", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "tokio-util", ] @@ -3748,46 +3709,41 @@ dependencies = [ [[package]] name = "mpz-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "aes 0.9.0", - "bcs", + "aes 0.9.1", + "bcs 0.2.1", "bitvec", "blake3", "bytemuck", "cfg-if", - "cipher 0.5.1", + "cipher 0.5.2", "clmul", "hybrid-array", - "itybity 0.3.2", + "itybity 0.3.3", "once_cell", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.6.4", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rayon", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-fields" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "ark-ff 0.4.2", - "ark-secp256r1", - "ark-serialize 0.4.2", + "crypto-bigint 0.7.3", "hybrid-array", - "itybity 0.3.2", + "itybity 0.3.3", "mpz-core", - "num-bigint", "opaque-debug", - "rand 0.8.6", - "rand 0.9.4", + "rand 0.10.1", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", "typenum", "zerocopy", ] @@ -3795,12 +3751,12 @@ dependencies = [ [[package]] name = "mpz-garble" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", - "derive_builder 0.11.2", + "derive_builder 0.20.2", "futures", - "hashbrown 0.14.5", + "hashbrown 0.17.1", "mpz-circuits", "mpz-common", "mpz-core", @@ -3809,11 +3765,11 @@ dependencies = [ "mpz-ot", "mpz-vm-core", "opaque-debug", - "rand 0.9.4", + "rand 0.10.1", "rangeset", "serde", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -3821,15 +3777,15 @@ dependencies = [ [[package]] name = "mpz-garble-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "aes 0.9.0", + "aes 0.9.1", "bitvec", "blake3", "cfg-if", - "cipher 0.5.1", - "derive_builder 0.11.2", - "itybity 0.3.2", + "cipher 0.5.2", + "derive_builder 0.20.2", + "itybity 0.3.3", "mpz-circuits", "mpz-common", "mpz-core", @@ -3838,34 +3794,34 @@ dependencies = [ "mpz-vm-core", "once_cell", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rangeset", "rayon", "serde", "serde_arrays", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", ] [[package]] name = "mpz-hash" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "blake3", - "itybity 0.3.2", + "itybity 0.3.3", "mpz-circuits", "mpz-core", "mpz-vm-core", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ideal-vm" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "futures", @@ -3876,109 +3832,109 @@ dependencies = [ "rangeset", "serde", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-memory-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "blake3", "futures", - "itybity 0.3.2", + "itybity 0.3.3", "mpz-core", - "rand 0.9.4", + "rand 0.10.1", "rangeset", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ole" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "futures", - "itybity 0.3.2", + "itybity 0.3.3", "mpz-common", "mpz-core", "mpz-fields", "mpz-ole-core", "mpz-ot", - "rand 0.9.4", + "rand 0.10.1", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ole-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "hybrid-array", - "itybity 0.3.2", + "itybity 0.3.3", "mpz-common", "mpz-core", "mpz-fields", "mpz-ot-core", - "rand 0.9.4", + "rand 0.10.1", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ot" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "cfg-if", "enum-try-as-inner", "futures", - "itybity 0.3.2", + "itybity 0.3.3", "mpz-cointoss", "mpz-common", "mpz-core", "mpz-ot-core", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "serde", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", ] [[package]] name = "mpz-ot-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "aes 0.9.0", + "aes 0.9.1", "blake3", "bytemuck", "cfg-if", - "cipher 0.5.1", + "cipher 0.5.2", "clmul", - "ctr 0.9.2", + "ctr 0.10.1", "curve25519-dalek", - "derive_builder 0.11.2", + "derive_builder 0.20.2", "enum-try-as-inner", "futures", - "itybity 0.3.2", + "itybity 0.3.3", "matrix-transpose", "mpz-common", "mpz-core", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rayon", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "zerocopy", ] @@ -3986,7 +3942,7 @@ dependencies = [ [[package]] name = "mpz-share-conversion" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "mpz-common", @@ -3994,46 +3950,46 @@ dependencies = [ "mpz-fields", "mpz-ole", "mpz-share-conversion-core", - "rand 0.9.4", + "rand 0.10.1", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-share-conversion-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "mpz-common", "mpz-core", "mpz-fields", "mpz-ole-core", - "rand 0.9.4", + "rand 0.10.1", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-vm-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "futures", "mpz-circuits", "mpz-common", "mpz-memory-core", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-zk" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "blake3", - "derive_builder 0.11.2", + "derive_builder 0.20.2", "futures", "mpz-common", "mpz-core", @@ -4041,26 +3997,26 @@ dependencies = [ "mpz-vm-core", "mpz-zk-core", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-zk-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "blake3", "cfg-if", - "itybity 0.3.2", + "itybity 0.3.3", "mpz-circuits", "mpz-core", "mpz-memory-core", "mpz-vm-core", - "rand_chacha 0.9.0", + "rand_chacha 0.10.0", "rangeset", "rayon", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", "zerocopy", ] @@ -4102,9 +4058,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-integer" @@ -4350,18 +4306,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", @@ -4414,9 +4370,9 @@ dependencies = [ [[package]] name = "pollster" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" [[package]] name = "polyval" @@ -4519,7 +4475,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.11+spec-1.1.0", + "toml_edit 0.25.12+spec-1.1.0", ] [[package]] @@ -4651,6 +4607,17 @@ dependencies = [ "serde", ] +[[package]] +name = "rand" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + [[package]] name = "rand06-compat" version = "0.1.0" @@ -4681,6 +4648,16 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand_chacha" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e6af7f3e25ded52c41df4e0b1af2d047e45896c2f3281792ed68a1c243daedb" +dependencies = [ + "ppv-lite86", + "rand_core 0.10.1", +] + [[package]] name = "rand_core" version = "0.6.4" @@ -4700,6 +4677,12 @@ dependencies = [ "serde", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "rand_xorshift" version = "0.4.0" @@ -4807,14 +4790,14 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64 0.22.1", "bytes", "futures-core", - "http 1.4.0", + "http 1.4.1", "http-body", "http-body-util", "hyper", @@ -4826,7 +4809,7 @@ dependencies = [ "sync_wrapper", "tokio", "tower", - "tower-http 0.6.8", + "tower-http 0.6.11", "tower-service", "url", "wasm-bindgen", @@ -5209,10 +5192,21 @@ checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" dependencies = [ "bitcoin_hashes", "rand 0.8.6", - "secp256k1-sys", + "secp256k1-sys 0.10.1", "serde", ] +[[package]] +name = "secp256k1" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3c81b43dc2d8877c216a3fccf76677ee1ebccd429566d3e67447290d0c42b2" +dependencies = [ + "bitcoin_hashes", + "rand 0.9.4", + "secp256k1-sys 0.11.0", +] + [[package]] name = "secp256k1-sys" version = "0.10.1" @@ -5222,6 +5216,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secp256k1-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb913707158fadaf0d8702c2db0e857de66eb003ccfdda5924b5f5ac98efb38" +dependencies = [ + "cc", +] + [[package]] name = "semver" version = "0.11.0" @@ -5279,9 +5282,9 @@ dependencies = [ [[package]] name = "serde_arrays" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38636132857f68ec3d5f3eb121166d2af33cb55174c4d5ff645db6165cbef0fd" +checksum = "94a16b99c5ea4fe3daccd14853ad260ec00ea043b2708d1fd1da3106dcd8d9df" dependencies = [ "serde", ] @@ -5319,9 +5322,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "indexmap 2.14.0", "itoa", @@ -5379,11 +5382,12 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.18.0" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" +checksum = "e72c1c2cb7b223fafb600a619537a871c2818583d619401b785e7c0b746ccde2" dependencies = [ "base64 0.22.1", + "bs58", "chrono", "hex", "indexmap 1.9.3", @@ -5398,9 +5402,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.18.0" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" +checksum = "b90c488738ecb4fb0262f41f43bc40efc5868d9fb744319ddf5f5317f417bfac" dependencies = [ "darling 0.23.0", "proc-macro2", @@ -5460,19 +5464,19 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.9" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77fd7028345d415a4034cf8777cd4f8ab1851274233b45f84e3d955502d93874" +checksum = "be176f1a57ce4e3d31c1a166222d9768de5954f811601fb7ca06fc8203905ce1" dependencies = [ - "digest 0.10.7", + "digest 0.11.3", "keccak", ] [[package]] name = "sha3-asm" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cbb88c189d6352cc8ae96a39d19c7ecad8f7330b29461187f2587fdc2988d5" +checksum = "9f3f15d4e239ebe08413eed880e0f9b5af4b40ee0472543320efa91d488e96a7" dependencies = [ "cc", "cfg-if", @@ -5510,6 +5514,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "sigchld" version = "0.2.4" @@ -5568,9 +5578,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", "windows-sys 0.61.2", @@ -5714,9 +5724,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f425ae0b12e2f5ae65542e00898d500d4d318b4baf09f40fd0d410454e9947" +checksum = "ec005042c7d952febc1a3ef5b0f6674e9054aa836877a31c90b20e25b3d31744" dependencies = [ "paste", "proc-macro2", @@ -5746,9 +5756,9 @@ dependencies = [ [[package]] name = "sys_traits" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a79feaa49de4a6c8191bdbd5fb3eada50671e9367d874d1c12e3d36db131414" +checksum = "88826d6169418c98e8bc52a43f79d50907dfa3e87ba5161930d42c6f980b35ee" dependencies = [ "sys_traits_macros", ] @@ -5931,6 +5941,21 @@ dependencies = [ "serde_json", ] +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tls-server-fixture" version = "0.0.0" @@ -5972,7 +5997,7 @@ dependencies = [ "once_cell", "opaque-debug", "pin-project-lite", - "rand 0.9.4", + "rand 0.10.1", "rangeset", "rstest", "rustls 0.23.40", @@ -6010,13 +6035,13 @@ dependencies = [ "alloy-primitives", "alloy-signer", "alloy-signer-local", - "bcs", + "bcs 0.1.6", "bincode", "blake3", "k256", "opaque-debug", "p256", - "rand 0.9.4", + "rand 0.10.1", "rand06-compat", "rangeset", "rstest", @@ -6059,9 +6084,9 @@ dependencies = [ "hex", "itybity 0.2.1", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rangeset", "rs_merkle", "rstest", @@ -6240,7 +6265,7 @@ dependencies = [ "mpz-hash", "mpz-ideal-vm", "mpz-vm-core", - "rand 0.9.4", + "rand 0.10.1", "ring 0.17.14", "sha2", "thiserror 1.0.69", @@ -6265,9 +6290,8 @@ dependencies = [ "mpz-share-conversion", "mpz-vm-core", "p256", - "rand 0.9.4", - "rand06-compat", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_core 0.10.1", "rstest", "serio", "thiserror 1.0.69", @@ -6301,8 +6325,8 @@ dependencies = [ "opaque-debug", "p256", "pin-project-lite", - "rand 0.9.4", - "rand_chacha 0.9.0", + "rand 0.10.1", + "rand_chacha 0.10.0", "rstest", "rustls-pki-types", "rustls-webpki 0.103.13", @@ -6384,7 +6408,7 @@ dependencies = [ "tokio", "tokio-util", "tower", - "tower-http 0.6.8", + "tower-http 0.6.11", "tower-service", "tracing", "tracing-subscriber", @@ -6407,7 +6431,7 @@ dependencies = [ "log", "mpz-common", "p256", - "rand 0.9.4", + "rand 0.10.1", "rand06-compat", "ring 0.17.14", "rustls 0.20.9", @@ -6430,7 +6454,7 @@ version = "0.1.0-alpha.16-pre" dependencies = [ "futures", "hmac", - "rand 0.9.4", + "rand 0.10.1", "ring 0.17.14", "rustls-pemfile", "rustls-pki-types", @@ -6471,9 +6495,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.52.1" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -6569,14 +6593,14 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.11+spec-1.1.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap 2.14.0", "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow 1.0.2", + "winnow 1.0.3", ] [[package]] @@ -6585,7 +6609,7 @@ version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 1.0.2", + "winnow 1.0.3", ] [[package]] @@ -6619,7 +6643,7 @@ dependencies = [ "bitflags", "bytes", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body", "http-body-util", "http-range-header", @@ -6637,21 +6661,21 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "bitflags", "bytes", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", "tracing", + "url", ] [[package]] @@ -6767,7 +6791,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.4.0", + "http 1.4.1", "httparse", "log", "rand 0.8.6", @@ -6785,7 +6809,7 @@ checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", - "http 1.4.0", + "http 1.4.1", "httparse", "log", "rand 0.9.4", @@ -6796,9 +6820,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.20.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "ucd-trie" @@ -6844,9 +6868,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-width" @@ -6925,9 +6949,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.1" +version = "1.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7" dependencies = [ "js-sys", "wasm-bindgen", @@ -7021,9 +7045,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.120" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1" +checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409" dependencies = [ "cfg-if", "once_cell", @@ -7034,9 +7058,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.70" +version = "0.4.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084" +checksum = "9473dbd2991ae90b6291c3c32c30c6187ac49aa32f9905d1cce280ec1e110b0f" dependencies = [ "js-sys", "wasm-bindgen", @@ -7044,9 +7068,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.120" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103" +checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7054,9 +7078,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.120" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41" +checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e" dependencies = [ "bumpalo", "proc-macro2", @@ -7067,9 +7091,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.120" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea" +checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437" dependencies = [ "unicode-ident", ] @@ -7145,9 +7169,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.97" +version = "0.3.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eadbac71025cd7b0834f20d1fe8472e8495821b4e9801eb0a60bd1f19827602" +checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436" dependencies = [ "js-sys", "wasm-bindgen", @@ -7514,9 +7538,9 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" dependencies = [ "memchr", ] @@ -7686,18 +7710,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" dependencies = [ "proc-macro2", "quote", @@ -7706,9 +7730,9 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] diff --git a/Cargo.toml b/Cargo.toml index 469f39fede..85cd4df89f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,21 +71,21 @@ tlsn-sdk-core = { path = "crates/sdk-core" } tlsn-wasm = { path = "crates/wasm" } tlsn = { path = "crates/tlsn" } -mpz-circuits = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-circuits-data = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-memory-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-common = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-vm-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-garble = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-garble-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-ole = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-ot = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-share-conversion = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-fields = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-zk = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } -mpz-hash = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6", default-features = false } -mpz-ideal-vm = { git = "https://github.com/privacy-ethereum/mpz", rev = "v0.1.0-alpha.6" } +mpz-circuits = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-circuits-data = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-memory-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-common = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-vm-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-garble = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-garble-core = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-ole = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-ot = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-share-conversion = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-fields = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-zk = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } +mpz-hash = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf", default-features = false } +mpz-ideal-vm = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } futures-plex = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "64722f7" } rangeset = { version = "0.4" } @@ -137,9 +137,9 @@ opaque-debug = { version = "0.3" } p256 = { version = "0.13" } pin-project-lite = { version = "0.2" } pollster = { version = "0.4" } -rand = { version = "0.9" } -rand_chacha = { version = "0.9" } -rand_core = { version = "0.9" } +rand = { version = "0.10" } +rand_chacha = { version = "0.10" } +rand_core = { version = "0.10" } rand06-compat = { version = "0.1" } rayon = { version = "1.10" } regex = { version = "1.10" } diff --git a/crates/attestation/src/builder.rs b/crates/attestation/src/builder.rs index 05593ac46a..c56aa7d61a 100644 --- a/crates/attestation/src/builder.rs +++ b/crates/attestation/src/builder.rs @@ -1,6 +1,6 @@ use std::error::Error; -use rand::{Rng, rng}; +use rand::{RngExt, rng}; use tlsn_core::{ connection::{ConnectionInfo, ServerEphemKey}, diff --git a/crates/attestation/src/signing.rs b/crates/attestation/src/signing.rs index 61a76e6103..37077186e7 100644 --- a/crates/attestation/src/signing.rs +++ b/crates/attestation/src/signing.rs @@ -524,15 +524,43 @@ mod test { use alloy_primitives::utils::eip191_message; use alloy_signer::SignerSync; use alloy_signer_local::PrivateKeySigner; - use rand06_compat::Rand0_6CompatExt; use rstest::{fixture, rstest}; use super::*; + /// Bridges a `rand_core` 0.10 RNG to the `rand_core` 0.6 interface required + /// by `k256`/`p256` `SigningKey::random`. Replaces `rand06-compat`, which + /// only bridges `rand_core` 0.6 <-> 0.9. + struct Compat(R); + + impl p256::elliptic_curve::rand_core::RngCore for Compat { + fn next_u32(&mut self) -> u32 { + self.0.next_u32() + } + + fn next_u64(&mut self) -> u64 { + self.0.next_u64() + } + + fn fill_bytes(&mut self, dest: &mut [u8]) { + self.0.fill_bytes(dest) + } + + fn try_fill_bytes( + &mut self, + dest: &mut [u8], + ) -> Result<(), p256::elliptic_curve::rand_core::Error> { + self.0.fill_bytes(dest); + Ok(()) + } + } + + impl p256::elliptic_curve::rand_core::CryptoRng for Compat {} + #[fixture] #[once] fn secp256k1_pair() -> (Box, Box) { - let signing_key = k256::ecdsa::SigningKey::random(&mut rand::rng().compat()); + let signing_key = k256::ecdsa::SigningKey::random(&mut Compat(rand::rng())); ( Box::new(Secp256k1Signer::new(&signing_key.to_bytes()).unwrap()), Box::new(Secp256k1Verifier {}), @@ -542,7 +570,7 @@ mod test { #[fixture] #[once] fn secp256r1_pair() -> (Box, Box) { - let signing_key = p256::ecdsa::SigningKey::random(&mut rand::rng().compat()); + let signing_key = p256::ecdsa::SigningKey::random(&mut Compat(rand::rng())); ( Box::new(Secp256r1Signer::new(&signing_key.to_bytes()).unwrap()), Box::new(Secp256r1Verifier {}), @@ -552,7 +580,7 @@ mod test { #[fixture] #[once] fn secp256k1eth_pair() -> (Box, Box) { - let signing_key = k256::ecdsa::SigningKey::random(&mut rand::rng().compat()); + let signing_key = k256::ecdsa::SigningKey::random(&mut Compat(rand::rng())); ( Box::new(Secp256k1EthSigner::new(&signing_key.to_bytes()).unwrap()), Box::new(Secp256k1EthVerifier {}), diff --git a/crates/attestation/tests/api.rs b/crates/attestation/tests/api.rs index 08eab4d474..44bdebf622 100644 --- a/crates/attestation/tests/api.rs +++ b/crates/attestation/tests/api.rs @@ -1,4 +1,4 @@ -use rand::{Rng, SeedableRng, rngs::StdRng}; +use rand::{RngExt, SeedableRng, rngs::StdRng}; use rangeset::set::RangeSet; use tlsn_attestation::{ Attestation, AttestationConfig, CryptoProvider, diff --git a/crates/attestation/tests/fixtures/generate_presentation_fixture.rs b/crates/attestation/tests/fixtures/generate_presentation_fixture.rs index e4d85aaca7..1b5e584a68 100755 --- a/crates/attestation/tests/fixtures/generate_presentation_fixture.rs +++ b/crates/attestation/tests/fixtures/generate_presentation_fixture.rs @@ -25,7 +25,7 @@ tlsn-data-fixtures = { path = "../../../data-fixtures" } use std::fs; -use rand::{Rng, SeedableRng, rngs::StdRng}; +use rand::{RngExt, SeedableRng, rngs::StdRng}; use tlsn_attestation::{ Attestation, AttestationConfig, CryptoProvider, request::{Request, RequestConfig}, diff --git a/crates/components/hmac-sha256/src/lib.rs b/crates/components/hmac-sha256/src/lib.rs index 2f335c26c0..8a230be32b 100644 --- a/crates/components/hmac-sha256/src/lib.rs +++ b/crates/components/hmac-sha256/src/lib.rs @@ -81,7 +81,7 @@ mod tests { Execute, memory::{Array, MemoryExt, ViewExt, binary::U8}, }; - use rand::{Rng, SeedableRng, rngs::StdRng}; + use rand::{RngExt, SeedableRng, rngs::StdRng}; #[tokio::test] async fn test_prf_reduced() { diff --git a/crates/components/hmac-sha256/src/prf/function.rs b/crates/components/hmac-sha256/src/prf/function.rs index c86b6f4777..5bfaa1a488 100644 --- a/crates/components/hmac-sha256/src/prf/function.rs +++ b/crates/components/hmac-sha256/src/prf/function.rs @@ -160,7 +160,7 @@ mod tests { Execute, memory::{Array, MemoryExt, ViewExt, binary::U8}, }; - use rand::{Rng, rngs::ThreadRng}; + use rand::{RngExt, rngs::ThreadRng}; const IPAD: [u8; 64] = [0x36; 64]; const OPAD: [u8; 64] = [0x5c; 64]; diff --git a/crates/components/hmac-sha256/src/test_utils.rs b/crates/components/hmac-sha256/src/test_utils.rs index 6885e553a1..2daf7f8451 100644 --- a/crates/components/hmac-sha256/src/test_utils.rs +++ b/crates/components/hmac-sha256/src/test_utils.rs @@ -1,5 +1,5 @@ use crate::{sha256, state_to_bytes}; -use rand::{Rng, SeedableRng, rngs::StdRng}; +use rand::{RngExt, SeedableRng, rngs::StdRng}; pub(crate) const SHA256_IV: [u32; 8] = [ 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19, diff --git a/crates/components/key-exchange/Cargo.toml b/crates/components/key-exchange/Cargo.toml index 47114f666d..0c738e3f11 100644 --- a/crates/components/key-exchange/Cargo.toml +++ b/crates/components/key-exchange/Cargo.toml @@ -34,7 +34,6 @@ serio = { workspace = true } derive_builder = { workspace = true } tracing = { workspace = true } rand = { workspace = true } -rand06-compat = { workspace = true } tokio = { workspace = true, features = ["sync"] } [dev-dependencies] diff --git a/crates/components/key-exchange/src/exchange.rs b/crates/components/key-exchange/src/exchange.rs index 7ff26bff12..f9d5a64035 100644 --- a/crates/components/key-exchange/src/exchange.rs +++ b/crates/components/key-exchange/src/exchange.rs @@ -4,7 +4,6 @@ use std::{fmt::Debug, sync::Arc}; use async_trait::async_trait; use p256::{EncodedPoint, PublicKey, SecretKey}; -use rand06_compat::Rand0_6CompatExt; use serio::{sink::SinkExt, stream::IoStreamExt}; use tokio::sync::Mutex; use tracing::instrument; @@ -24,6 +23,38 @@ use crate::{ point_addition::derive_x_coord_share, }; +/// Bridges a `rand_core` 0.10 RNG to the `rand_core` 0.6 interface required by +/// `p256` (`SecretKey::random`, `NonZeroScalar::random`, ...). Replaces the +/// `rand06-compat` crate, which only bridges `rand_core` 0.6 <-> 0.9. +/// +/// A single impl covers both an owned RNG and a `&mut` borrow, since +/// `rand_core` 0.10 blanket-implements `Rng` for `&mut R`. +struct Compat(R); + +impl p256::elliptic_curve::rand_core::RngCore for Compat { + fn next_u32(&mut self) -> u32 { + self.0.next_u32() + } + + fn next_u64(&mut self) -> u64 { + self.0.next_u64() + } + + fn fill_bytes(&mut self, dest: &mut [u8]) { + self.0.fill_bytes(dest) + } + + fn try_fill_bytes( + &mut self, + dest: &mut [u8], + ) -> Result<(), p256::elliptic_curve::rand_core::Error> { + self.0.fill_bytes(dest); + Ok(()) + } +} + +impl p256::elliptic_curve::rand_core::CryptoRng for Compat {} + /// NIST P-256 prime big-endian. static P: [u8; 32] = [ 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -98,7 +129,7 @@ impl MpcKeyExchange { /// * `converter_0` - Share conversion protocol instance 0. /// * `converter_1` - Share conversion protocol instance 1. pub fn new(role: Role, converter_0: C0, converter_1: C1) -> Self { - let private_key = SecretKey::random(&mut rand::rng().compat()); + let private_key = SecretKey::random(&mut Compat(rand::rng())); Self { converter_0: Arc::new(Mutex::new(converter_0)), @@ -490,7 +521,7 @@ mod tests { #[tokio::test] async fn test_key_exchange() { - let mut rng = StdRng::seed_from_u64(0).compat(); + let mut rng = Compat(StdRng::seed_from_u64(0)); let (mut ctx_a, mut ctx_b) = test_st_context(8); let mut gen_vm = IdealVm::new(); let mut ev = IdealVm::new(); @@ -563,7 +594,7 @@ mod tests { #[tokio::test] async fn test_compute_ec_shares() { - let mut rng = StdRng::seed_from_u64(0).compat(); + let mut rng = Compat(StdRng::seed_from_u64(0)); let (mut ctx_leader, mut ctx_follower) = test_st_context(8); let (leader_converter_0, follower_converter_0) = ideal_share_convert(Block::ZERO); let (follower_converter_1, leader_converter_1) = ideal_share_convert(Block::ZERO); @@ -637,10 +668,10 @@ mod tests { let mut gen_vm = IdealVm::new(); let mut ev = IdealVm::new(); - let leader_private_key = SecretKey::random(&mut rng.compat_by_ref()); - let follower_private_key = SecretKey::random(&mut rng.compat_by_ref()); + let leader_private_key = SecretKey::random(&mut Compat(&mut rng)); + let follower_private_key = SecretKey::random(&mut Compat(&mut rng)); let server_public_key = - PublicKey::from_secret_scalar(&NonZeroScalar::random(&mut rng.compat_by_ref())); + PublicKey::from_secret_scalar(&NonZeroScalar::random(&mut Compat(&mut rng))); let expected_client_public_key = PublicKey::from_affine( (leader_private_key.public_key().to_projective() + follower_private_key.public_key().to_projective()) diff --git a/crates/components/key-exchange/src/point_addition.rs b/crates/components/key-exchange/src/point_addition.rs index 2efda241e8..cfd978693f 100644 --- a/crates/components/key-exchange/src/point_addition.rs +++ b/crates/components/key-exchange/src/point_addition.rs @@ -106,7 +106,7 @@ mod tests { EncodedPoint, NonZeroScalar, ProjectivePoint, PublicKey, elliptic_curve::sec1::{FromEncodedPoint, ToEncodedPoint}, }; - use rand::{Rng, SeedableRng, rngs::StdRng}; + use rand::{RngExt, SeedableRng, rngs::StdRng}; #[tokio::test] async fn test_point_addition() { diff --git a/crates/core/src/fixtures/transcript.rs b/crates/core/src/fixtures/transcript.rs index 299be93d84..178c819633 100644 --- a/crates/core/src/fixtures/transcript.rs +++ b/crates/core/src/fixtures/transcript.rs @@ -4,7 +4,7 @@ use aead::Payload as AeadPayload; use aes_gcm::{Aes128Gcm, NewAead, aead::Aead}; #[allow(deprecated)] use generic_array::GenericArray; -use rand::{Rng, SeedableRng, rngs::StdRng}; +use rand::{RngExt, SeedableRng, rngs::StdRng}; use tls_core::msgs::{ base::Payload, codec::Codec, diff --git a/crates/core/src/hash.rs b/crates/core/src/hash.rs index d43dc2d6c6..2572ccbcb0 100644 --- a/crates/core/src/hash.rs +++ b/crates/core/src/hash.rs @@ -254,7 +254,7 @@ impl Blinder { impl Distribution for StandardUniform { fn sample(&self, rng: &mut R) -> Blinder { let mut blinder = [0; 16]; - rng.fill(&mut blinder); + rng.fill_bytes(&mut blinder); Blinder(blinder) } } diff --git a/crates/core/src/transcript/proof.rs b/crates/core/src/transcript/proof.rs index a3a949ddc0..e5add370f1 100644 --- a/crates/core/src/transcript/proof.rs +++ b/crates/core/src/transcript/proof.rs @@ -493,7 +493,7 @@ impl fmt::Display for TranscriptProofBuilderError { #[allow(clippy::single_range_in_vec_init)] #[cfg(test)] mod tests { - use rand::{Rng, SeedableRng}; + use rand::{RngExt, SeedableRng}; use rangeset::prelude::*; use rstest::rstest; use tlsn_data_fixtures::http::{request::GET_WITH_HEADER, response::OK_JSON}; @@ -692,7 +692,7 @@ mod tests { #[case] reveal_recv_rangeset: RangeSet, #[case] success: bool, ) { - use rand::{Rng, SeedableRng}; + use rand::{RngExt, SeedableRng}; let mut rng = rand::rngs::StdRng::seed_from_u64(0); let transcript = Transcript::new(GET_WITH_HEADER, OK_JSON); @@ -763,7 +763,7 @@ mod tests { #[case] uncovered_sent_rangeset: RangeSet, #[case] uncovered_recv_rangeset: RangeSet, ) { - use rand::{Rng, SeedableRng}; + use rand::{RngExt, SeedableRng}; let mut rng = rand::rngs::StdRng::seed_from_u64(0); let transcript = Transcript::new(GET_WITH_HEADER, OK_JSON); diff --git a/crates/mpc-tls/src/decode.rs b/crates/mpc-tls/src/decode.rs index 5505140b6c..7d948d8a4c 100644 --- a/crates/mpc-tls/src/decode.rs +++ b/crates/mpc-tls/src/decode.rs @@ -13,7 +13,7 @@ use mpz_memory_core::{ }; use mpz_vm_core::{Vm, VmError, prelude::*}; use pin_project_lite::pin_project; -use rand::Rng; +use rand::RngExt; pin_project! { /// Supports decoding into additive shares. diff --git a/crates/mpc-tls/src/record_layer.rs b/crates/mpc-tls/src/record_layer.rs index 1f94b12d10..34fe295bc8 100644 --- a/crates/mpc-tls/src/record_layer.rs +++ b/crates/mpc-tls/src/record_layer.rs @@ -15,7 +15,7 @@ use mpz_memory_core::{ binary::{Binary, U8}, }; use mpz_vm_core::Vm as VmTrait; -use rand::RngCore; +use rand::Rng; use serde::{Deserialize, Serialize}; use tls_core::{ cipher::make_tls12_aad, diff --git a/crates/mpc-tls/src/record_layer/aead/ghash.rs b/crates/mpc-tls/src/record_layer/aead/ghash.rs index bb6af5c6cf..236cd2c246 100644 --- a/crates/mpc-tls/src/record_layer/aead/ghash.rs +++ b/crates/mpc-tls/src/record_layer/aead/ghash.rs @@ -346,7 +346,7 @@ mod tests { use mpz_share_conversion::ideal::{ IdealShareConvertReceiver, IdealShareConvertSender, ideal_share_convert, }; - use rand::{Rng, SeedableRng, rngs::StdRng}; + use rand::{RngExt, SeedableRng, rngs::StdRng}; fn create_pair() -> ( MpcGhash>, diff --git a/crates/mpc-tls/src/record_layer/aes_gcm.rs b/crates/mpc-tls/src/record_layer/aes_gcm.rs index f50796e525..3716a75b47 100644 --- a/crates/mpc-tls/src/record_layer/aes_gcm.rs +++ b/crates/mpc-tls/src/record_layer/aes_gcm.rs @@ -5,7 +5,7 @@ use mpz_memory_core::{ binary::{Binary, U8}, }; use mpz_vm_core::{Vm, prelude::*}; -use rand::RngCore; +use rand::Rng; use crate::{MpcTlsError, Role}; diff --git a/crates/tls/client/src/backend/standard.rs b/crates/tls/client/src/backend/standard.rs index f3b00a7714..ced95edc24 100644 --- a/crates/tls/client/src/backend/standard.rs +++ b/crates/tls/client/src/backend/standard.rs @@ -7,10 +7,10 @@ use aes_gcm::{ }; use async_trait::async_trait; use p256::{ecdh::EphemeralSecret, EncodedPoint, PublicKey as ECDHPublicKey}; -use rand::{rng, rngs::OsRng, Rng}; +use rand::{rng, RngExt}; +use crate::rand_compat::Compat; use digest::Digest; -use rand06_compat::Rand0_6CompatExt; use std::{any::Any, collections::VecDeque, convert::TryInto, mem::take}; use tls_core::{ cert::ServerCertDetails, @@ -288,7 +288,7 @@ impl Backend for RustCryptoBackend { async fn get_client_key_share(&mut self) -> Result { // TODO make sure this and other methods are not called twice/out of order // generate our ECDH keypair - let sk = EphemeralSecret::random(&mut rng().compat()); + let sk = EphemeralSecret::random(&mut Compat(rng())); let pk_bytes = EncodedPoint::from(sk.public_key()).to_bytes().to_vec(); self.ecdh_pubkey = Some(pk_bytes.clone()); self.ecdh_secret = Some(sk); diff --git a/crates/tls/client/src/crypto/standard.rs b/crates/tls/client/src/crypto/standard.rs index a351708ba8..c41a7f8bd7 100644 --- a/crates/tls/client/src/crypto/standard.rs +++ b/crates/tls/client/src/crypto/standard.rs @@ -5,8 +5,9 @@ use aes_gcm::aead::{generic_array::GenericArray, Aead, NewAead, Payload}; use aes_gcm::Aes128Gcm; use async_trait::async_trait; use p256::{ecdh::EphemeralSecret, EncodedPoint, PublicKey as ECDHPublicKey}; -use rand::rngs::OsRng; -use rand::{thread_rng, Rng}; +use rand::{rng, RngExt}; + +use crate::rand_compat::Compat; use tls_core::key::PublicKey; use tls_core::msgs::base::Payload as TLSPayload; @@ -330,7 +331,7 @@ impl Crypto for StandardCrypto { } async fn client_random(&mut self) -> Result { // generate client random and store it - let r = Random(thread_rng().gen()); + let r = Random(rng().random()); self.client_random = Some(r); println!("IN client_random {:?}", self.client_random); Ok(r) @@ -339,7 +340,7 @@ impl Crypto for StandardCrypto { // TODO make sure this and other methods are not called twice/out of order println!("IN client_key_share"); // generate our ECDH keypair - let sk = EphemeralSecret::random(&mut OsRng); + let sk = EphemeralSecret::random(&mut Compat(rng())); let pk_bytes = EncodedPoint::from(sk.public_key()).to_bytes().to_vec(); self.ecdh_pubkey = Some(pk_bytes.clone()); self.ecdh_secret = Some(sk); @@ -501,7 +502,7 @@ impl Crypto for StandardCrypto { explicit_nonce = [0, 0, 0, 0, 0, 0, 0, 1]; } ContentType::ApplicationData => { - explicit_nonce = thread_rng().gen(); + explicit_nonce = rng().random(); } _ => { return Err(Error::General( diff --git a/crates/tls/client/src/lib.rs b/crates/tls/client/src/lib.rs index 389995b7dc..93af81b8c8 100644 --- a/crates/tls/client/src/lib.rs +++ b/crates/tls/client/src/lib.rs @@ -302,6 +302,7 @@ mod error; mod hash_hs; mod limited_cache; mod rand; +mod rand_compat; mod record_layer; //mod stream; mod vecbuf; diff --git a/crates/tls/client/src/rand_compat.rs b/crates/tls/client/src/rand_compat.rs new file mode 100644 index 0000000000..56e44ff083 --- /dev/null +++ b/crates/tls/client/src/rand_compat.rs @@ -0,0 +1,33 @@ +//! Bridges a `rand_core` 0.10 RNG to the `rand_core` 0.6 interface required by +//! `p256` (`EphemeralSecret::random`, ...). Replaces the `rand06-compat` crate, +//! which only bridges `rand_core` 0.6 <-> 0.9. +//! +//! A single impl covers both an owned RNG and a `&mut` borrow, since +//! `rand_core` 0.10 blanket-implements `Rng` for `&mut R`. + +/// Wraps a `rand_core` 0.10 RNG, exposing the `rand_core` 0.6 traits. +pub(crate) struct Compat(pub(crate) R); + +impl p256::elliptic_curve::rand_core::RngCore for Compat { + fn next_u32(&mut self) -> u32 { + self.0.next_u32() + } + + fn next_u64(&mut self) -> u64 { + self.0.next_u64() + } + + fn fill_bytes(&mut self, dest: &mut [u8]) { + self.0.fill_bytes(dest) + } + + fn try_fill_bytes( + &mut self, + dest: &mut [u8], + ) -> Result<(), p256::elliptic_curve::rand_core::Error> { + self.0.fill_bytes(dest); + Ok(()) + } +} + +impl p256::elliptic_curve::rand_core::CryptoRng for Compat {} diff --git a/crates/tls/core/src/rand.rs b/crates/tls/core/src/rand.rs index effef01139..3ae62367b6 100644 --- a/crates/tls/core/src/rand.rs +++ b/crates/tls/core/src/rand.rs @@ -3,7 +3,7 @@ use rand::{rng, Rng}; /// Fill the whole slice with random material. pub fn fill_random(bytes: &mut [u8]) -> Result<(), Error> { - rng().fill(bytes); + rng().fill_bytes(bytes); Ok(()) } diff --git a/crates/tlsn/src/deps/prover.rs b/crates/tlsn/src/deps/prover.rs index d45e9b53e3..02eea1fcb5 100644 --- a/crates/tlsn/src/deps/prover.rs +++ b/crates/tlsn/src/deps/prover.rs @@ -27,7 +27,7 @@ cfg_select! { use mpz_garble::protocol::semihonest::Garbler; use mpz_ot::cot::DerandCOTSender; use mpz_zk::Prover; - use rand::Rng; + use rand::RngExt; pub(crate) type ProverMpc = Garbler, Block>>>; diff --git a/crates/tlsn/src/session.rs b/crates/tlsn/src/session.rs index 241ca8c3d2..0e75f63938 100644 --- a/crates/tlsn/src/session.rs +++ b/crates/tlsn/src/session.rs @@ -9,7 +9,7 @@ use std::{ }; use futures::{AsyncRead, AsyncWrite}; -use mpz_common::{Executor, io::Io, mux::Mux}; +use mpz_common::{Session as MpzSession, ThreadPool, io::Io, mux::Mux}; use tlsn_core::config::{prover::ProverConfig, verifier::VerifierConfig}; use tlsn_mux::{Connection, Handle}; @@ -37,7 +37,7 @@ use crate::{ #[must_use = "session must be polled continuously to make progress, including during closing."] pub struct Session { conn: Option>, - executor: Executor, + executor: MpzSession, handle: Handle, } @@ -243,7 +243,7 @@ where /// /// Used to create provers/verifiers and control the session lifecycle. pub struct SessionHandle { - executor: Executor, + executor: MpzSession, should_close: Arc, waker: Arc>>, handle: Handle, @@ -309,21 +309,26 @@ impl Mux for MuxHandle { } } -/// Builds a work-stealing executor with the given muxer. -fn build_executor(mux: MuxHandle) -> Executor { +/// Builds a session backed by a thread pool with the given muxer. +fn build_executor(mux: MuxHandle) -> MpzSession { #[cfg(all(feature = "web", target_arch = "wasm32"))] let cores = web_spawn::available_parallelism().map(|n| n.get()); #[cfg(not(all(feature = "web", target_arch = "wasm32")))] let cores = std::thread::available_parallelism().map(|n| n.get()); - let builder = Executor::builder().num_threads(cores.unwrap_or(8)); + let pool_builder = ThreadPool::builder().num_threads(cores.unwrap_or(8)); #[cfg(all(feature = "web", target_arch = "wasm32"))] - let builder = builder.spawn(|f| { + let pool_builder = pool_builder.spawn(|f| { let _ = web_spawn::spawn(f); Ok(()) }); - builder.build(mux) + let pool = pool_builder.build().expect("thread pool should build"); + + MpzSession::builder() + .pool(pool) + .build(mux) + .expect("session should build") } diff --git a/crates/tlsn/src/transcript_internal/auth.rs b/crates/tlsn/src/transcript_internal/auth.rs index 53777fea12..6627c4a79c 100644 --- a/crates/tlsn/src/transcript_internal/auth.rs +++ b/crates/tlsn/src/transcript_internal/auth.rs @@ -474,7 +474,7 @@ mod tests { use mpz_common::context::test_st_context; use mpz_ideal_vm::IdealVm; use mpz_vm_core::prelude::*; - use rand::{Rng, SeedableRng, rngs::StdRng}; + use rand::{RngExt, SeedableRng, rngs::StdRng}; use rstest::*; use std::ops::Range; From 1077ecf424118f0715792efa5f903a4831bf9986 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 2 Jun 2026 12:19:00 +0200 Subject: [PATCH 2/7] fix(wasm): enable getrandom 0.4 wasm_js feature for rand 0.10 rand 0.10 (via mpz) pulls getrandom 0.4, whose wasm backend is gated behind the wasm_js crate feature rather than the getrandom_backend cfg that .cargo/config.toml sets for getrandom 0.3. Add a renamed getrandom_04 dependency on the wasm target to enable it, mirroring the existing getrandom_03 entry. --- Cargo.lock | 3 +++ crates/wasm/Cargo.toml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index da47e122e2..f397e92416 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2781,11 +2781,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 6.0.0", "rand_core 0.10.1", "wasip2", "wasip3", + "wasm-bindgen", ] [[package]] @@ -6475,6 +6477,7 @@ dependencies = [ "futures", "getrandom 0.2.17", "getrandom 0.3.4", + "getrandom 0.4.2", "js-sys", "parking_lot", "rayon", diff --git a/crates/wasm/Cargo.toml b/crates/wasm/Cargo.toml index 0df70da135..60c4f84dc3 100644 --- a/crates/wasm/Cargo.toml +++ b/crates/wasm/Cargo.toml @@ -43,6 +43,11 @@ getrandom = { version = "0.2", features = ["js"] } getrandom_03 = { package = "getrandom", version = "0.3", features = [ "wasm_js", ] } +# rand 0.10 (pulled via mpz) depends on getrandom 0.4, whose wasm backend is a +# crate feature rather than the `getrandom_backend` cfg used by 0.3. +getrandom_04 = { package = "getrandom", version = "0.4", features = [ + "wasm_js", +] } rustls-pki-types = { workspace = true, features = ["web"] } # web-spawn 0.2.1 uses `web_sys::Worker` without enabling the `Worker` feature. # Enabled here so feature unification activates it across the graph. From b0a16f31c4b53c284324d1bcccca0ee7dca11039 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 2 Jun 2026 12:26:01 +0200 Subject: [PATCH 3/7] chore: drop unused rand06-compat dependency All rand06-compat usages were replaced by the local Compat adapter (rand_core 0.10 -> 0.6 bridge), so the crate is no longer referenced. Removing it also drops one consumer of rand_core 0.9. --- Cargo.lock | 12 ------------ Cargo.toml | 1 - crates/attestation/Cargo.toml | 1 - crates/tls/client/Cargo.toml | 1 - 4 files changed, 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f397e92416..4fc3db1576 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4620,16 +4620,6 @@ dependencies = [ "rand_core 0.10.1", ] -[[package]] -name = "rand06-compat" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0372da64e922a0b6979b115eb60d3c4ca7b2ef2b7565f039e3c6ee13bf6d5d38" -dependencies = [ - "rand_core 0.6.4", - "rand_core 0.9.5", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -6044,7 +6034,6 @@ dependencies = [ "opaque-debug", "p256", "rand 0.10.1", - "rand06-compat", "rangeset", "rstest", "serde", @@ -6434,7 +6423,6 @@ dependencies = [ "mpz-common", "p256", "rand 0.10.1", - "rand06-compat", "ring 0.17.14", "rustls 0.20.9", "rustls-pemfile", diff --git a/Cargo.toml b/Cargo.toml index 85cd4df89f..abf4eb84bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -140,7 +140,6 @@ pollster = { version = "0.4" } rand = { version = "0.10" } rand_chacha = { version = "0.10" } rand_core = { version = "0.10" } -rand06-compat = { version = "0.1" } rayon = { version = "1.10" } regex = { version = "1.10" } ring = { version = "0.17" } diff --git a/crates/attestation/Cargo.toml b/crates/attestation/Cargo.toml index e9776f6ec9..5d7b68f43a 100644 --- a/crates/attestation/Cargo.toml +++ b/crates/attestation/Cargo.toml @@ -27,7 +27,6 @@ bincode = { workspace = true } alloy-primitives = { version = "1.3.1", default-features = false } alloy-signer = { version = "1.0", default-features = false } alloy-signer-local = { version = "1.0", default-features = false } -rand06-compat = { workspace = true } rangeset = { workspace = true } rstest = { workspace = true } tlsn-core = { workspace = true, features = ["fixtures"] } diff --git a/crates/tls/client/Cargo.toml b/crates/tls/client/Cargo.toml index 42067a02bb..e5f03fac71 100644 --- a/crates/tls/client/Cargo.toml +++ b/crates/tls/client/Cargo.toml @@ -30,7 +30,6 @@ rustls-webpki = { workspace = true } aes-gcm = { workspace = true } p256 = { workspace = true, features = ["ecdh"] } rand = { workspace = true } -rand06-compat = { workspace = true } hmac = { workspace = true } sha2 = { workspace = true, features = ["compress"] } digest = { workspace = true } From cf720c8e314649aa7cf56631e5d897069ae30251 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 2 Jun 2026 22:50:07 +0200 Subject: [PATCH 4/7] refactor: use rand06-compat from tlsn-utils #107 instead of local adapters tlsn-utils#107 updates rand06-compat to bridge rand_core 0.6 <-> 0.10 (it previously only did 0.6 <-> 0.9) and bumps tlsn-mux to rand 0.10. - Bump tlsn-utils deps (mux/futures-plex/spansy/websocket-relay) to the #107 head SHA 6060113. - Delete the three local Compat adapters (key-exchange, tls-client, attestation) and the tls-client rand_compat module; restore the upstream .compat() / Rand0_6CompatExt usage. - Drop the getrandom_03 wasm dependency: tlsn-mux now uses rand 0.10, so getrandom 0.3 is no longer pulled into the wasm crate. getrandom in the wasm closure is down from three versions to two (0.2 EC stack, 0.4 rand). TEMPORARY (revert before merge): tlsn-utils deps pinned to the #107 branch SHA; re-pin to a tagged rev once #107 merges. All workspace unit tests and the tlsn MPC integration tests pass. --- Cargo.lock | 47 ++++++++++++------- Cargo.toml | 9 ++-- crates/attestation/Cargo.toml | 1 + crates/attestation/src/signing.rs | 36 ++------------ crates/components/key-exchange/Cargo.toml | 1 + .../components/key-exchange/src/exchange.rs | 45 +++--------------- crates/tls/client/Cargo.toml | 1 + crates/tls/client/src/backend/standard.rs | 4 +- crates/tls/client/src/crypto/standard.rs | 5 +- crates/tls/client/src/lib.rs | 1 - crates/tls/client/src/rand_compat.rs | 33 ------------- crates/wasm/Cargo.toml | 5 +- 12 files changed, 53 insertions(+), 135 deletions(-) delete mode 100644 crates/tls/client/src/rand_compat.rs diff --git a/Cargo.lock b/Cargo.lock index 4fc3db1576..ae991ca6f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -535,7 +535,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -546,7 +546,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -2509,7 +2509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2679,7 +2679,7 @@ dependencies = [ [[package]] name = "futures-plex" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=64722f7#64722f7de999cbd41c0cab7312dade306d50ea5f" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" dependencies = [ "futures", ] @@ -3354,7 +3354,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4044,7 +4044,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4159,7 +4159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -4620,6 +4620,15 @@ dependencies = [ "rand_core 0.10.1", ] +[[package]] +name = "rand06-compat" +version = "0.1.0" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" +dependencies = [ + "rand_core 0.10.1", + "rand_core 0.6.4", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -5005,7 +5014,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5575,7 +5584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -5599,14 +5608,14 @@ dependencies = [ [[package]] name = "spansy" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=64722f7#64722f7de999cbd41c0cab7312dade306d50ea5f" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" dependencies = [ "bytes", "httparse", "pest", "pest_derive", "rangeset", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -5800,10 +5809,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.2", + "getrandom 0.3.4", "once_cell", "rustix 1.1.4", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6034,6 +6043,7 @@ dependencies = [ "opaque-debug", "p256", "rand 0.10.1", + "rand06-compat", "rangeset", "rstest", "serde", @@ -6282,6 +6292,7 @@ dependencies = [ "mpz-vm-core", "p256", "rand 0.10.1", + "rand06-compat", "rand_core 0.10.1", "rstest", "serio", @@ -6342,7 +6353,7 @@ dependencies = [ [[package]] name = "tlsn-mux" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=64722f7#64722f7de999cbd41c0cab7312dade306d50ea5f" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" dependencies = [ "blake3", "futures", @@ -6350,7 +6361,7 @@ dependencies = [ "nohash-hasher", "parking_lot", "pin-project", - "rand 0.9.4", + "rand 0.10.1", "static_assertions", "web-time 1.1.0", ] @@ -6423,6 +6434,7 @@ dependencies = [ "mpz-common", "p256", "rand 0.10.1", + "rand06-compat", "ring 0.17.14", "rustls 0.20.9", "rustls-pemfile", @@ -6464,7 +6476,6 @@ dependencies = [ "console_error_panic_hook", "futures", "getrandom 0.2.17", - "getrandom 0.3.4", "getrandom 0.4.2", "js-sys", "parking_lot", @@ -7219,7 +7230,7 @@ dependencies = [ [[package]] name = "websocket-relay" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=64722f7#64722f7de999cbd41c0cab7312dade306d50ea5f" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" dependencies = [ "anyhow", "form_urlencoded", @@ -7274,7 +7285,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index abf4eb84bf..e2cbf45f36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ tlsn-formats = { path = "crates/formats" } tlsn-hmac-sha256 = { path = "crates/components/hmac-sha256" } tlsn-key-exchange = { path = "crates/components/key-exchange" } tlsn-mpc-tls = { path = "crates/mpc-tls" } -tlsn-mux = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "64722f7" } +tlsn-mux = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } tlsn-server-fixture = { path = "crates/server-fixture/server" } tlsn-server-fixture-certs = { path = "crates/server-fixture/certs" } tlsn-tls-client = { path = "crates/tls/client" } @@ -87,11 +87,11 @@ mpz-zk = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec55 mpz-hash = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf", default-features = false } mpz-ideal-vm = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } -futures-plex = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "64722f7" } +futures-plex = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } rangeset = { version = "0.4" } serio = { version = "0.2" } -spansy = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "64722f7" } -websocket-relay = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "64722f7" } +spansy = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } +websocket-relay = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } aead = { version = "0.4" } aes = { version = "0.8" } @@ -140,6 +140,7 @@ pollster = { version = "0.4" } rand = { version = "0.10" } rand_chacha = { version = "0.10" } rand_core = { version = "0.10" } +rand06-compat = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } rayon = { version = "1.10" } regex = { version = "1.10" } ring = { version = "0.17" } diff --git a/crates/attestation/Cargo.toml b/crates/attestation/Cargo.toml index 5d7b68f43a..4bb61383af 100644 --- a/crates/attestation/Cargo.toml +++ b/crates/attestation/Cargo.toml @@ -18,6 +18,7 @@ p256 = { workspace = true, features = ["serde"] } k256 = { workspace = true } opaque-debug = { workspace = true } rand = { workspace = true } +rand06-compat = { workspace = true } serde = { workspace = true, features = ["derive"] } thiserror = { workspace = true } tiny-keccak = { workspace = true, features = ["keccak"] } diff --git a/crates/attestation/src/signing.rs b/crates/attestation/src/signing.rs index 37077186e7..61a76e6103 100644 --- a/crates/attestation/src/signing.rs +++ b/crates/attestation/src/signing.rs @@ -524,43 +524,15 @@ mod test { use alloy_primitives::utils::eip191_message; use alloy_signer::SignerSync; use alloy_signer_local::PrivateKeySigner; + use rand06_compat::Rand0_6CompatExt; use rstest::{fixture, rstest}; use super::*; - /// Bridges a `rand_core` 0.10 RNG to the `rand_core` 0.6 interface required - /// by `k256`/`p256` `SigningKey::random`. Replaces `rand06-compat`, which - /// only bridges `rand_core` 0.6 <-> 0.9. - struct Compat(R); - - impl p256::elliptic_curve::rand_core::RngCore for Compat { - fn next_u32(&mut self) -> u32 { - self.0.next_u32() - } - - fn next_u64(&mut self) -> u64 { - self.0.next_u64() - } - - fn fill_bytes(&mut self, dest: &mut [u8]) { - self.0.fill_bytes(dest) - } - - fn try_fill_bytes( - &mut self, - dest: &mut [u8], - ) -> Result<(), p256::elliptic_curve::rand_core::Error> { - self.0.fill_bytes(dest); - Ok(()) - } - } - - impl p256::elliptic_curve::rand_core::CryptoRng for Compat {} - #[fixture] #[once] fn secp256k1_pair() -> (Box, Box) { - let signing_key = k256::ecdsa::SigningKey::random(&mut Compat(rand::rng())); + let signing_key = k256::ecdsa::SigningKey::random(&mut rand::rng().compat()); ( Box::new(Secp256k1Signer::new(&signing_key.to_bytes()).unwrap()), Box::new(Secp256k1Verifier {}), @@ -570,7 +542,7 @@ mod test { #[fixture] #[once] fn secp256r1_pair() -> (Box, Box) { - let signing_key = p256::ecdsa::SigningKey::random(&mut Compat(rand::rng())); + let signing_key = p256::ecdsa::SigningKey::random(&mut rand::rng().compat()); ( Box::new(Secp256r1Signer::new(&signing_key.to_bytes()).unwrap()), Box::new(Secp256r1Verifier {}), @@ -580,7 +552,7 @@ mod test { #[fixture] #[once] fn secp256k1eth_pair() -> (Box, Box) { - let signing_key = k256::ecdsa::SigningKey::random(&mut Compat(rand::rng())); + let signing_key = k256::ecdsa::SigningKey::random(&mut rand::rng().compat()); ( Box::new(Secp256k1EthSigner::new(&signing_key.to_bytes()).unwrap()), Box::new(Secp256k1EthVerifier {}), diff --git a/crates/components/key-exchange/Cargo.toml b/crates/components/key-exchange/Cargo.toml index 0c738e3f11..47114f666d 100644 --- a/crates/components/key-exchange/Cargo.toml +++ b/crates/components/key-exchange/Cargo.toml @@ -34,6 +34,7 @@ serio = { workspace = true } derive_builder = { workspace = true } tracing = { workspace = true } rand = { workspace = true } +rand06-compat = { workspace = true } tokio = { workspace = true, features = ["sync"] } [dev-dependencies] diff --git a/crates/components/key-exchange/src/exchange.rs b/crates/components/key-exchange/src/exchange.rs index f9d5a64035..7ff26bff12 100644 --- a/crates/components/key-exchange/src/exchange.rs +++ b/crates/components/key-exchange/src/exchange.rs @@ -4,6 +4,7 @@ use std::{fmt::Debug, sync::Arc}; use async_trait::async_trait; use p256::{EncodedPoint, PublicKey, SecretKey}; +use rand06_compat::Rand0_6CompatExt; use serio::{sink::SinkExt, stream::IoStreamExt}; use tokio::sync::Mutex; use tracing::instrument; @@ -23,38 +24,6 @@ use crate::{ point_addition::derive_x_coord_share, }; -/// Bridges a `rand_core` 0.10 RNG to the `rand_core` 0.6 interface required by -/// `p256` (`SecretKey::random`, `NonZeroScalar::random`, ...). Replaces the -/// `rand06-compat` crate, which only bridges `rand_core` 0.6 <-> 0.9. -/// -/// A single impl covers both an owned RNG and a `&mut` borrow, since -/// `rand_core` 0.10 blanket-implements `Rng` for `&mut R`. -struct Compat(R); - -impl p256::elliptic_curve::rand_core::RngCore for Compat { - fn next_u32(&mut self) -> u32 { - self.0.next_u32() - } - - fn next_u64(&mut self) -> u64 { - self.0.next_u64() - } - - fn fill_bytes(&mut self, dest: &mut [u8]) { - self.0.fill_bytes(dest) - } - - fn try_fill_bytes( - &mut self, - dest: &mut [u8], - ) -> Result<(), p256::elliptic_curve::rand_core::Error> { - self.0.fill_bytes(dest); - Ok(()) - } -} - -impl p256::elliptic_curve::rand_core::CryptoRng for Compat {} - /// NIST P-256 prime big-endian. static P: [u8; 32] = [ 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -129,7 +98,7 @@ impl MpcKeyExchange { /// * `converter_0` - Share conversion protocol instance 0. /// * `converter_1` - Share conversion protocol instance 1. pub fn new(role: Role, converter_0: C0, converter_1: C1) -> Self { - let private_key = SecretKey::random(&mut Compat(rand::rng())); + let private_key = SecretKey::random(&mut rand::rng().compat()); Self { converter_0: Arc::new(Mutex::new(converter_0)), @@ -521,7 +490,7 @@ mod tests { #[tokio::test] async fn test_key_exchange() { - let mut rng = Compat(StdRng::seed_from_u64(0)); + let mut rng = StdRng::seed_from_u64(0).compat(); let (mut ctx_a, mut ctx_b) = test_st_context(8); let mut gen_vm = IdealVm::new(); let mut ev = IdealVm::new(); @@ -594,7 +563,7 @@ mod tests { #[tokio::test] async fn test_compute_ec_shares() { - let mut rng = Compat(StdRng::seed_from_u64(0)); + let mut rng = StdRng::seed_from_u64(0).compat(); let (mut ctx_leader, mut ctx_follower) = test_st_context(8); let (leader_converter_0, follower_converter_0) = ideal_share_convert(Block::ZERO); let (follower_converter_1, leader_converter_1) = ideal_share_convert(Block::ZERO); @@ -668,10 +637,10 @@ mod tests { let mut gen_vm = IdealVm::new(); let mut ev = IdealVm::new(); - let leader_private_key = SecretKey::random(&mut Compat(&mut rng)); - let follower_private_key = SecretKey::random(&mut Compat(&mut rng)); + let leader_private_key = SecretKey::random(&mut rng.compat_by_ref()); + let follower_private_key = SecretKey::random(&mut rng.compat_by_ref()); let server_public_key = - PublicKey::from_secret_scalar(&NonZeroScalar::random(&mut Compat(&mut rng))); + PublicKey::from_secret_scalar(&NonZeroScalar::random(&mut rng.compat_by_ref())); let expected_client_public_key = PublicKey::from_affine( (leader_private_key.public_key().to_projective() + follower_private_key.public_key().to_projective()) diff --git a/crates/tls/client/Cargo.toml b/crates/tls/client/Cargo.toml index e5f03fac71..42067a02bb 100644 --- a/crates/tls/client/Cargo.toml +++ b/crates/tls/client/Cargo.toml @@ -30,6 +30,7 @@ rustls-webpki = { workspace = true } aes-gcm = { workspace = true } p256 = { workspace = true, features = ["ecdh"] } rand = { workspace = true } +rand06-compat = { workspace = true } hmac = { workspace = true } sha2 = { workspace = true, features = ["compress"] } digest = { workspace = true } diff --git a/crates/tls/client/src/backend/standard.rs b/crates/tls/client/src/backend/standard.rs index ced95edc24..a7b243e7e1 100644 --- a/crates/tls/client/src/backend/standard.rs +++ b/crates/tls/client/src/backend/standard.rs @@ -9,8 +9,8 @@ use async_trait::async_trait; use p256::{ecdh::EphemeralSecret, EncodedPoint, PublicKey as ECDHPublicKey}; use rand::{rng, RngExt}; -use crate::rand_compat::Compat; use digest::Digest; +use rand06_compat::Rand0_6CompatExt; use std::{any::Any, collections::VecDeque, convert::TryInto, mem::take}; use tls_core::{ cert::ServerCertDetails, @@ -288,7 +288,7 @@ impl Backend for RustCryptoBackend { async fn get_client_key_share(&mut self) -> Result { // TODO make sure this and other methods are not called twice/out of order // generate our ECDH keypair - let sk = EphemeralSecret::random(&mut Compat(rng())); + let sk = EphemeralSecret::random(&mut rng().compat()); let pk_bytes = EncodedPoint::from(sk.public_key()).to_bytes().to_vec(); self.ecdh_pubkey = Some(pk_bytes.clone()); self.ecdh_secret = Some(sk); diff --git a/crates/tls/client/src/crypto/standard.rs b/crates/tls/client/src/crypto/standard.rs index c41a7f8bd7..cd0a959e78 100644 --- a/crates/tls/client/src/crypto/standard.rs +++ b/crates/tls/client/src/crypto/standard.rs @@ -6,8 +6,7 @@ use aes_gcm::Aes128Gcm; use async_trait::async_trait; use p256::{ecdh::EphemeralSecret, EncodedPoint, PublicKey as ECDHPublicKey}; use rand::{rng, RngExt}; - -use crate::rand_compat::Compat; +use rand06_compat::Rand0_6CompatExt; use tls_core::key::PublicKey; use tls_core::msgs::base::Payload as TLSPayload; @@ -340,7 +339,7 @@ impl Crypto for StandardCrypto { // TODO make sure this and other methods are not called twice/out of order println!("IN client_key_share"); // generate our ECDH keypair - let sk = EphemeralSecret::random(&mut Compat(rng())); + let sk = EphemeralSecret::random(&mut rng().compat()); let pk_bytes = EncodedPoint::from(sk.public_key()).to_bytes().to_vec(); self.ecdh_pubkey = Some(pk_bytes.clone()); self.ecdh_secret = Some(sk); diff --git a/crates/tls/client/src/lib.rs b/crates/tls/client/src/lib.rs index 93af81b8c8..389995b7dc 100644 --- a/crates/tls/client/src/lib.rs +++ b/crates/tls/client/src/lib.rs @@ -302,7 +302,6 @@ mod error; mod hash_hs; mod limited_cache; mod rand; -mod rand_compat; mod record_layer; //mod stream; mod vecbuf; diff --git a/crates/tls/client/src/rand_compat.rs b/crates/tls/client/src/rand_compat.rs deleted file mode 100644 index 56e44ff083..0000000000 --- a/crates/tls/client/src/rand_compat.rs +++ /dev/null @@ -1,33 +0,0 @@ -//! Bridges a `rand_core` 0.10 RNG to the `rand_core` 0.6 interface required by -//! `p256` (`EphemeralSecret::random`, ...). Replaces the `rand06-compat` crate, -//! which only bridges `rand_core` 0.6 <-> 0.9. -//! -//! A single impl covers both an owned RNG and a `&mut` borrow, since -//! `rand_core` 0.10 blanket-implements `Rng` for `&mut R`. - -/// Wraps a `rand_core` 0.10 RNG, exposing the `rand_core` 0.6 traits. -pub(crate) struct Compat(pub(crate) R); - -impl p256::elliptic_curve::rand_core::RngCore for Compat { - fn next_u32(&mut self) -> u32 { - self.0.next_u32() - } - - fn next_u64(&mut self) -> u64 { - self.0.next_u64() - } - - fn fill_bytes(&mut self, dest: &mut [u8]) { - self.0.fill_bytes(dest) - } - - fn try_fill_bytes( - &mut self, - dest: &mut [u8], - ) -> Result<(), p256::elliptic_curve::rand_core::Error> { - self.0.fill_bytes(dest); - Ok(()) - } -} - -impl p256::elliptic_curve::rand_core::CryptoRng for Compat {} diff --git a/crates/wasm/Cargo.toml b/crates/wasm/Cargo.toml index 60c4f84dc3..85b3972bdb 100644 --- a/crates/wasm/Cargo.toml +++ b/crates/wasm/Cargo.toml @@ -40,11 +40,8 @@ web-spawn = { workspace = true } [target.'cfg(target_arch = "wasm32")'.dependencies] getrandom = { version = "0.2", features = ["js"] } -getrandom_03 = { package = "getrandom", version = "0.3", features = [ - "wasm_js", -] } # rand 0.10 (pulled via mpz) depends on getrandom 0.4, whose wasm backend is a -# crate feature rather than the `getrandom_backend` cfg used by 0.3. +# crate feature rather than the `getrandom_backend` cfg used by 0.2. getrandom_04 = { package = "getrandom", version = "0.4", features = [ "wasm_js", ] } From 5df3d3dfc11b84b83ead2a629347b05f6d0c1c5f Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 2 Jun 2026 23:25:53 +0200 Subject: [PATCH 5/7] Missing lock file --- crates/examples-zk/Cargo.lock | 667 +++++++++++++++------------------- 1 file changed, 301 insertions(+), 366 deletions(-) diff --git a/crates/examples-zk/Cargo.lock b/crates/examples-zk/Cargo.lock index a11c594ce8..b78fa8eca6 100644 --- a/crates/examples-zk/Cargo.lock +++ b/crates/examples-zk/Cargo.lock @@ -29,8 +29,8 @@ version = "1.0.0-beta.19" source = "git+https://github.com/noir-lang/noir.git?rev=v1.0.0-beta.19#74d6be658e1ad252f87943292ba09bdd4da80bd4" dependencies = [ "ark-bn254", - "ark-ff 0.5.0", - "ark-std 0.5.0", + "ark-ff", + "ark-std", "cfg-if", "hex", "num-bigint", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66bd29a732b644c0431c6140f370d097879203d79b80c94a6747ba0872adaef8" +checksum = "f1fc76eaeac4c9164506c466d4ffdd8ec9d0c5bf57ee97177c4d8eceb3a0e138" dependencies = [ "cipher 0.5.2", "cpubits", @@ -231,26 +231,9 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d69eab57e8d2663efa5c63135b2af4f396d66424f88954c21104125ab6b3e6bc" dependencies = [ - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-std 0.5.0", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff 0.4.2", - "ark-poly 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "zeroize", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] @@ -260,70 +243,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d68f2d516162846c1238e755a7c4d131b892b70cc70c471a8e3ca3ed818fce" dependencies = [ "ahash", - "ark-ff 0.5.0", - "ark-poly 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", "educe", "fnv", "hashbrown 0.15.5", - "itertools 0.13.0", + "itertools", "num-bigint", "num-integer", "num-traits", "zeroize", ] -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - [[package]] name = "ark-ff" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a177aba0ed1e0fbb62aa9f6d0502e9b46dad8c2eab04c14258a1212d2557ea70" dependencies = [ - "ark-ff-asm 0.5.0", - "ark-ff-macros 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", "arrayvec", "digest 0.10.7", "educe", - "itertools 0.13.0", + "itertools", "num-bigint", "num-traits", "paste", "zeroize", ] -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-asm" version = "0.5.0" @@ -334,19 +287,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-ff-macros" version = "0.5.0" @@ -367,22 +307,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef677b59f5aff4123207c4dceb1c0ec8fdde2d4af7886f48be42ad864bfa0352" dependencies = [ "ark-bn254", - "ark-ec 0.5.0", - "ark-ff 0.5.0", - "ark-std 0.5.0", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "hashbrown 0.13.2", + "ark-ec", + "ark-ff", + "ark-std", ] [[package]] @@ -392,61 +319,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579305839da207f02b89cd1679e50e67b4331e2f9294a57693e5051b7703fe27" dependencies = [ "ahash", - "ark-ff 0.5.0", - "ark-serialize 0.5.0", - "ark-std 0.5.0", + "ark-ff", + "ark-serialize", + "ark-std", "educe", "fnv", "hashbrown 0.15.5", ] -[[package]] -name = "ark-secp256r1" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3975a01b0a6e3eae0f72ec7ca8598a6620fc72fa5981f6f5cca33b7cd788f633" -dependencies = [ - "ark-ec 0.4.2", - "ark-ff 0.4.2", - "ark-std 0.4.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive 0.4.2", - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - [[package]] name = "ark-serialize" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ - "ark-serialize-derive 0.5.0", - "ark-std 0.5.0", + "ark-serialize-derive", + "ark-std", "arrayvec", "digest 0.10.7", "num-bigint", ] -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ark-serialize-derive" version = "0.5.0" @@ -458,16 +351,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.6", -] - [[package]] name = "ark-std" version = "0.5.0" @@ -515,9 +398,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "axum" @@ -626,6 +509,15 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "bcs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350f2b5fa7b76b498158ec1079dc0ea842c5b622b6b3f675005fddd889f2c9a7" +dependencies = [ + "serde_core", +] + [[package]] name = "bimap" version = "0.6.3" @@ -667,9 +559,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" -version = "2.11.1" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +checksum = "84d7ced0ae9557296835c32bf1b1e02b44c746701f898460fb000d7eaa84f00a" [[package]] name = "bitmaps" @@ -753,8 +645,8 @@ dependencies = [ "acir", "acvm_blackbox_solver", "ark-bn254", - "ark-ec 0.5.0", - "ark-ff 0.5.0", + "ark-ec", + "ark-ff", "ark-grumpkin", "hex", ] @@ -811,9 +703,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bytemuck" @@ -852,9 +744,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.62" +version = "1.2.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" +checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" dependencies = [ "find-msvc-tools", "shlex", @@ -872,6 +764,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + [[package]] name = "chrono" version = "0.4.44" @@ -911,6 +814,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c" dependencies = [ + "block-buffer 0.12.0", "crypto-common 0.2.2", "inout 0.2.2", ] @@ -958,18 +862,18 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "clmul" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "bytemuck", "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.0", ] [[package]] name = "cmov" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" [[package]] name = "codespan" @@ -1172,6 +1076,15 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "ctr" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaca1c4b237092596f64d571e9db6ce4109c4ef9742e27590f1709594461f21" +dependencies = [ + "cipher 0.5.2", +] + [[package]] name = "ctutils" version = "0.4.2" @@ -1184,15 +1097,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.3" +version = "5.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "4f359e08ca85e7bd759e1fd933ff2bccd81864c60a8fba0e259c7f822b0924bf" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.0", "curve25519-dalek-derive", "fiat-crypto", - "rand_core 0.6.4", + "rand_core 0.10.1", "rustc_version", "serde", "subtle", @@ -1220,6 +1133,16 @@ dependencies = [ "darling_macro 0.14.4", ] +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + [[package]] name = "darling" version = "0.23.0" @@ -1244,6 +1167,20 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.117", +] + [[package]] name = "darling_core" version = "0.23.0" @@ -1268,6 +1205,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core 0.20.11", + "quote", + "syn 2.0.117", +] + [[package]] name = "darling_macro" version = "0.23.0" @@ -1311,40 +1259,29 @@ dependencies = [ "serde_core", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "derive_builder" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" dependencies = [ - "derive_builder_macro 0.11.2", + "derive_builder_macro 0.12.0", ] [[package]] name = "derive_builder" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ - "derive_builder_macro 0.12.0", + "derive_builder_macro 0.20.2", ] [[package]] name = "derive_builder_core" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ "darling 0.14.4", "proc-macro2", @@ -1354,34 +1291,34 @@ dependencies = [ [[package]] name = "derive_builder_core" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ - "darling 0.14.4", + "darling 0.20.11", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.117", ] [[package]] name = "derive_builder_macro" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ - "derive_builder_core 0.11.2", + "derive_builder_core 0.12.0", "syn 1.0.109", ] [[package]] name = "derive_builder_macro" -version = "0.12.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ - "derive_builder_core 0.12.0", - "syn 1.0.109", + "derive_builder_core 0.20.2", + "syn 2.0.117", ] [[package]] @@ -1410,9 +1347,9 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", @@ -1469,9 +1406,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "elliptic-curve" @@ -1583,9 +1520,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.9" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" [[package]] name = "find-msvc-tools" @@ -1631,6 +1568,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1708,7 +1651,7 @@ dependencies = [ [[package]] name = "futures-plex" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=64722f7#64722f7de999cbd41c0cab7312dade306d50ea5f" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" dependencies = [ "futures", ] @@ -1861,25 +1804,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -1887,7 +1811,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ "allocator-api2", - "foldhash", + "foldhash 0.1.5", ] [[package]] @@ -1895,6 +1819,11 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] [[package]] name = "heck" @@ -1943,9 +1872,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "8be7462df143984c4598a256ef469b251d7d7f9e271135073e78fc535414f3d0" dependencies = [ "bytes", "itoa", @@ -2000,9 +1929,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ "atomic-waker", "bytes", @@ -2284,15 +2213,6 @@ name = "iter-extended" version = "1.0.0-beta.19" source = "git+https://github.com/noir-lang/noir.git?rev=v1.0.0-beta.19#74d6be658e1ad252f87943292ba09bdd4da80bd4" -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -2325,9 +2245,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.98" +version = "0.3.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" +checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11" dependencies = [ "cfg-if", "futures-util", @@ -2452,9 +2372,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "113b30b4cd05f7c06868fdb2854f66a7b9fece9a48425351cd532e810d74024f" [[package]] name = "lru-slab" @@ -2471,16 +2391,16 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "matrix-transpose" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "memchr" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" [[package]] name = "mime" @@ -2500,9 +2420,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ "libc", "wasi", @@ -2512,7 +2432,7 @@ dependencies = [ [[package]] name = "mpz-circuits" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "mpz-circuits-core", "mpz-circuits-data", @@ -2521,22 +2441,22 @@ dependencies = [ [[package]] name = "mpz-circuits-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "bincode", "itybity 0.3.3", "once_cell", - "rand 0.9.4", + "rand 0.10.1", "regex", "serde", "serde_arrays", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-circuits-data" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "bincode", "mpz-circuits-core", @@ -2546,31 +2466,31 @@ dependencies = [ [[package]] name = "mpz-cointoss" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "futures", "mpz-cointoss-core", "mpz-common", "mpz-core", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-cointoss-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "mpz-core", "opaque-debug", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-common" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-task", "async-trait", @@ -2584,7 +2504,7 @@ dependencies = [ "pollster", "serde", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "tokio-util", ] @@ -2592,10 +2512,10 @@ dependencies = [ [[package]] name = "mpz-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "aes 0.9.0", - "bcs", + "aes 0.9.1", + "bcs 0.2.1", "bitvec", "blake3", "bytemuck", @@ -2606,32 +2526,27 @@ dependencies = [ "itybity 0.3.3", "once_cell", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.6.4", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rayon", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-fields" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "ark-ff 0.4.2", - "ark-secp256r1", - "ark-serialize 0.4.2", + "crypto-bigint 0.7.3", "hybrid-array", "itybity 0.3.3", "mpz-core", - "num-bigint", "opaque-debug", - "rand 0.8.6", - "rand 0.9.4", + "rand 0.10.1", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", "typenum", "zerocopy", ] @@ -2639,12 +2554,12 @@ dependencies = [ [[package]] name = "mpz-garble" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", - "derive_builder 0.11.2", + "derive_builder 0.20.2", "futures", - "hashbrown 0.14.5", + "hashbrown 0.17.1", "mpz-circuits", "mpz-common", "mpz-core", @@ -2653,11 +2568,11 @@ dependencies = [ "mpz-ot", "mpz-vm-core", "opaque-debug", - "rand 0.9.4", + "rand 0.10.1", "rangeset", "serde", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -2665,14 +2580,14 @@ dependencies = [ [[package]] name = "mpz-garble-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "aes 0.9.0", + "aes 0.9.1", "bitvec", "blake3", "cfg-if", "cipher 0.5.2", - "derive_builder 0.11.2", + "derive_builder 0.20.2", "itybity 0.3.3", "mpz-circuits", "mpz-common", @@ -2682,34 +2597,34 @@ dependencies = [ "mpz-vm-core", "once_cell", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rangeset", "rayon", "serde", "serde_arrays", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", ] [[package]] name = "mpz-hash" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "blake3", "itybity 0.3.3", "mpz-circuits", "mpz-core", "mpz-vm-core", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ideal-vm" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "futures", @@ -2720,28 +2635,28 @@ dependencies = [ "rangeset", "serde", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-memory-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "blake3", "futures", "itybity 0.3.3", "mpz-core", - "rand 0.9.4", + "rand 0.10.1", "rangeset", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ole" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "futures", @@ -2751,15 +2666,15 @@ dependencies = [ "mpz-fields", "mpz-ole-core", "mpz-ot", - "rand 0.9.4", + "rand 0.10.1", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ole-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "hybrid-array", "itybity 0.3.3", @@ -2767,15 +2682,15 @@ dependencies = [ "mpz-core", "mpz-fields", "mpz-ot-core", - "rand 0.9.4", + "rand 0.10.1", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-ot" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "cfg-if", @@ -2787,28 +2702,28 @@ dependencies = [ "mpz-core", "mpz-ot-core", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", ] [[package]] name = "mpz-ot-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ - "aes 0.9.0", + "aes 0.9.1", "blake3", "bytemuck", "cfg-if", "cipher 0.5.2", "clmul", - "ctr 0.9.2", + "ctr 0.10.1", "curve25519-dalek", - "derive_builder 0.11.2", + "derive_builder 0.20.2", "enum-try-as-inner", "futures", "itybity 0.3.3", @@ -2816,12 +2731,12 @@ dependencies = [ "mpz-common", "mpz-core", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rayon", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "zerocopy", ] @@ -2829,7 +2744,7 @@ dependencies = [ [[package]] name = "mpz-share-conversion" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "mpz-common", @@ -2837,46 +2752,46 @@ dependencies = [ "mpz-fields", "mpz-ole", "mpz-share-conversion-core", - "rand 0.9.4", + "rand 0.10.1", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-share-conversion-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "mpz-common", "mpz-core", "mpz-fields", "mpz-ole-core", - "rand 0.9.4", + "rand 0.10.1", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-vm-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "futures", "mpz-circuits", "mpz-common", "mpz-memory-core", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-zk" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "async-trait", "blake3", - "derive_builder 0.11.2", + "derive_builder 0.20.2", "futures", "mpz-common", "mpz-core", @@ -2884,13 +2799,13 @@ dependencies = [ "mpz-vm-core", "mpz-zk-core", "serio", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "mpz-zk-core" version = "0.1.0-alpha.6" -source = "git+https://github.com/privacy-ethereum/mpz?rev=v0.1.0-alpha.6#6ebfe619490c3155a589fc6a3be83b0976de19dc" +source = "git+https://github.com/privacy-ethereum/mpz?rev=3acfac364ec559a117999c10c782e2b28e83eddf#3acfac364ec559a117999c10c782e2b28e83eddf" dependencies = [ "blake3", "cfg-if", @@ -2899,11 +2814,11 @@ dependencies = [ "mpz-core", "mpz-memory-core", "mpz-vm-core", - "rand_chacha 0.9.0", + "rand_chacha 0.10.0", "rangeset", "rayon", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", "zerocopy", ] @@ -3404,9 +3319,9 @@ dependencies = [ [[package]] name = "pollster" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" [[package]] name = "polyval" @@ -3505,7 +3420,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.11+spec-1.1.0", + "toml_edit 0.25.12+spec-1.1.0", ] [[package]] @@ -3622,7 +3537,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ - "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", ] @@ -3637,14 +3551,24 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + [[package]] name = "rand06-compat" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0372da64e922a0b6979b115eb60d3c4ca7b2ef2b7565f039e3c6ee13bf6d5d38" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" dependencies = [ + "rand_core 0.10.1", "rand_core 0.6.4", - "rand_core 0.9.5", ] [[package]] @@ -3667,6 +3591,16 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand_chacha" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e6af7f3e25ded52c41df4e0b1af2d047e45896c2f3281792ed68a1c243daedb" +dependencies = [ + "ppv-lite86", + "rand_core 0.10.1", +] + [[package]] name = "rand_core" version = "0.6.4" @@ -4238,9 +4172,9 @@ dependencies = [ [[package]] name = "serde_arrays" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38636132857f68ec3d5f3eb121166d2af33cb55174c4d5ff645db6165cbef0fd" +checksum = "94a16b99c5ea4fe3daccd14853ad260ec00ea043b2708d1fd1da3106dcd8d9df" dependencies = [ "serde", ] @@ -4267,9 +4201,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -4415,9 +4349,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" [[package]] name = "signature" @@ -4491,9 +4425,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", "windows-sys 0.61.2", @@ -4831,7 +4765,7 @@ dependencies = [ "once_cell", "opaque-debug", "pin-project-lite", - "rand 0.9.4", + "rand 0.10.1", "rangeset", "rustls 0.23.40", "rustls-pki-types", @@ -4859,12 +4793,13 @@ dependencies = [ name = "tlsn-attestation" version = "0.1.0-alpha.16-pre" dependencies = [ - "bcs", + "bcs 0.1.6", "blake3", "k256 0.13.4", "opaque-debug", "p256 0.13.2", - "rand 0.9.4", + "rand 0.10.1", + "rand06-compat", "serde", "thiserror 1.0.69", "tiny-keccak", @@ -4893,9 +4828,9 @@ dependencies = [ "const-oid 0.10.2", "itybity 0.2.1", "opaque-debug", - "rand 0.9.4", - "rand_chacha 0.9.0", - "rand_core 0.9.5", + "rand 0.10.1", + "rand_chacha 0.10.0", + "rand_core 0.10.1", "rangeset", "rs_merkle", "rustls-pki-types", @@ -4982,7 +4917,7 @@ dependencies = [ "mpz-share-conversion", "mpz-vm-core", "p256 0.13.2", - "rand 0.9.4", + "rand 0.10.1", "rand06-compat", "serio", "thiserror 1.0.69", @@ -5013,7 +4948,7 @@ dependencies = [ "opaque-debug", "p256 0.13.2", "pin-project-lite", - "rand 0.9.4", + "rand 0.10.1", "serde", "serio", "thiserror 1.0.69", @@ -5031,7 +4966,7 @@ dependencies = [ [[package]] name = "tlsn-mux" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=64722f7#64722f7de999cbd41c0cab7312dade306d50ea5f" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" dependencies = [ "blake3", "futures", @@ -5039,7 +4974,7 @@ dependencies = [ "nohash-hasher", "parking_lot", "pin-project", - "rand 0.9.4", + "rand 0.10.1", "static_assertions", "web-time 1.1.0", ] @@ -5080,7 +5015,7 @@ dependencies = [ "log", "mpz-common", "p256 0.13.2", - "rand 0.9.4", + "rand 0.10.1", "rand06-compat", "ring", "rustls-pki-types", @@ -5099,7 +5034,7 @@ version = "0.1.0-alpha.16-pre" dependencies = [ "futures", "hmac 0.12.1", - "rand 0.9.4", + "rand 0.10.1", "ring", "rustls-pemfile", "rustls-pki-types", @@ -5207,9 +5142,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.11+spec-1.1.0" +version = "0.25.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap 2.14.0", "toml_datetime 1.1.1+spec-1.1.0", @@ -5339,9 +5274,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.20.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "ucd-trie" @@ -5495,9 +5430,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.121" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" +checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409" dependencies = [ "cfg-if", "once_cell", @@ -5508,9 +5443,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.71" +version = "0.4.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" +checksum = "9473dbd2991ae90b6291c3c32c30c6187ac49aa32f9905d1cce280ec1e110b0f" dependencies = [ "js-sys", "wasm-bindgen", @@ -5518,9 +5453,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.121" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" +checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5528,9 +5463,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.121" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" +checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e" dependencies = [ "bumpalo", "proc-macro2", @@ -5541,9 +5476,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.121" +version = "0.2.122" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" +checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437" dependencies = [ "unicode-ident", ] @@ -5584,9 +5519,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.98" +version = "0.3.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" +checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436" dependencies = [ "js-sys", "wasm-bindgen", @@ -6017,18 +5952,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" dependencies = [ "proc-macro2", "quote", From 23d9b996cb73e67158400a706b191d01e26ae365 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 3 Jun 2026 12:00:36 +0200 Subject: [PATCH 6/7] test: assert mpz#403 bounds concurrent streams in Context::map Adds an integration test that drives Context::map over 1000 items through a custom Mux counting concurrent open streams, and asserts the peak stays within DEFAULT_CONCURRENCY_LIMIT (+1 for the parent context channel). Measured peak is 33 (= 1 baseline + 32 limit); an unbounded map would peak at ~1001. The test fails if mpz is ever bumped to a version whose map opens one stream per item again, guarding the fix tlsn relies on to avoid TooManyStreams during preprocessing. --- crates/tlsn/tests/stream_bound.rs | 115 ++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 crates/tlsn/tests/stream_bound.rs diff --git a/crates/tlsn/tests/stream_bound.rs b/crates/tlsn/tests/stream_bound.rs new file mode 100644 index 0000000000..2ba2eca480 --- /dev/null +++ b/crates/tlsn/tests/stream_bound.rs @@ -0,0 +1,115 @@ +//! Regression test for the mpz `Context::map` concurrency bound +//! (privacy-ethereum/mpz#403): mapping over N items must open at most +//! `DEFAULT_CONCURRENCY_LIMIT` mux streams at once, not one per item. Before +//! #403 this grew unbounded with the transcript size and aborted preprocessing +//! with `TooManyStreams`. tlsn's executor relies on this bound. + +use std::{ + pin::Pin, + sync::{ + Arc, + atomic::{AtomicUsize, Ordering}, + }, + task::{Context as TaskContext, Poll}, +}; + +use futures::{AsyncRead, AsyncWrite}; +use mpz_common::{Session, context::DEFAULT_CONCURRENCY_LIMIT, io::Io, mux::Mux}; + +#[derive(Clone, Default)] +struct Counter { + live: Arc, + peak: Arc, +} + +/// A mux whose streams track the number of concurrently open streams. +struct CountingMux(Counter); + +impl Mux for CountingMux { + fn open(&self, _id: &[u8]) -> Result { + let live = self.0.live.fetch_add(1, Ordering::Relaxed) + 1; + self.0.peak.fetch_max(live, Ordering::Relaxed); + Ok(Io::from_io(CountingStream(self.0.live.clone()))) + } +} + +/// A no-op stream that decrements the live count when dropped. The map closure +/// performs no IO, so the read/write impls are never exercised. +struct CountingStream(Arc); + +impl Drop for CountingStream { + fn drop(&mut self) { + self.0.fetch_sub(1, Ordering::Relaxed); + } +} + +impl AsyncRead for CountingStream { + fn poll_read( + self: Pin<&mut Self>, + _: &mut TaskContext<'_>, + _: &mut [u8], + ) -> Poll> { + Poll::Ready(Ok(0)) + } +} + +impl AsyncWrite for CountingStream { + fn poll_write( + self: Pin<&mut Self>, + _: &mut TaskContext<'_>, + buf: &[u8], + ) -> Poll> { + Poll::Ready(Ok(buf.len())) + } + + fn poll_flush(self: Pin<&mut Self>, _: &mut TaskContext<'_>) -> Poll> { + Poll::Ready(Ok(())) + } + + fn poll_close(self: Pin<&mut Self>, _: &mut TaskContext<'_>) -> Poll> { + Poll::Ready(Ok(())) + } +} + +#[tokio::test] +async fn test_streams_bounded() { + // Far more items than the limit: an unbounded map would open N streams. + const N: usize = 1000; + + let counter = Counter::default(); + // Built like tlsn's executor (default concurrency limit); `cooperative` + // avoids a thread pool while exercising the same `buffered` bound. + let session = Session::builder() + .cooperative() + .build(CountingMux(counter.clone())) + .unwrap(); + let mut ctx = session.new_context().unwrap(); + + // The context's own channel is one open stream; map's children stack on it. + let baseline = counter.live.load(Ordering::Relaxed); + + let items: Vec = (0..N).collect(); + let results = ctx + .map(items, |_ctx, i| { + // Yield so the `buffered` window fills before any item completes. + Box::pin(async move { + tokio::task::yield_now().await; + i + }) + }) + .await + .unwrap(); + + let peak = counter.peak.load(Ordering::Relaxed); + assert_eq!(results.len(), N); + assert!(peak > baseline, "map should run items concurrently (peak {peak})"); + assert!( + peak <= baseline + DEFAULT_CONCURRENCY_LIMIT, + "peak {peak} exceeds the bound; map concurrency regressed \ + (unbounded would peak at ~{})", + baseline + N + ); + + drop(ctx); + assert_eq!(counter.live.load(Ordering::Relaxed), 0, "all streams closed"); +} From a7cddd2492152d073a5b5f8ea0050d727158343b Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Sat, 6 Jun 2026 14:47:41 +0200 Subject: [PATCH 7/7] chore: point tlsn-utils at e99c00d (dev + #111 backpressure incl. lost-close fix) --- Cargo.lock | 32 ++++++++++++++++---------------- Cargo.toml | 10 +++++----- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ae991ca6f8..1161cacd2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -535,7 +535,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -546,7 +546,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2509,7 +2509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -2679,7 +2679,7 @@ dependencies = [ [[package]] name = "futures-plex" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=e99c00d#e99c00d64fb9dd063fa2dbb1c81c3d917ab1cf24" dependencies = [ "futures", ] @@ -3354,7 +3354,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4044,7 +4044,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4159,7 +4159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4622,8 +4622,8 @@ dependencies = [ [[package]] name = "rand06-compat" -version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" +version = "0.2.0" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=e99c00d#e99c00d64fb9dd063fa2dbb1c81c3d917ab1cf24" dependencies = [ "rand_core 0.10.1", "rand_core 0.6.4", @@ -5014,7 +5014,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -5584,7 +5584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -5608,7 +5608,7 @@ dependencies = [ [[package]] name = "spansy" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=e99c00d#e99c00d64fb9dd063fa2dbb1c81c3d917ab1cf24" dependencies = [ "bytes", "httparse", @@ -5812,7 +5812,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.4", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -6353,7 +6353,7 @@ dependencies = [ [[package]] name = "tlsn-mux" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=e99c00d#e99c00d64fb9dd063fa2dbb1c81c3d917ab1cf24" dependencies = [ "blake3", "futures", @@ -7230,7 +7230,7 @@ dependencies = [ [[package]] name = "websocket-relay" version = "0.1.0" -source = "git+https://github.com/tlsnotary/tlsn-utils?rev=606011312f3ac969565866a98022581af1733689#606011312f3ac969565866a98022581af1733689" +source = "git+https://github.com/tlsnotary/tlsn-utils?rev=e99c00d#e99c00d64fb9dd063fa2dbb1c81c3d917ab1cf24" dependencies = [ "anyhow", "form_urlencoded", @@ -7285,7 +7285,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e2cbf45f36..fa86e79e70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ tlsn-formats = { path = "crates/formats" } tlsn-hmac-sha256 = { path = "crates/components/hmac-sha256" } tlsn-key-exchange = { path = "crates/components/key-exchange" } tlsn-mpc-tls = { path = "crates/mpc-tls" } -tlsn-mux = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } +tlsn-mux = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "e99c00d" } tlsn-server-fixture = { path = "crates/server-fixture/server" } tlsn-server-fixture-certs = { path = "crates/server-fixture/certs" } tlsn-tls-client = { path = "crates/tls/client" } @@ -87,11 +87,11 @@ mpz-zk = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec55 mpz-hash = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf", default-features = false } mpz-ideal-vm = { git = "https://github.com/privacy-ethereum/mpz", rev = "3acfac364ec559a117999c10c782e2b28e83eddf" } -futures-plex = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } +futures-plex = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "e99c00d" } rangeset = { version = "0.4" } serio = { version = "0.2" } -spansy = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } -websocket-relay = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } +spansy = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "e99c00d" } +websocket-relay = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "e99c00d" } aead = { version = "0.4" } aes = { version = "0.8" } @@ -140,7 +140,7 @@ pollster = { version = "0.4" } rand = { version = "0.10" } rand_chacha = { version = "0.10" } rand_core = { version = "0.10" } -rand06-compat = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "606011312f3ac969565866a98022581af1733689" } +rand06-compat = { git = "https://github.com/tlsnotary/tlsn-utils", rev = "e99c00d" } rayon = { version = "1.10" } regex = { version = "1.10" } ring = { version = "0.17" }