From 95ef2fb767fae18b9ec688bbea91bafe5fc9a9ed Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Wed, 18 Nov 2026 05:03:57 +0100 Subject: [PATCH 1/4] Re-home crate metadata, docs and security policy under xoloki --- .doc/build.sh | 20 +- .doc/cloudflare.sh | 10 - .doc/install-latex-ubuntu.sh | 7 +- .github/workflows/ci.yml | 10 +- .github/workflows/publish.yml | 4 +- .gitignore | 1 - Cargo.lock | 1973 +++++++++++++++++++++++++ Cargo.toml | 14 +- README.md | 14 +- SECURITY.md | 26 +- USAGE.md | 19 +- src/errors.rs | 16 +- src/lib.rs | 4 +- src/main.rs | 103 -- src/state_machine/coordinator/fire.rs | 2 - src/state_machine/coordinator/mod.rs | 2 +- src/state_machine/mod.rs | 2 +- src/state_machine/signer/mod.rs | 3 - src/taproot.rs | 12 - src/util.rs | 1 - src/v2.rs | 2 +- wsts.tex | 6 +- 22 files changed, 2075 insertions(+), 176 deletions(-) delete mode 100755 .doc/cloudflare.sh create mode 100644 Cargo.lock delete mode 100644 src/main.rs diff --git a/.doc/build.sh b/.doc/build.sh index 90f23313..e1b93c94 100755 --- a/.doc/build.sh +++ b/.doc/build.sh @@ -1,11 +1,23 @@ -# Build API Documentation -cargo doc --no-deps +#!/usr/bin/env bash +# Builds the contents of https://wsts.xyz: the rustdoc API documentation, the +# paper as a PDF, and the landing page that links to both. +# +# Invoked directly by .github/workflows/{ci,static}.yml, so it needs its own +# shebang and error handling: without `set -e` a pdflatex or cargo failure +# leaves the step green and silently publishes an incomplete site. +set -euo pipefail + +# Build API Documentation. --all-features so that feature-gated modules (v1, +# and the test helpers) appear on the site; without it they are simply missing, +# which is why wsts.xyz/wsts/v1/ used to 404. -D warnings catches broken +# intra-doc links, which RUSTFLAGS does not reach. +RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features # We have to build the pdf twice. The way the bibliography works is that the # first run creates the bibtex aux files, then the second run puts the ref # numbers into the inline citations. -pdflatex ./wsts.tex -pdflatex ./wsts.tex +pdflatex -halt-on-error ./wsts.tex +pdflatex -halt-on-error ./wsts.tex # Copy PDF File cp ./wsts.pdf ./target/doc/ diff --git a/.doc/cloudflare.sh b/.doc/cloudflare.sh deleted file mode 100755 index fc1bf1ec..00000000 --- a/.doc/cloudflare.sh +++ /dev/null @@ -1,10 +0,0 @@ -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -~/.cargo/bin/cargo doc --no-deps -cp ./.doc/index.html ./target/doc/ - -# apt-get install texlive -# apt-get install texlive-latex-extra -# pdflatex ./wsts.tex -# pdflatex ./wsts.tex - -# cp ./wsts.pdf ./target/doc/ diff --git a/.doc/install-latex-ubuntu.sh b/.doc/install-latex-ubuntu.sh index 7813f59a..6a37ce7f 100755 --- a/.doc/install-latex-ubuntu.sh +++ b/.doc/install-latex-ubuntu.sh @@ -1,4 +1,9 @@ +#!/usr/bin/env bash +# Installs the LaTeX packages .doc/build.sh needs to render wsts.tex. +# Ubuntu-only; invoked by .github/workflows/{ci,static}.yml. +set -euo pipefail + # Update apt sudo apt-get update # Install LaTeX base and extra packages -sudo apt-get install texlive texlive-latex-extra +sudo apt-get install --yes texlive texlive-latex-extra diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ffbf2a3..caa39ec6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Cargo Check id: cargo_check run: | - cargo check + cargo check --locked test-all: name: test-all @@ -55,8 +55,8 @@ jobs: - name: Cargo Test id: cargo_test run: | - cargo test - cargo test --features with_v1 + cargo test --locked + cargo test --locked --features with_v1 fmt: name: fmt @@ -98,7 +98,7 @@ jobs: - name: Cargo Clippy id: cargo_clippy run: | - cargo clippy --all-targets --all-features -- -D warnings -A clippy::op-ref -A clippy::needless-range-loop + cargo clippy --all-targets --all-features -- -D warnings package: name: package @@ -122,7 +122,7 @@ jobs: - name: Cargo Publish Dry Run id: cargo_publish_dry_run run: | - cargo publish --dry-run + cargo publish --dry-run --locked doc: permissions: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 47b3e974..91ebe000 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,7 @@ jobs: - name: Cargo Publish Dry Run id: cargo_publish_dry_run run: | - cargo publish --dry-run + cargo publish --dry-run --locked - name: Cargo Publish id: cargo_publish @@ -50,4 +50,4 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: | - cargo publish + cargo publish --locked diff --git a/.gitignore b/.gitignore index b7b10a17..d3310c0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /target *~ -Cargo.lock *.aux *.log .DS_Store diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..456bd092 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1973 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base58ck" +version = "0.1.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "365c0acd5b2e8dd0111a46c4faea83fb3cfb6e39a49a7c73a06e090db7b2eff0" +dependencies = [ + "bitcoin_hashes", +] + +[[package]] +name = "bech32" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" + +[[package]] +name = "bindgen" +version = "0.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex 1.3.0", + "syn 1.0.109", + "which", +] + +[[package]] +name = "bitcoin" +version = "0.32.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0ce8bd5baaa0d303a19915a6d93afed161f528654e42da2a7a97d05c59499a" +dependencies = [ + "base58ck", + "bech32", + "bitcoin-io", + "bitcoin-units", + "bitcoin_hashes", + "hex-conservative 0.2.2", + "hex_lit", + "secp256k1", + "serde", +] + +[[package]] +name = "bitcoin-consensus-encoding" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "207311705279250ba465076a1bac4b1ac982855fff73fc5f67e22158ac58cdc9" +dependencies = [ + "bitcoin-internals", + "hex-conservative 1.2.0", + "serde", +] + +[[package]] +name = "bitcoin-internals" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d573f4cf32996a8dce612e4348cece65a241f1882ed594047c9ba348e8869fa5" + +[[package]] +name = "bitcoin-io" +version = "0.1.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb5de036369d1ac59d3c1819ebc4d850f89466f5401c571a285b6ed564a4cb78" +dependencies = [ + "bitcoin-consensus-encoding", +] + +[[package]] +name = "bitcoin-units" +version = "0.1.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cb95693f371d089a4b5b6fc41c6f3ea6e01ee8c15388335dfac8ea685173b51" +dependencies = [ + "bitcoin-consensus-encoding", + "serde", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.14.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bca4c7abb40c8817d77403c880988cfd484f23ab2365726afb2f798363e2c4a2" +dependencies = [ + "bitcoin-io", + "hex-conservative 0.2.2", + "serde", +] + +[[package]] +name = "bitcoinconsensus" +version = "0.106.0+26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12cba9cce5043cdda968e07b9df6d05ec6b0b38aa27a9a40bb575cf3e521ae9" +dependencies = [ + "cc", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" + +[[package]] +name = "bitvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[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.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "byte-slice-cast" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cc" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e" +dependencies = [ + "find-msvc-tools", + "shlex 2.0.1", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "const_format" +version = "0.2.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" +dependencies = [ + "const_format_proc_macros", + "konst", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de" + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-conservative" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda06d18ac606267c40c04e41b9947729bf8b9efe74bd4e82b61a5f26a510b9f" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex-conservative" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35431185f361ccf3ffc58254628af5f1f5d5f28531da2e02e5d6c82bbc282a10" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex_lit" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "is-terminal" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" +dependencies = [ + "hermit-abi", + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "log" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "oorandom" +version = "11.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "p256k1" +version = "7.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57afd4c19b05645dcc7898653c7e63079a3f16578897685a304f14467d7c2825" +dependencies = [ + "bindgen", + "bitvec", + "bs58 0.4.0", + "cc", + "hex", + "itertools", + "num-traits", + "primitive-types", + "proc-macro2", + "quote", + "rand_core", + "rustfmt-wrapper", + "serde", + "sha2", + "syn 2.0.119", +] + +[[package]] +name = "parity-scale-codec" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "const_format", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "rustversion", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "polynomial" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27abb6e4638dcecc65a92b50d7f1d87dd6dea987ba71db987b6bf881f4877e9d" +dependencies = [ + "num-traits", + "serde", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.13+spec-1.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustfmt-wrapper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1adc9dfed5cc999077978cc7163b9282c5751c8d39827c4ea8c8c220ca5a440" +dependencies = [ + "serde", + "tempfile", + "thiserror", + "toml", + "toolchain_find", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "secp256k1" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9465315bc9d4566e1724f0fffcbcc446268cb522e60f9a27bcded6b19c108113" +dependencies = [ + "bitcoin_hashes", + "rand", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +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 = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix 1.1.4", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +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 = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_write", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.13+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" +dependencies = [ + "indexmap", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "toolchain_find" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc8c9a7f0a2966e1acdaf0461023d0b01471eeead645370cf4c3f5cff153f2a" +dependencies = [ + "home", + "once_cell", + "regex", + "semver", + "walkdir", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wsts" +version = "15.0.0" +dependencies = [ + "aes-gcm", + "bitcoin", + "bitcoinconsensus", + "bs58 0.5.1", + "criterion", + "elliptic-curve", + "hashbrown 0.14.5", + "hex", + "num-traits", + "p256k1", + "polynomial", + "rand", + "rand_chacha", + "rand_core", + "serde", + "sha2", + "thiserror", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/Cargo.toml b/Cargo.toml index d3adbddb..6fbab823 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,9 +6,15 @@ authors = ["Joey Yandle "] license = "Apache-2.0" description = "Weighted Schnorr Threshold Signatures, based on FROST" readme = "README.md" -repository = "https://github.com/Trust-Machines/wsts/" +repository = "https://github.com/xoloki/wsts" +homepage = "https://wsts.xyz" +documentation = "https://wsts.xyz/wsts" keywords = ["cryptography", "crypto", "frost"] categories = ["cryptography"] +# Repo scaffolding that serves no purpose inside the published .crate. +# README.md is deliberately NOT excluded: `readme` and the crate-level +# `include_str!` in src/lib.rs both require it. +exclude = [".github/", ".doc/", "CNAME", "coverage.sh", "rust-toolchain.toml"] [features] default = ["with_p256k1_bindgen"] @@ -27,7 +33,6 @@ hashbrown = { version = "0.14", features = ["serde"] } hex = "0.4.3" num-traits = "0.2" polynomial = { version = "0.2.5", features = ["serde"] } -primitive-types = "0.12" rand_core = "0.6" p256k1 = { version = "7.2", default-features = false } serde = { version = "1.0", features = ["derive"] } @@ -56,6 +61,5 @@ harness = false path = "src/lib.rs" # The source file of the target. crate-type = ["lib"] # The crate types to generate. -[[bin]] -name = "wsts" -path = "src/main.rs" +[package.metadata.docs.rs] +all-features = true diff --git a/README.md b/README.md index 5d7b14bf..fbe749a3 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ -## SAFETY NOTICE +## Safety -**This crate is only considered safe to use in the specific configuration, parameterization, and protocol flow in which it is used by the sBTC system (https://github.com/stacks-sbtc/sbtc). Using it in any other context, or modifying the protocol without a thorough cryptographic review, is strongly discouraged and may be insecure.** +`WSTS` has been independently audited and was exercised in production by the [sBTC](https://github.com/stacks-sbtc/sbtc) system. **That is history, and it does not describe this code.** sBTC vendored `wsts` 14.0.0 into its own tree on 2026-03-02 ([sbtc#1938](https://github.com/stacks-sbtc/sbtc/commit/f43fd2d329d408d2be7055f7f4684c4bf42ad131)) and the two implementations have diverged in both directions since. sBTC removed the `v1` module and the bitcoin helpers and reworked polynomial-commitment validation; this crate has taken protocol changes their copy never received. Neither tree's audit or operational history transfers to the other. + +Modifying the protocol without a thorough cryptographic review is strongly discouraged and may be insecure. # WSTS -[![ci](https://github.com/Trust-Machines/wsts/actions/workflows/ci.yml/badge.svg)](https://github.com/Trust-Machines/wsts/actions/workflows/ci.yml) +[![ci](https://github.com/xoloki/wsts/actions/workflows/ci.yml/badge.svg)](https://github.com/xoloki/wsts/actions/workflows/ci.yml) [![crates.io](https://img.shields.io/crates/v/wsts.svg)](https://crates.io/crates/wsts) -[```WSTS```](https://tmurl.net/wsts) is a system for making ```Weighted Schnorr Threshold Signatures```, aka ```WileyProofs```. It allows a group of ```signers```, each of whom controls a set of ```keys```, to make a valid ```Schnorr``` signature, as long as ```T``` (the ```threshold```) of them complete the protocol honestly. While there are many other threshold signature schemes, ```WSTS``` has several features which make it particularly useful in a cryptocurrency context. +[```WSTS```](https://wsts.xyz) is a system for making ```Weighted Schnorr Threshold Signatures```, aka ```WileyProofs```. It allows a group of ```signers```, each of whom controls a set of ```keys```, to make a valid ```Schnorr``` signature, as long as ```T``` (the ```threshold```) of them complete the protocol honestly. While there are many other threshold signature schemes, ```WSTS``` has several features which make it particularly useful in a cryptocurrency context. First, it is optimized for a small number of rounds in the common case where there are no byzantine actors present. Since the protocol allows detection any bad actors in the system, it makes sense to optimize for the case where there are none. Such byzantine actors can be sanctioned in a way that severely disincentivezes attempts to subvert the protocol. @@ -29,8 +31,8 @@ This crate uses the Bitcoin ```secp256k1``` curve. But since the C ```libsecp25 ## Documentation -- [wsts crate docs in GitHub](https://stacks-sbtc.github.io/wsts/wsts) -- [WSTS Paper](https://stacks-sbtc.github.io/wsts/wsts.pdf) +- [wsts crate docs](https://wsts.xyz/wsts) +- [WSTS Paper](https://wsts.xyz/wsts.pdf) ## Copyright and License diff --git a/SECURITY.md b/SECURITY.md index b0dd61b9..50836949 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,27 @@ # WSTS Security Policy -Due to close integration with the `sBTC` project and `Stacks` ecosystem, `WSTS` follows the [sBTC Security Policy](https://github.com/stacks-sbtc/sbtc/blob/main/SECURITY.md). +## Supported versions + +Only the latest published release of the [`wsts`](https://crates.io/crates/wsts) crate receives security fixes. Older release lines are not maintained. + +## Reporting a vulnerability + +**Please do not open a public issue for a security vulnerability.** + +Report it through [GitHub private vulnerability reporting](https://github.com/xoloki/wsts/security/advisories/new), which opens a private advisory visible only to you and the maintainer. This is the preferred channel: it keeps the report private, gives us a thread to triage in, and provides a private fork to develop a fix without disclosing the issue through a public branch. + +If you would rather not use GitHub, or you want to agree on an encrypted channel before sending details, mail . Note that private vulnerability reporting is private to GitHub rather than end-to-end encrypted, so if the finding is sensitive enough that this matters, open with a short note and no detail, and we will arrange something else. + +Expect an acknowledgement within a week. `WSTS` is maintained by one person, so please allow reasonable time for a fix before disclosing publicly. + +## If you are reporting against sBTC + +The [sBTC](https://github.com/stacks-sbtc/sbtc) project vendored `wsts` 14.0.0 into its own tree in March 2026 and the two implementations have since diverged in both directions. If the code you are looking at is `sbtc/wsts/`, the issue may not exist here and cannot be fixed here. Please report it to sBTC. See the Safety section of the README for what differs. + +## How fixes are disclosed + +When a report is resolved, we publish a GitHub Security Advisory and then open a companion advisory against [`rustsec/advisory-db`](https://github.com/rustsec/advisory-db). Both steps matter: `cargo audit` and `cargo deny` read the RustSec database rather than GitHub's, so a GHSA alone would leave Rust consumers unwarned. Reporters are credited unless they ask otherwise. + +## Audit history + +`WSTS` has been subject to independent security audits. Findings from those reviews are tracked in this repository under the `coinfabrik-audit` and `ottersec-audit` issue labels. diff --git a/USAGE.md b/USAGE.md index 6d7bbe76..92c3a711 100644 --- a/USAGE.md +++ b/USAGE.md @@ -2,7 +2,7 @@ Applications which use `WSTS` will typically run both `Signer` and `Coordinator` state machines, in order to be able to handle all parts of the protocol. Because of this, these state machines do not verify packets as they come in; this would lead to duplicate work, and require the state machines to have all keys in their configs, including knowing who is the active coordinator. This is out of scope for the library. Thus applications `must` verify packets before calling `process_message` on them. -This addresses the audit critical issues [CR-01](https://github.com/Trust-Machines/wsts/issues/66) and [CR-02](https://github.com/Trust-Machines/wsts/issues/67). +This addresses the audit critical issues [CR-01](https://github.com/xoloki/wsts/issues/66) and [CR-02](https://github.com/xoloki/wsts/issues/67). To ensure flexibility, these state machines require the user to provide a random number generator (RNG) that implements the `RngCore` and `CryptoRng` traits. @@ -35,13 +35,24 @@ You can use the following RNG implementations: ```rust use wsts::util::create_rng; -use wsts::v1::Signer; +use wsts::v2::Party; + +// Protocol parameters +let num_parties: u32 = 5; +let num_keys: u32 = 10; +let threshold: u32 = 7; + +// This party's id, and the key ids it controls +let party_id: u32 = 0; +let key_ids = [0, 1]; // Initialize your RNG let mut rng = create_rng(); -// Create a signer -let signer = Signer::new(id, key_ids, N, T, &mut rng); +// Create a party +let party = Party::new(party_id, &key_ids, num_parties, num_keys, threshold, &mut rng); ``` +The `v1` module is behind the `with_v1` feature and is not built by default; `use wsts::v1::Signer` requires `--features with_v1`. + Ensure that you pass the RNG to all functions that require randomness. \ No newline at end of file diff --git a/src/errors.rs b/src/errors.rs index 1ab797b4..674c89c9 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -64,20 +64,14 @@ impl From for AggregatorError { } } -impl From for EncryptionError { - fn from(e: EllipticCurveError) -> Self { - Self::EllipticCurveError(e) - } -} - #[derive(Error, Debug, Clone, PartialEq)] /// Errors which can happen during encryption pub enum EncryptionError { #[error("AES nonce was missing from the buffer")] - /// AES nonce was missing from the buffer")] + /// AES nonce was missing from the buffer MissingNonce, #[error("AES data was missing from the buffer")] - /// AES data was missing from the buffer")] + /// AES data was missing from the buffer MissingData, #[error("AES GCM error {0:?}")] /// Wrapped aes_gcm::Error, an opaque type @@ -92,3 +86,9 @@ impl From for EncryptionError { Self::AesGcm(e) } } + +impl From for EncryptionError { + fn from(e: EllipticCurveError) -> Self { + Self::EllipticCurveError(e) + } +} diff --git a/src/lib.rs b/src/lib.rs index 15994270..3fd8dfb1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,10 +29,10 @@ pub mod util; #[cfg(feature = "with_v1")] #[allow(clippy::op_ref)] pub mod v1; -/// Version 1 of WSTS, which encapsulates a number of parties using vanilla FROST +/// Version 2 of WSTS, in which each party holds one polynomial and one nonce but may control many keys #[allow(clippy::op_ref)] pub mod v2; -/// Shamir secret sharing, using in distributed key generation +/// Shamir secret sharing, used in distributed key generation pub mod vss; pub use p256k1 as curve; diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 9dce9f60..00000000 --- a/src/main.rs +++ /dev/null @@ -1,103 +0,0 @@ -use std::{env, time}; - -#[cfg(feature = "with_v1")] -use wsts::v1; -use wsts::{common::test_helpers::gen_signer_ids, traits::Aggregator, util::create_rng, v2}; - -#[allow(non_snake_case)] -fn main() { - let args: Vec = env::args().collect(); - let N: u32 = if args.len() > 1 { - args[1].parse::().unwrap() - } else { - 20 - }; - let T: u32 = if args.len() > 2 { - args[2].parse::().unwrap() - } else { - (N * 2) / 3 - }; - let K: u32 = if args.len() > 3 { - args[3].parse::().unwrap() - } else { - 4 - }; - - let mut rng = create_rng(); - let msg = "It was many and many a year ago".as_bytes(); - - println!("With N={N} T={T} K={K}:"); - - // v1 - #[cfg(feature = "with_v1")] - { - let signer_ids = gen_signer_ids(N, K); - let mut signers: Vec = signer_ids - .iter() - .enumerate() - .map(|(id, ids)| v1::Signer::new(id.try_into().unwrap(), ids, N, T, &mut rng)) - .collect(); - - let dkg_start = time::Instant::now(); - let polys = v1::test_helpers::dkg(&mut signers, &mut rng).expect("v1 dkg failed"); - let dkg_time = dkg_start.elapsed(); - let mut signers = signers[..(K * 3 / 4).try_into().unwrap()].to_vec(); - - let mut aggregator = v1::Aggregator::new(N, T); - aggregator.init(&polys).expect("aggregator init failed"); - - let party_sign_start = time::Instant::now(); - let (nonces, sig_shares) = v1::test_helpers::sign(msg, &mut signers, &mut rng); - let party_sign_time = party_sign_start.elapsed(); - - let group_sign_start = time::Instant::now(); - let _sig = aggregator - .sign(msg, &nonces, &sig_shares, &[]) - .expect("v1 group sign failed"); - let group_sign_time = group_sign_start.elapsed(); - - println!("v1 dkg time {}ms", dkg_time.as_millis()); - println!( - "v1 party sign time {}ms ({}ms/party)", - party_sign_time.as_millis(), - party_sign_time.as_millis() / (N as u128) - ); - println!("v1 group sign time {}ms", group_sign_time.as_millis()); - } - - // v2 - { - let signer_ids = gen_signer_ids(N, K); - let mut signers: Vec = signer_ids - .iter() - .enumerate() - .map(|(pid, pkids)| v2::Party::new(pid.try_into().unwrap(), pkids, K, N, T, &mut rng)) - .collect(); - - let dkg_start = time::Instant::now(); - let polys = v2::test_helpers::dkg(&mut signers, &mut rng).expect("v2 dkg failed"); - let dkg_time = dkg_start.elapsed(); - let mut signers = signers[..(K * 3 / 4).try_into().unwrap()].to_vec(); - - let mut aggregator = v2::Aggregator::new(N, T); - aggregator.init(&polys).expect("aggregator init failed"); - - let party_sign_start = time::Instant::now(); - let (nonces, sig_shares, key_ids) = v2::test_helpers::sign(msg, &mut signers, &mut rng); - let party_sign_time = party_sign_start.elapsed(); - - let group_sign_start = time::Instant::now(); - let _sig = aggregator - .sign(msg, &nonces, &sig_shares, &key_ids) - .expect("v2 group sign failed"); - let group_sign_time = group_sign_start.elapsed(); - - println!("v2 dkg time {}ms", dkg_time.as_millis()); - println!( - "v2 party sign time {}ms ({}ms/party)", - party_sign_time.as_millis(), - party_sign_time.as_millis() / (K as u128) - ); - println!("v2 group sign time {}ms", group_sign_time.as_millis()); - } -} diff --git a/src/state_machine/coordinator/fire.rs b/src/state_machine/coordinator/fire.rs index 32438836..60546b38 100644 --- a/src/state_machine/coordinator/fire.rs +++ b/src/state_machine/coordinator/fire.rs @@ -1857,7 +1857,6 @@ pub mod test { } /// test basic insertion and detection of duplicates for DkgPublicShares - #[allow(dead_code)] fn dkg_public_share() { let ctx = 0u64.to_be_bytes(); let mut rng = create_rng(); @@ -2079,7 +2078,6 @@ pub mod test { } /// test basic insertion and detection of duplicates for SignatureShareResponse - #[allow(dead_code)] fn sig_share() { let mut rng = create_rng(); let (coordinators, _) = setup::, Signer>(2, 1); diff --git a/src/state_machine/coordinator/mod.rs b/src/state_machine/coordinator/mod.rs index 69a46f87..ff261e57 100644 --- a/src/state_machine/coordinator/mod.rs +++ b/src/state_machine/coordinator/mod.rs @@ -360,7 +360,7 @@ pub trait Coordinator: Clone + Debug + PartialEq + StateMachine { /// Retrieve the current message bytes being signed fn get_message(&self) -> Vec; - /// Retrive the current state + /// Retrieve the current state fn get_state(&self) -> State; /// Trigger a DKG round, with an optional `dkg_id` diff --git a/src/state_machine/mod.rs b/src/state_machine/mod.rs index 5008af88..6831f384 100644 --- a/src/state_machine/mod.rs +++ b/src/state_machine/mod.rs @@ -145,7 +145,7 @@ impl std::fmt::Debug for PublicKeys { } } -/// State machine for a simple FROST coordinator +/// State machines for the FROST and FIRE coordinators pub mod coordinator; /// State machine for signers diff --git a/src/state_machine/signer/mod.rs b/src/state_machine/signer/mod.rs index 5d531fac..6dd44a4e 100644 --- a/src/state_machine/signer/mod.rs +++ b/src/state_machine/signer/mod.rs @@ -948,8 +948,6 @@ impl Signer { self.reset(dkg_begin.dkg_id, rng); self.move_to(State::DkgPublicDistribute)?; - //let _party_state = self.signer.save(); - self.dkg_public_begin(rng) } @@ -2051,7 +2049,6 @@ pub mod test { fn dkg_ended_v2() { dkg_ended::(); } - //use tracing_subscriber::{fmt, prelude::*, EnvFilter}; fn dkg_ended() { /*tracing_subscriber::registry() diff --git a/src/taproot.rs b/src/taproot.rs index cd699695..4c0ae11c 100644 --- a/src/taproot.rs +++ b/src/taproot.rs @@ -238,23 +238,14 @@ mod test { let P = Point::lift_x(&Q.x()).unwrap(); let R = Point::lift_x(&proof.r).unwrap(); let e = compute::challenge(&Q, &R, msg.as_bytes()); - //let e = c.clone(); let Rp = proof.s * G - e * P; assert!(Rp.has_even_y()); assert_eq!(Rp.x(), proof.r); } - /* - d = Scalar::random(&mut rng); - P = d * G; - e = Scalar::random(&mut rng); - Q = e * G; - */ let S = compute::tweaked_public_key(&P, None); println!("S.has_even_y {}", S.has_even_y()); let t = compute::tweak(&P, None); - //let d = if !P.has_even_y() || !S.has_even_y() { - //let d = if !S.has_even_y() { let d = if !P.has_even_y() { -d + t } else { d + t }; assert!((d * G).x() == S.x()); assert!((d * G) == S); @@ -271,7 +262,6 @@ mod test { let P = Point::lift_x(&S.x()).unwrap(); let R = Point::lift_x(&proof.r).unwrap(); let e = compute::challenge(&S, &R, msg.as_bytes()); - //let e = c.clone(); let Rp = proof.s * G - e * P; assert!(Rp.has_even_y()); assert_eq!(Rp.x(), proof.r); @@ -281,8 +271,6 @@ mod test { let T = compute::tweaked_public_key(&Q, None); println!("T.has_even_y {}", T.has_even_y()); let t = compute::tweak(&Q, None); - //let e = if !Q.has_even_y() || !T.has_even_y() { - //let e = if !T.has_even_y() { let e = if !Q.has_even_y() { -e + t } else { e + t }; assert!((e * G).x() == T.x()); assert!((e * G) == T); diff --git a/src/util.rs b/src/util.rs index 94f4fef3..b211163d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -33,7 +33,6 @@ pub fn expand_to_scalar(msg: &[u8], dst: &[u8]) -> Result Scalar { let h = hasher.clone(); diff --git a/src/v2.rs b/src/v2.rs index 5cf5c323..c01e4ef4 100644 --- a/src/v2.rs +++ b/src/v2.rs @@ -40,7 +40,7 @@ pub struct Party { impl fmt::Debug for Party { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Party") - .field("part_id", &self.party_id) + .field("party_id", &self.party_id) .field("key_ids", &self.key_ids) .field("num_keys", &self.num_keys) .field("num_parties", &self.num_parties) diff --git a/wsts.tex b/wsts.tex index e905ac44..2fd500a3 100644 --- a/wsts.tex +++ b/wsts.tex @@ -403,7 +403,7 @@ \section{ Performance } -The WSTS Rust reference implementation \cite{tmfrost} contains vanilla FROST in the v1 module, and WSTS in the v2 module. This crate contains criterion benchmarks for both v1 and v2. +The WSTS Rust reference implementation \cite{wstsimpl} contains vanilla FROST in the v1 module, and WSTS in the v2 module. This crate contains criterion benchmarks for both v1 and v2. The results are quite staggering. When testing DKG with $4$ signers and $20$ keys, v2 outperforms v1 by an order of magnitude: $53 ms$ per DKG round for v1 compared to $8.3 ms$ for v2. Similar speedups were noted for party signing and group signing. @@ -513,10 +513,10 @@ \section{ \emph{An Efficient and Secure Weighted Threshold Signcryption Scheme} Journal of Internet Technology, vol. 20, no. 5 , pp. 1523-1534, Sep. 2019 \texttt{https://jit.ndhu.edu.tw/article/view/2135} -\bibitem{tmfrost} +\bibitem{wstsimpl} Joey Yandle \emph{WSTS Reference Implementation} - \texttt{https://github.com/Trust-Machines/wsts} + \texttt{https://github.com/xoloki/wsts} \bibitem{roast} Tim Ruffing, Viktoria Ronge, Elliott Jin, Jonas Schneider-Bensch, Dominique Schroder From 038c57d0b2a4c28b37225436d504a04f320e7ec3 Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Wed, 18 Nov 2026 05:16:29 +0100 Subject: [PATCH 2/4] Correct USAGE.md: state machines verify packet signatures by default since #153 --- USAGE.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/USAGE.md b/USAGE.md index 92c3a711..c2084aa6 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,9 +1,18 @@ # Usage -Applications which use `WSTS` will typically run both `Signer` and `Coordinator` state machines, in order to be able to handle all parts of the protocol. Because of this, these state machines do not verify packets as they come in; this would lead to duplicate work, and require the state machines to have all keys in their configs, including knowing who is the active coordinator. This is out of scope for the library. Thus applications `must` verify packets before calling `process_message` on them. +Applications which use `WSTS` will typically run both `Signer` and `Coordinator` state machines, in order to be able to handle all parts of the protocol. -This addresses the audit critical issues [CR-01](https://github.com/xoloki/wsts/issues/66) and [CR-02](https://github.com/xoloki/wsts/issues/67). +## Packet verification +Both state machines verify the signature on each incoming `Packet`, and do so by default. The coordinator is controlled by `Config::verify_packet_sigs` and the signer by the public `Signer::verify_packet_sigs` field, which is persisted in `SavedState`; both are `true` unless you set them otherwise. + +Verification needs the state machine to know two things: the signer public keys, via `public_keys`, and the active coordinator's public key, via `coordinator_public_key`. Without the latter, `process` and `process_message` return `Error::MissingCoordinatorPublicKey`; a packet whose signature does not check out returns `Error::InvalidPacketSignature`. + +Set the flag to `false` if the calling application has already verified the packet, so the work is not done twice — an application running both state machines over the same packet stream would otherwise verify each packet twice. **If you disable verification, the application `must` verify packets itself before calling `process_message` on them.** + +This is what addresses the audit critical issues [CR-01](https://github.com/xoloki/wsts/issues/66) and [CR-02](https://github.com/xoloki/wsts/issues/67). Verification moved into the library in [#153](https://github.com/xoloki/wsts/pull/153); before that it was the application's responsibility in every case. + +## Random number generation To ensure flexibility, these state machines require the user to provide a random number generator (RNG) that implements the `RngCore` and `CryptoRng` traits. From eea540effc8e7ce542458af98d7341fea033950c Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Wed, 18 Nov 2026 05:25:03 +0100 Subject: [PATCH 3/4] Move the Safety section out of the README header into the body --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fbe749a3..1f7eb3f3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ -## Safety - -`WSTS` has been independently audited and was exercised in production by the [sBTC](https://github.com/stacks-sbtc/sbtc) system. **That is history, and it does not describe this code.** sBTC vendored `wsts` 14.0.0 into its own tree on 2026-03-02 ([sbtc#1938](https://github.com/stacks-sbtc/sbtc/commit/f43fd2d329d408d2be7055f7f4684c4bf42ad131)) and the two implementations have diverged in both directions since. sBTC removed the `v1` module and the bitcoin helpers and reworked polynomial-commitment validation; this crate has taken protocol changes their copy never received. Neither tree's audit or operational history transfers to the other. - -Modifying the protocol without a thorough cryptographic review is strongly discouraged and may be insecure. - # WSTS [![ci](https://github.com/xoloki/wsts/actions/workflows/ci.yml/badge.svg)](https://github.com/xoloki/wsts/actions/workflows/ci.yml) @@ -17,6 +11,12 @@ Second, in contrast to typical ```multisig``` protocols, ```WSTS``` produces a s Finally, ```WSTS``` is designed to build aggregate threshold signatures which are weighted, i.e. not all signers control the same number of keys. The ```threshold``` is a function of keys, so a set of signers meets the ```threshold``` if and only if the sum of the number of keys they control equals or exceeds the ```threshold```. +## Safety + +`WSTS` has been independently audited and was exercised in production by the [sBTC](https://github.com/stacks-sbtc/sbtc) system, but that is history and it does not describe this code. sBTC vendored `wsts` 14.0.0 into its own tree on 2026-03-02 ([sbtc#1938](https://github.com/stacks-sbtc/sbtc/commit/f43fd2d329d408d2be7055f7f4684c4bf42ad131)) and the two implementations have diverged in both directions since. sBTC removed the `v1` module and the bitcoin helpers and reworked polynomial-commitment validation; this crate has taken protocol changes their copy never received. Neither tree's audit or operational history transfers to the other. + +Modifying the protocol without a thorough cryptographic review is strongly discouraged and may be insecure. + ## Background ```WSTS``` is based on [```FROST```](https://eprint.iacr.org/2020/852.pdf), i.e. ```Flexible Round-Optimized Schnorr Threshold``` signatures. ```FROST``` provides a system where a number of ```parties```, each of which controls a single ```key```, can form an aggregate group signing key, after which a ```threshold``` number of them can cooperate to form a valid ```Schnorr``` signature. From 57c76c66e968653bf144936a0979de5d7d624155 Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Wed, 18 Nov 2026 05:35:02 +0100 Subject: [PATCH 4/4] Replace the vacuous RNG line in USAGE.md with a nonce-reuse warning --- USAGE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/USAGE.md b/USAGE.md index c2084aa6..d0b8a0df 100644 --- a/USAGE.md +++ b/USAGE.md @@ -64,4 +64,8 @@ let party = Party::new(party_id, &key_ids, num_parties, num_keys, threshold, &mu The `v1` module is behind the `with_v1` feature and is not built by default; `use wsts::v1::Signer` requires `--features with_v1`. -Ensure that you pass the RNG to all functions that require randomness. \ No newline at end of file +### Do not replay RNG state + +`WSTS` derives signing nonces with the hedged construction from [RFC 9591 section 4.1](https://datatracker.ietf.org/doc/rfc9591): each nonce is the hash of fresh RNG output together with the signer's secret key. The secret key is mixed in so that a poor RNG does not immediately yield a predictable nonce, but the nonce is still a function of the bytes your RNG produces. + +So never reuse or replay RNG state across signing rounds. Two rounds that draw the same bytes produce the same nonce, and two Schnorr signatures sharing a nonce reveal the signing key. This is why `create_rng` returns `OsRng` and why the example above seeds from entropy: neither is reproducible, deliberately. If you want a reproducible run, keep it to tests.