From f9ae2e1a420acb3813b4a5bd35bd3b8a5a836f10 Mon Sep 17 00:00:00 2001 From: vietddude Date: Sun, 30 Aug 2026 21:36:56 +0700 Subject: [PATCH 1/3] feat(tss): bump tss-lib v2.0.3 to v3.0.1 Migrate to fystack/tss-lib v3.0.1 (GG20 session binding + SRC-2026-573 hardening). Update module path v2->v3 across root and e2e modules. Adapt pkg/mpc/ckd.go to the v3 API change where ckd.ExtendedKey.PublicKey moved from *crypto.ECPoint to ecdsa.PublicKey; the ECDSA/EdDSA UpdateSinglePublicKeyAndAdjustBigXj helpers now take an ecdsa.PublicKey child key and convert internally. Compatibility with v2-generated wallets verified: - LocalPartySaveData JSON format unchanged; existing shares load and sign. - EdDSA CKD addresses unchanged (local reimpl already reduced IL mod N, which v3 now matches). Add regression tests: - pkg/ckdutil golden vectors pinning ECDSA/EdDSA child pubkeys so any future derivation drift fails loudly. - pkg/mpc CKD update-and-adjust invariants. Verified: unit tests + full e2e (keygen, signing, CKD signing, resharing) green on 3 v3 nodes. --- e2e/cmd/generate-preparams/main.go | 2 +- e2e/go.mod | 5 +- e2e/go.sum | 85 ++---------------------- examples/hdwallet/eddsa/main.go | 8 +-- go.mod | 5 +- go.sum | 85 ++---------------------- pkg/ckdutil/child_derivation_test.go | 8 +-- pkg/ckdutil/golden_compat_test.go | 71 ++++++++++++++++++++ pkg/identity/identity.go | 2 +- pkg/mpc/ckd.go | 34 ++++++---- pkg/mpc/ckd_update_test.go | 96 ++++++++++++++++++++++++++++ pkg/mpc/ecdsa_keygen_session.go | 4 +- pkg/mpc/ecdsa_resharing_session.go | 6 +- pkg/mpc/ecdsa_rounds.go | 8 +-- pkg/mpc/ecdsa_signing_session.go | 8 +-- pkg/mpc/eddsa_keygen_session.go | 4 +- pkg/mpc/eddsa_resharing_session.go | 6 +- pkg/mpc/eddsa_rounds.go | 8 +-- pkg/mpc/eddsa_signing_session.go | 8 +-- pkg/mpc/node.go | 4 +- pkg/mpc/party_id.go | 2 +- pkg/mpc/session.go | 4 +- pkg/security/zeroize.go | 4 +- pkg/security/zeroize_test.go | 4 +- pkg/types/tss.go | 2 +- pkg/types/tss_test.go | 2 +- 26 files changed, 249 insertions(+), 226 deletions(-) create mode 100644 pkg/ckdutil/golden_compat_test.go create mode 100644 pkg/mpc/ckd_update_test.go diff --git a/e2e/cmd/generate-preparams/main.go b/e2e/cmd/generate-preparams/main.go index 9b676d2a..8c40a239 100644 --- a/e2e/cmd/generate-preparams/main.go +++ b/e2e/cmd/generate-preparams/main.go @@ -19,7 +19,7 @@ import ( "path/filepath" "time" - "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" + "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" ) const numNodes = 3 diff --git a/e2e/go.mod b/e2e/go.mod index 75856958..161efed4 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -3,7 +3,7 @@ module github.com/fystack/mpcium/e2e go 1.25.8 require ( - github.com/bnb-chain/tss-lib/v2 v2.0.2 + github.com/bnb-chain/tss-lib/v3 v3.0.1 github.com/dgraph-io/badger/v4 v4.9.0 github.com/fystack/mpcium v0.0.0-00010101000000-000000000000 github.com/google/uuid v1.6.0 @@ -15,6 +15,7 @@ require ( require ( filippo.io/age v1.3.1 // indirect + filippo.io/bigmod v0.1.0 // indirect filippo.io/hpke v0.4.0 // indirect github.com/agl/ed25519 v0.0.0-20200225211852-fd4d107ace12 // indirect github.com/armon/go-metrics v0.4.1 // indirect @@ -104,4 +105,4 @@ replace github.com/fystack/mpcium => ../ replace github.com/agl/ed25519 => github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43 -replace github.com/bnb-chain/tss-lib/v2 => github.com/fystack/tss-lib/v2 v2.0.3 +replace github.com/bnb-chain/tss-lib/v3 => github.com/fystack/tss-lib/v3 v3.0.1 diff --git a/e2e/go.sum b/e2e/go.sum index a9fb6705..e8f37a16 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -3,6 +3,8 @@ c2sp.org/CCTV/age v0.0.0-20251208015420-e9274a7bdbfd/go.mod h1:SrHC2C7r5GkDk8R+N cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= filippo.io/age v1.3.1 h1:hbzdQOJkuaMEpRCLSN1/C5DX74RPcNCk6oqhKMXmZi0= filippo.io/age v1.3.1/go.mod h1:EZorDTYUxt836i3zdori5IJX/v2Lj6kWFU0cfh6C0D4= +filippo.io/bigmod v0.1.0 h1:UNzDk7y9ADKST+axd9skUpBQeW7fG2KrTZyOE4uGQy8= +filippo.io/bigmod v0.1.0/go.mod h1:OjOXDNlClLblvXdwgFFOQFJEocLhhtai8vGLy0JCZlI= filippo.io/hpke v0.4.0 h1:p575VVQ6ted4pL+it6M00V/f2qTZITO0zgmdKCkd5+A= filippo.io/hpke v0.4.0/go.mod h1:EmAN849/P3qdeK+PCMkDpDm83vRHM5cDipBJ8xbQLVY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -53,19 +55,10 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43 h1:Vkf7rtHx8uHx8gDfkQaCdVfc+gfrF9v6sR6xJy7RXNg= github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43/go.mod h1:TnVqVdGEK8b6erOMkcyYGWzCQMw7HEMCOw3BgFYCFWs= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.23.4/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.25.0 h1:JPbjwvHGpSywBRuorFFqTjaVP4y6Qw69XJ1nQ6MyWJM= github.com/btcsuite/btcd v0.25.0/go.mod h1:qbPE+pEiR9643E1s1xu57awsRhlCIm1ZIi6FfeRA4KE= -github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= -github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcec/v2 v2.3.6 h1:IzlsEr9olcSRKB/n7c4351F3xHKxS2lma+1UFGCYd4E= github.com/btcsuite/btcd/btcec/v2 v2.3.6/go.mod h1:m22FrOAiuxl/tht9wIqAoGHcbnCCaPWyauO8y2LGGtQ= -github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= -github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= @@ -74,9 +67,7 @@ github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2ut github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -85,22 +76,17 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/rand v1.0.1 h1:pYMgDRmRv1z1RNgAAs8izJstm4B+fLFiqGD5btOt2Wg= github.com/decred/dcrd/crypto/rand v1.0.1/go.mod h1:MsA2XySk/4KpCOYW6vsNYTGuOYRK1wpvulaWCuW7RyI= -github.com/decred/dcrd/dcrec/edwards/v2 v2.0.3/go.mod h1:AKpV6+wZ2MfPRJnTbQ6NPgWrKzbe9RCIlCF/FKzMtM8= github.com/decred/dcrd/dcrec/edwards/v2 v2.0.4 h1:xmmdtnGxF/Od2doiP56zBv5a3LgJ3PA6mlx3Luf622I= github.com/decred/dcrd/dcrec/edwards/v2 v2.0.4/go.mod h1:07Ke2V+uJkG72M1Eiek8CF6NUB3XPlZ38cIit57R0UU= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/dgraph-io/badger/v4 v4.9.0 h1:tpqWb0NewSrCYqTvywbcXOhQdWcqephkVkbBmaaqHzc= github.com/dgraph-io/badger/v4 v4.9.0/go.mod h1:5/MEx97uzdPUHR4KtkNt8asfI2T4JiEiQlV7kWUo8c0= github.com/dgraph-io/ristretto/v2 v2.4.0 h1:I/w09yLjhdcVD2QV192UJcq8dPBaAJb9pOuMyNy0XlU= @@ -115,11 +101,10 @@ github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/fystack/tss-lib/v2 v2.0.3 h1:A0HGL5GDPpKbNW+0ZXgv1Ri3+ks88AvxTS7OK40gnUY= -github.com/fystack/tss-lib/v2 v2.0.3/go.mod h1:s4LRfEqj89DhfNb+oraW0dURt5LtOHWXb9Gtkghn0L8= +github.com/fystack/tss-lib/v3 v3.0.1 h1:0pGxiJZfFMxScNvmrgoTKhbVUVlwhX0a6ihsK8Wo0Is= +github.com/fystack/tss-lib/v3 v3.0.1/go.mod h1:2YiekCEVQ+XNOq2ECsJDvYeGs1vgK+cfOHJ357XIWIk= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -148,8 +133,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v25.12.19+incompatible h1:haMV2JRRJCe1998HeW/p0X9UaMTK6SDo0ffLn2+DbLs= @@ -211,7 +194,6 @@ github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Ax github.com/ipfs/go-log/v2 v2.9.0 h1:l4b06AwVXwldIzbVPZy5z7sKp9lHFTX0KWfTBCtHaOk= github.com/ipfs/go-log/v2 v2.9.0/go.mod h1:UhIYAwMV7Nb4ZmihUxfIRM2Istw/y9cAk3xaK+4Zs2c= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -263,24 +245,13 @@ github.com/nats-io/nkeys v0.4.15 h1:JACV5jRVO9V856KOapQ7x+EY8Jo3qw1vJt/9Jpwzkk4= github.com/nats-io/nkeys v0.4.15/go.mod h1:CpMchTXC9fxA5zrMo4KpySxNjiDVvr8ANOSZdiNfUrs= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/jsonindent v0.0.0-20171116142732-447bf004320b/go.mod h1:SXIpH2WO0dyF5YBc6Iq8jc8TEJYe1Fk2Rc1EVYUdIgY= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E= github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/otiai10/primes v0.0.0-20210501021515-f1b2be525a11/go.mod h1:1DmRMnU78i/OVkMnHzvhXSi4p8IhYUmtLJWhyOavJc0= github.com/otiai10/primes v0.4.0 h1:RATMXrGz6bb8cs37DCDdHxbiJ8Jit3YLOD4wCDTkYEg= github.com/otiai10/primes v0.4.0/go.mod h1:UrIZFvOIqbXG0dvYr0EiZ9iMd+RdUSc7qs1+UwuzkBk= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -317,14 +288,12 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7 github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4= github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI= github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw= github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -338,28 +307,19 @@ github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= @@ -389,8 +349,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= @@ -399,11 +357,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -413,14 +368,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -431,8 +380,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -441,49 +388,29 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -494,8 +421,6 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -510,7 +435,6 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -529,7 +453,6 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/examples/hdwallet/eddsa/main.go b/examples/hdwallet/eddsa/main.go index 6ab69b27..f713cda6 100644 --- a/examples/hdwallet/eddsa/main.go +++ b/examples/hdwallet/eddsa/main.go @@ -11,8 +11,8 @@ import ( "syscall" "time" - tsscrypto "github.com/bnb-chain/tss-lib/v2/crypto" - "github.com/bnb-chain/tss-lib/v2/tss" + tsscrypto "github.com/bnb-chain/tss-lib/v3/crypto" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/btcsuite/btcutil/base58" "github.com/decred/dcrd/dcrec/edwards/v2" "github.com/fystack/mpcium/pkg/ckdutil" @@ -413,8 +413,8 @@ func deriveChildPublicKeyEd25519ViaTSS(masterPubKey []byte, chainCodeHex string, childPub := edwards.PublicKey{ Curve: tss.Edwards(), - X: childKey.PublicKey.X(), - Y: childKey.PublicKey.Y(), + X: childKey.PublicKey.X, + Y: childKey.PublicKey.Y, } return childPub.SerializeCompressed(), nil diff --git a/go.mod b/go.mod index 2d6dd8fe..3d1875e8 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.32.7 github.com/aws/aws-sdk-go-v2/credentials v1.19.7 github.com/aws/aws-sdk-go-v2/service/kms v1.49.5 - github.com/bnb-chain/tss-lib/v2 v2.0.2 + github.com/bnb-chain/tss-lib/v3 v3.0.1 github.com/btcsuite/btcd v0.25.0 github.com/btcsuite/btcd/btcec/v2 v2.3.6 github.com/btcsuite/btcutil v1.0.2 @@ -28,6 +28,7 @@ require ( ) require ( + filippo.io/bigmod v0.1.0 // indirect filippo.io/hpke v0.4.0 // indirect github.com/agl/ed25519 v0.0.0-20200225211852-fd4d107ace12 // indirect github.com/armon/go-metrics v0.4.1 // indirect @@ -103,4 +104,4 @@ require ( replace github.com/agl/ed25519 => github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43 -replace github.com/bnb-chain/tss-lib/v2 => github.com/fystack/tss-lib/v2 v2.0.3 +replace github.com/bnb-chain/tss-lib/v3 => github.com/fystack/tss-lib/v3 v3.0.1 diff --git a/go.sum b/go.sum index 91c05d3d..8a4cb4ad 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,8 @@ c2sp.org/CCTV/age v0.0.0-20251208015420-e9274a7bdbfd/go.mod h1:SrHC2C7r5GkDk8R+N cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= filippo.io/age v1.3.1 h1:hbzdQOJkuaMEpRCLSN1/C5DX74RPcNCk6oqhKMXmZi0= filippo.io/age v1.3.1/go.mod h1:EZorDTYUxt836i3zdori5IJX/v2Lj6kWFU0cfh6C0D4= +filippo.io/bigmod v0.1.0 h1:UNzDk7y9ADKST+axd9skUpBQeW7fG2KrTZyOE4uGQy8= +filippo.io/bigmod v0.1.0/go.mod h1:OjOXDNlClLblvXdwgFFOQFJEocLhhtai8vGLy0JCZlI= filippo.io/hpke v0.4.0 h1:p575VVQ6ted4pL+it6M00V/f2qTZITO0zgmdKCkd5+A= filippo.io/hpke v0.4.0/go.mod h1:EmAN849/P3qdeK+PCMkDpDm83vRHM5cDipBJ8xbQLVY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -53,19 +55,10 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43 h1:Vkf7rtHx8uHx8gDfkQaCdVfc+gfrF9v6sR6xJy7RXNg= github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43/go.mod h1:TnVqVdGEK8b6erOMkcyYGWzCQMw7HEMCOw3BgFYCFWs= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.23.4/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.25.0 h1:JPbjwvHGpSywBRuorFFqTjaVP4y6Qw69XJ1nQ6MyWJM= github.com/btcsuite/btcd v0.25.0/go.mod h1:qbPE+pEiR9643E1s1xu57awsRhlCIm1ZIi6FfeRA4KE= -github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= -github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcec/v2 v2.3.6 h1:IzlsEr9olcSRKB/n7c4351F3xHKxS2lma+1UFGCYd4E= github.com/btcsuite/btcd/btcec/v2 v2.3.6/go.mod h1:m22FrOAiuxl/tht9wIqAoGHcbnCCaPWyauO8y2LGGtQ= -github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= -github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= @@ -74,9 +67,7 @@ github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2ut github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -85,22 +76,17 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/rand v1.0.1 h1:pYMgDRmRv1z1RNgAAs8izJstm4B+fLFiqGD5btOt2Wg= github.com/decred/dcrd/crypto/rand v1.0.1/go.mod h1:MsA2XySk/4KpCOYW6vsNYTGuOYRK1wpvulaWCuW7RyI= -github.com/decred/dcrd/dcrec/edwards/v2 v2.0.3/go.mod h1:AKpV6+wZ2MfPRJnTbQ6NPgWrKzbe9RCIlCF/FKzMtM8= github.com/decred/dcrd/dcrec/edwards/v2 v2.0.4 h1:xmmdtnGxF/Od2doiP56zBv5a3LgJ3PA6mlx3Luf622I= github.com/decred/dcrd/dcrec/edwards/v2 v2.0.4/go.mod h1:07Ke2V+uJkG72M1Eiek8CF6NUB3XPlZ38cIit57R0UU= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/dgraph-io/badger/v4 v4.9.0 h1:tpqWb0NewSrCYqTvywbcXOhQdWcqephkVkbBmaaqHzc= github.com/dgraph-io/badger/v4 v4.9.0/go.mod h1:5/MEx97uzdPUHR4KtkNt8asfI2T4JiEiQlV7kWUo8c0= github.com/dgraph-io/ristretto/v2 v2.4.0 h1:I/w09yLjhdcVD2QV192UJcq8dPBaAJb9pOuMyNy0XlU= @@ -115,11 +101,10 @@ github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/fystack/tss-lib/v2 v2.0.3 h1:A0HGL5GDPpKbNW+0ZXgv1Ri3+ks88AvxTS7OK40gnUY= -github.com/fystack/tss-lib/v2 v2.0.3/go.mod h1:s4LRfEqj89DhfNb+oraW0dURt5LtOHWXb9Gtkghn0L8= +github.com/fystack/tss-lib/v3 v3.0.1 h1:0pGxiJZfFMxScNvmrgoTKhbVUVlwhX0a6ihsK8Wo0Is= +github.com/fystack/tss-lib/v3 v3.0.1/go.mod h1:2YiekCEVQ+XNOq2ECsJDvYeGs1vgK+cfOHJ357XIWIk= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -148,8 +133,6 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v25.12.19+incompatible h1:haMV2JRRJCe1998HeW/p0X9UaMTK6SDo0ffLn2+DbLs= @@ -211,7 +194,6 @@ github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Ax github.com/ipfs/go-log/v2 v2.9.0 h1:l4b06AwVXwldIzbVPZy5z7sKp9lHFTX0KWfTBCtHaOk= github.com/ipfs/go-log/v2 v2.9.0/go.mod h1:UhIYAwMV7Nb4ZmihUxfIRM2Istw/y9cAk3xaK+4Zs2c= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -265,24 +247,13 @@ github.com/nats-io/nkeys v0.4.15 h1:JACV5jRVO9V856KOapQ7x+EY8Jo3qw1vJt/9Jpwzkk4= github.com/nats-io/nkeys v0.4.15/go.mod h1:CpMchTXC9fxA5zrMo4KpySxNjiDVvr8ANOSZdiNfUrs= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/jsonindent v0.0.0-20171116142732-447bf004320b/go.mod h1:SXIpH2WO0dyF5YBc6Iq8jc8TEJYe1Fk2Rc1EVYUdIgY= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E= github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/otiai10/primes v0.0.0-20210501021515-f1b2be525a11/go.mod h1:1DmRMnU78i/OVkMnHzvhXSi4p8IhYUmtLJWhyOavJc0= github.com/otiai10/primes v0.4.0 h1:RATMXrGz6bb8cs37DCDdHxbiJ8Jit3YLOD4wCDTkYEg= github.com/otiai10/primes v0.4.0/go.mod h1:UrIZFvOIqbXG0dvYr0EiZ9iMd+RdUSc7qs1+UwuzkBk= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -319,14 +290,12 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7 github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4= github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI= github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw= github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -340,30 +309,21 @@ github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v3 v3.6.2 h1:lQuqiPrZ1cIz8hz+HcrG0TNZFxU70dPZ3Yl+pSrH9A8= github.com/urfave/cli/v3 v3.6.2/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= @@ -393,8 +353,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts= golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVos= golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= @@ -403,11 +361,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -417,14 +372,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -435,8 +384,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -445,49 +392,29 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.40.0 h1:36e4zGLqU4yhjlmxEaagx2KuYbJq3EwY8K943ZsHcvg= golang.org/x/term v0.40.0/go.mod h1:w2P8uVp06p2iyKKuvXIm7N/y0UCRt3UfJTfZ7oOpglM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -498,8 +425,6 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -514,7 +439,6 @@ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miE google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -531,7 +455,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/pkg/ckdutil/child_derivation_test.go b/pkg/ckdutil/child_derivation_test.go index b1268226..b04c37e7 100644 --- a/pkg/ckdutil/child_derivation_test.go +++ b/pkg/ckdutil/child_derivation_test.go @@ -4,8 +4,8 @@ import ( "encoding/hex" "testing" - tsscrypto "github.com/bnb-chain/tss-lib/v2/crypto" - "github.com/bnb-chain/tss-lib/v2/tss" + tsscrypto "github.com/bnb-chain/tss-lib/v3/crypto" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/btcsuite/btcd/btcec/v2" "github.com/decred/dcrd/dcrec/edwards/v2" "github.com/fystack/mpcium/pkg/mpc" @@ -42,7 +42,7 @@ func TestEd25519StandaloneMatchesTSS(t *testing.T) { _, tssChild, err := ckd.Derive("wallet-ed25519-test", masterPoint, path, tss.Edwards()) require.NoErrorf(t, err, "tss derivation failed at index %d", i) - tssPub := edwards.PublicKey{Curve: curve, X: tssChild.PublicKey.X(), Y: tssChild.PublicKey.Y()} + tssPub := edwards.PublicKey{Curve: curve, X: tssChild.PublicKey.X, Y: tssChild.PublicKey.Y} require.Equalf(t, tssPub.SerializeCompressed(), localChild, "pubkey mismatch at index %d", i) } } @@ -73,7 +73,7 @@ func TestSecp256k1StandaloneMatchesTSS(t *testing.T) { _, tssChild, err := ckd.Derive("wallet-secp-test", masterPoint, path, tss.S256()) require.NoErrorf(t, err, "tss derivation failed at index %d", i) - tssChildBytes := serializeCompressed(tssChild.PublicKey.X(), tssChild.PublicKey.Y()) + tssChildBytes := serializeCompressed(tssChild.PublicKey.X, tssChild.PublicKey.Y) require.Equalf(t, tssChildBytes, localChild, "pubkey mismatch at index %d", i) } } diff --git a/pkg/ckdutil/golden_compat_test.go b/pkg/ckdutil/golden_compat_test.go new file mode 100644 index 00000000..fb1f1dfe --- /dev/null +++ b/pkg/ckdutil/golden_compat_test.go @@ -0,0 +1,71 @@ +package ckdutil + +import ( + "encoding/hex" + "testing" + + tsscrypto "github.com/bnb-chain/tss-lib/v3/crypto" + "github.com/bnb-chain/tss-lib/v3/tss" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/decred/dcrd/dcrec/edwards/v2" + "github.com/fystack/mpcium/pkg/mpc" + "github.com/stretchr/testify/require" +) + +// goldenChainCode is a fixed chain code used to make the derivation outputs below +// fully deterministic and independent of any wallet state. +const goldenChainCode = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" + +// TestCKDGoldenVectors pins the exact compressed child public keys produced by +// mpc.CKD.Derive for a fixed master key (curve generator G), chain code and set +// of BIP32 paths. +// +// Why this test exists: +// Child wallet addresses are derived deterministically from the master public +// key + chain code via tss-lib's CKD. A change in the tss-lib CKD algorithm +// (for example the modulo-N reduction of IL that was introduced in the v2->v3 +// bump for Edwards curves) silently changes every derived address, which would +// make funds sent to previously-advertised addresses unspendable. These golden +// vectors were captured against github.com/fystack/tss-lib/v3 v3.0.1. If a +// future dependency bump changes any value here, this test MUST fail so the +// address-compatibility impact is reviewed explicitly rather than shipped +// silently. +func TestCKDGoldenVectors(t *testing.T) { + ckd, err := mpc.NewCKDFromHex(goldenChainCode) + require.NoError(t, err) + + t.Run("secp256k1", func(t *testing.T) { + s := btcec.S256() + master, err := tsscrypto.NewECPoint(s, s.Params().Gx, s.Params().Gy) + require.NoError(t, err) + + cases := map[string][]uint32{ + "0250390820cfe4ddbba5f230b99288b194177e928896802d5b3a745339ed55805f": {44, 60, 0, 0, 0}, + "02c8c491ebdaa1b7576cc3b72c457dad089e954a45f0e2d1b4006600cd72085194": {44, 60, 0, 0, 7}, + } + for want, path := range cases { + _, ek, err := ckd.Derive("golden-secp", master, path, tss.S256()) + require.NoErrorf(t, err, "derive path %v", path) + got := hex.EncodeToString(serializeCompressed(ek.PublicKey.X, ek.PublicKey.Y)) + require.Equalf(t, want, got, "secp256k1 child pubkey drift at path %v", path) + } + }) + + t.Run("ed25519", func(t *testing.T) { + e := edwards.Edwards() + master, err := tsscrypto.NewECPoint(e, e.Params().Gx, e.Params().Gy) + require.NoError(t, err) + + cases := map[string][]uint32{ + "cf7d5569333be69b5488e36dd2ee07cd7f4b068a287638d02a1958cd64011a64": {44, 501, 0, 0}, + "1b36b2acad34ac48134cd6f1fce6e1e9be975e6f33dfc39888aaee23e4918d6c": {44, 501, 7, 0}, + } + for want, path := range cases { + _, ek, err := ckd.Derive("golden-eddsa", master, path, tss.Edwards()) + require.NoErrorf(t, err, "derive path %v", path) + pk := edwards.PublicKey{Curve: e, X: ek.PublicKey.X, Y: ek.PublicKey.Y} + got := hex.EncodeToString(pk.SerializeCompressed()) + require.Equalf(t, want, got, "ed25519 child pubkey drift at path %v", path) + } + }) +} diff --git a/pkg/identity/identity.go b/pkg/identity/identity.go index 45d72234..94241464 100644 --- a/pkg/identity/identity.go +++ b/pkg/identity/identity.go @@ -15,7 +15,7 @@ import ( "syscall" "filippo.io/age" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/tss" "golang.org/x/term" "github.com/fystack/mpcium/pkg/common/pathutil" diff --git a/pkg/mpc/ckd.go b/pkg/mpc/ckd.go index 2b452b8b..9c03d988 100644 --- a/pkg/mpc/ckd.go +++ b/pkg/mpc/ckd.go @@ -1,16 +1,17 @@ package mpc import ( + "crypto/ecdsa" "crypto/elliptic" "encoding/hex" "errors" "fmt" "math/big" - "github.com/bnb-chain/tss-lib/v2/crypto" - "github.com/bnb-chain/tss-lib/v2/crypto/ckd" - ecdsaKeygen "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - eddsaKeygen "github.com/bnb-chain/tss-lib/v2/eddsa/keygen" + "github.com/bnb-chain/tss-lib/v3/crypto" + "github.com/bnb-chain/tss-lib/v3/crypto/ckd" + ecdsaKeygen "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + eddsaKeygen "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" "github.com/btcsuite/btcd/chaincfg" ) @@ -69,7 +70,12 @@ func (c *CKD) Derive(walletID string, masterPub *crypto.ECPoint, path []uint32, func (c *CKD) derivingPubkeyFromPath(masterPub *crypto.ECPoint, chainCode []byte, path []uint32, ec elliptic.Curve) (*big.Int, *ckd.ExtendedKey, error) { net := &chaincfg.MainNetParams parent := &ckd.ExtendedKey{ - PublicKey: masterPub, + // tss-lib v3 changed ExtendedKey.PublicKey from *crypto.ECPoint to ecdsa.PublicKey. + PublicKey: ecdsa.PublicKey{ + Curve: masterPub.Curve(), + X: masterPub.X(), + Y: masterPub.Y(), + }, Depth: 0, ChildIndex: 0, ChainCode: chainCode, @@ -85,15 +91,16 @@ func (c *CKD) derivingPubkeyFromPath(masterPub *crypto.ECPoint, chainCode []byte } // ECDSAUpdateSinglePublicKeyAndAdjustBigXj updates ECDSA public key and BigXj. -func (c *CKD) ECDSAUpdateSinglePublicKeyAndAdjustBigXj(delta *big.Int, key *ecdsaKeygen.LocalPartySaveData, childPk *crypto.ECPoint, ec elliptic.Curve) error { +func (c *CKD) ECDSAUpdateSinglePublicKeyAndAdjustBigXj(delta *big.Int, key *ecdsaKeygen.LocalPartySaveData, childPk ecdsa.PublicKey, ec elliptic.Curve) error { if key == nil { return ErrNilKey } - if childPk == nil { - return ErrNilPoint + childPoint, err := crypto.NewECPoint(ec, childPk.X, childPk.Y) + if err != nil { + return fmt.Errorf("invalid child public key: %w", err) } gDelta := crypto.ScalarBaseMult(ec, delta) - key.ECDSAPub = childPk + key.ECDSAPub = childPoint for i := range key.BigXj { updated, err := key.BigXj[i].Add(gDelta) if err != nil { @@ -105,15 +112,16 @@ func (c *CKD) ECDSAUpdateSinglePublicKeyAndAdjustBigXj(delta *big.Int, key *ecds } // EDDSAUpdateSinglePublicKeyAndAdjustBigXj updates EdDSA public key and BigXj. -func (c *CKD) EDDSAUpdateSinglePublicKeyAndAdjustBigXj(delta *big.Int, key *eddsaKeygen.LocalPartySaveData, childPk *crypto.ECPoint, ec elliptic.Curve) error { +func (c *CKD) EDDSAUpdateSinglePublicKeyAndAdjustBigXj(delta *big.Int, key *eddsaKeygen.LocalPartySaveData, childPk ecdsa.PublicKey, ec elliptic.Curve) error { if key == nil { return ErrNilKey } - if childPk == nil { - return ErrNilPoint + childPoint, err := crypto.NewECPoint(ec, childPk.X, childPk.Y) + if err != nil { + return fmt.Errorf("invalid child public key: %w", err) } gDelta := crypto.ScalarBaseMult(ec, delta) - key.EDDSAPub = childPk + key.EDDSAPub = childPoint for i := range key.BigXj { updated, err := key.BigXj[i].Add(gDelta) if err != nil { diff --git a/pkg/mpc/ckd_update_test.go b/pkg/mpc/ckd_update_test.go new file mode 100644 index 00000000..5fb83463 --- /dev/null +++ b/pkg/mpc/ckd_update_test.go @@ -0,0 +1,96 @@ +package mpc + +import ( + "crypto/ecdsa" + "math/big" + "testing" + + "github.com/bnb-chain/tss-lib/v3/crypto" + ecdsaKeygen "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + eddsaKeygen "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" + "github.com/bnb-chain/tss-lib/v3/tss" + "github.com/stretchr/testify/require" +) + +// These tests lock the behaviour of the CKD "update public key + adjust BigXj" +// helpers after the tss-lib v2 -> v3 migration, where ckd.ExtendedKey.PublicKey +// changed from *crypto.ECPoint to ecdsa.PublicKey and the helpers now accept an +// ecdsa.PublicKey child key. They verify the two invariants signing relies on: +// 1. the wallet public key is replaced by the derived child public key, and +// 2. every BigXj share point is shifted by delta*G, +// so a signature produced with the adjusted shares verifies against the child key. + +func TestECDSAUpdateSinglePublicKeyAndAdjustBigXj(t *testing.T) { + ec := tss.S256() + c := &CKD{} + + // Arbitrary starting share points: BigXj = [G, 2G]. + bigX0 := crypto.ScalarBaseMult(ec, big.NewInt(1)) + bigX1 := crypto.ScalarBaseMult(ec, big.NewInt(2)) + key := &ecdsaKeygen.LocalPartySaveData{} + key.BigXj = []*crypto.ECPoint{bigX0, bigX1} + key.ECDSAPub = crypto.ScalarBaseMult(ec, big.NewInt(9)) + + delta := big.NewInt(123456789) + gDelta := crypto.ScalarBaseMult(ec, delta) + + // child public key expressed as ecdsa.PublicKey, mirroring ckd.ExtendedKey in v3. + childPoint := crypto.ScalarBaseMult(ec, big.NewInt(777)) + childPk := ecdsa.PublicKey{Curve: ec, X: childPoint.X(), Y: childPoint.Y()} + + err := c.ECDSAUpdateSinglePublicKeyAndAdjustBigXj(delta, key, childPk, ec) + require.NoError(t, err) + + require.True(t, key.ECDSAPub.Equals(childPoint), "ECDSAPub must equal the child key") + + wantX0, err := bigX0.Add(gDelta) + require.NoError(t, err) + wantX1, err := bigX1.Add(gDelta) + require.NoError(t, err) + require.True(t, key.BigXj[0].Equals(wantX0), "BigXj[0] must be shifted by delta*G") + require.True(t, key.BigXj[1].Equals(wantX1), "BigXj[1] must be shifted by delta*G") +} + +func TestEDDSAUpdateSinglePublicKeyAndAdjustBigXj(t *testing.T) { + ec := tss.Edwards() + c := &CKD{} + + bigX0 := crypto.ScalarBaseMult(ec, big.NewInt(3)) + bigX1 := crypto.ScalarBaseMult(ec, big.NewInt(5)) + key := &eddsaKeygen.LocalPartySaveData{} + key.BigXj = []*crypto.ECPoint{bigX0, bigX1} + key.EDDSAPub = crypto.ScalarBaseMult(ec, big.NewInt(11)) + + delta := big.NewInt(424242) + gDelta := crypto.ScalarBaseMult(ec, delta) + + childPoint := crypto.ScalarBaseMult(ec, big.NewInt(88)) + childPk := ecdsa.PublicKey{Curve: ec, X: childPoint.X(), Y: childPoint.Y()} + + err := c.EDDSAUpdateSinglePublicKeyAndAdjustBigXj(delta, key, childPk, ec) + require.NoError(t, err) + + require.True(t, key.EDDSAPub.Equals(childPoint), "EDDSAPub must equal the child key") + + wantX0, err := bigX0.Add(gDelta) + require.NoError(t, err) + wantX1, err := bigX1.Add(gDelta) + require.NoError(t, err) + require.True(t, key.BigXj[0].Equals(wantX0), "BigXj[0] must be shifted by delta*G") + require.True(t, key.BigXj[1].Equals(wantX1), "BigXj[1] must be shifted by delta*G") +} + +// TestUpdateRejectsInvalidChildKey ensures a child key that is not on the curve +// is rejected rather than silently corrupting the stored share. +func TestUpdateRejectsInvalidChildKey(t *testing.T) { + ec := tss.S256() + c := &CKD{} + key := &ecdsaKeygen.LocalPartySaveData{} + key.BigXj = []*crypto.ECPoint{crypto.ScalarBaseMult(ec, big.NewInt(1))} + key.ECDSAPub = crypto.ScalarBaseMult(ec, big.NewInt(1)) + + // (2, 2) is not a point on secp256k1. + bad := ecdsa.PublicKey{Curve: ec, X: big.NewInt(2), Y: big.NewInt(2)} + err := c.ECDSAUpdateSinglePublicKeyAndAdjustBigXj(big.NewInt(1), key, bad, ec) + require.Error(t, err) +} diff --git a/pkg/mpc/ecdsa_keygen_session.go b/pkg/mpc/ecdsa_keygen_session.go index b55e56b9..c6b5e08b 100644 --- a/pkg/mpc/ecdsa_keygen_session.go +++ b/pkg/mpc/ecdsa_keygen_session.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/fystack/mpcium/pkg/encoding" "github.com/fystack/mpcium/pkg/identity" "github.com/fystack/mpcium/pkg/keyinfo" diff --git a/pkg/mpc/ecdsa_resharing_session.go b/pkg/mpc/ecdsa_resharing_session.go index 29f30e69..452b2f19 100644 --- a/pkg/mpc/ecdsa_resharing_session.go +++ b/pkg/mpc/ecdsa_resharing_session.go @@ -5,9 +5,9 @@ import ( "encoding/json" "fmt" - "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - "github.com/bnb-chain/tss-lib/v2/ecdsa/resharing" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + "github.com/bnb-chain/tss-lib/v3/ecdsa/resharing" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/fystack/mpcium/pkg/encoding" "github.com/fystack/mpcium/pkg/identity" "github.com/fystack/mpcium/pkg/keyinfo" diff --git a/pkg/mpc/ecdsa_rounds.go b/pkg/mpc/ecdsa_rounds.go index b7ddd2e9..fce77b1e 100644 --- a/pkg/mpc/ecdsa_rounds.go +++ b/pkg/mpc/ecdsa_rounds.go @@ -1,10 +1,10 @@ package mpc import ( - "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - "github.com/bnb-chain/tss-lib/v2/ecdsa/resharing" - "github.com/bnb-chain/tss-lib/v2/ecdsa/signing" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + "github.com/bnb-chain/tss-lib/v3/ecdsa/resharing" + "github.com/bnb-chain/tss-lib/v3/ecdsa/signing" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/fystack/mpcium/pkg/common/errors" ) diff --git a/pkg/mpc/ecdsa_signing_session.go b/pkg/mpc/ecdsa_signing_session.go index 5a555d57..f1496d9d 100644 --- a/pkg/mpc/ecdsa_signing_session.go +++ b/pkg/mpc/ecdsa_signing_session.go @@ -6,10 +6,10 @@ import ( "fmt" "math/big" - "github.com/bnb-chain/tss-lib/v2/common" - "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - "github.com/bnb-chain/tss-lib/v2/ecdsa/signing" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/common" + "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + "github.com/bnb-chain/tss-lib/v3/ecdsa/signing" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/fystack/mpcium/pkg/common/errors" "github.com/fystack/mpcium/pkg/event" "github.com/fystack/mpcium/pkg/identity" diff --git a/pkg/mpc/eddsa_keygen_session.go b/pkg/mpc/eddsa_keygen_session.go index deba0cc6..027b86e3 100644 --- a/pkg/mpc/eddsa_keygen_session.go +++ b/pkg/mpc/eddsa_keygen_session.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" - "github.com/bnb-chain/tss-lib/v2/eddsa/keygen" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/decred/dcrd/dcrec/edwards/v2" "github.com/fystack/mpcium/pkg/identity" "github.com/fystack/mpcium/pkg/keyinfo" diff --git a/pkg/mpc/eddsa_resharing_session.go b/pkg/mpc/eddsa_resharing_session.go index e5a892ec..8090aec1 100644 --- a/pkg/mpc/eddsa_resharing_session.go +++ b/pkg/mpc/eddsa_resharing_session.go @@ -4,9 +4,9 @@ import ( "encoding/json" "fmt" - "github.com/bnb-chain/tss-lib/v2/eddsa/keygen" - "github.com/bnb-chain/tss-lib/v2/eddsa/resharing" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" + "github.com/bnb-chain/tss-lib/v3/eddsa/resharing" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/decred/dcrd/dcrec/edwards/v2" "github.com/fystack/mpcium/pkg/identity" "github.com/fystack/mpcium/pkg/keyinfo" diff --git a/pkg/mpc/eddsa_rounds.go b/pkg/mpc/eddsa_rounds.go index 88864f31..17b323d5 100644 --- a/pkg/mpc/eddsa_rounds.go +++ b/pkg/mpc/eddsa_rounds.go @@ -1,10 +1,10 @@ package mpc import ( - "github.com/bnb-chain/tss-lib/v2/eddsa/keygen" - "github.com/bnb-chain/tss-lib/v2/eddsa/resharing" - "github.com/bnb-chain/tss-lib/v2/eddsa/signing" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" + "github.com/bnb-chain/tss-lib/v3/eddsa/resharing" + "github.com/bnb-chain/tss-lib/v3/eddsa/signing" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/fystack/mpcium/pkg/common/errors" ) diff --git a/pkg/mpc/eddsa_signing_session.go b/pkg/mpc/eddsa_signing_session.go index 8741c856..a94a50fb 100644 --- a/pkg/mpc/eddsa_signing_session.go +++ b/pkg/mpc/eddsa_signing_session.go @@ -5,10 +5,10 @@ import ( "fmt" "math/big" - "github.com/bnb-chain/tss-lib/v2/common" - "github.com/bnb-chain/tss-lib/v2/eddsa/keygen" - "github.com/bnb-chain/tss-lib/v2/eddsa/signing" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/common" + "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" + "github.com/bnb-chain/tss-lib/v3/eddsa/signing" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/decred/dcrd/dcrec/edwards/v2" "github.com/fystack/mpcium/pkg/common/errors" "github.com/fystack/mpcium/pkg/event" diff --git a/pkg/mpc/node.go b/pkg/mpc/node.go index 3910b6dd..be3b5b1c 100644 --- a/pkg/mpc/node.go +++ b/pkg/mpc/node.go @@ -6,8 +6,8 @@ import ( "slices" "time" - "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/fystack/mpcium/pkg/common/errors" "github.com/fystack/mpcium/pkg/identity" "github.com/fystack/mpcium/pkg/keyinfo" diff --git a/pkg/mpc/party_id.go b/pkg/mpc/party_id.go index e0c6b190..a391b2f5 100644 --- a/pkg/mpc/party_id.go +++ b/pkg/mpc/party_id.go @@ -6,7 +6,7 @@ import ( "math/big" "strings" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/google/uuid" ) diff --git a/pkg/mpc/session.go b/pkg/mpc/session.go index 1510848b..c81b4bc6 100644 --- a/pkg/mpc/session.go +++ b/pkg/mpc/session.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/fystack/mpcium/pkg/common/errors" "github.com/fystack/mpcium/pkg/identity" "github.com/fystack/mpcium/pkg/keyinfo" diff --git a/pkg/security/zeroize.go b/pkg/security/zeroize.go index c02c663c..86e4a0fa 100644 --- a/pkg/security/zeroize.go +++ b/pkg/security/zeroize.go @@ -3,8 +3,8 @@ package security import ( "math/big" - ecdsakeygen "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - eddsakeygen "github.com/bnb-chain/tss-lib/v2/eddsa/keygen" + ecdsakeygen "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + eddsakeygen "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" ) // ZeroEcdsaKeygenLocalPartySaveData securely zeros out sensitive fields in an ECDSA LocalPartySaveData struct. diff --git a/pkg/security/zeroize_test.go b/pkg/security/zeroize_test.go index 3dbb9f0d..658ef605 100644 --- a/pkg/security/zeroize_test.go +++ b/pkg/security/zeroize_test.go @@ -4,8 +4,8 @@ import ( "math/big" "testing" - ecdsakeygen "github.com/bnb-chain/tss-lib/v2/ecdsa/keygen" - eddsakeygen "github.com/bnb-chain/tss-lib/v2/eddsa/keygen" + ecdsakeygen "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" + eddsakeygen "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" ) func TestZeroBigInt_OverwritesBackingWords(t *testing.T) { x := new(big.Int).Lsh(big.NewInt(1), 2048) diff --git a/pkg/types/tss.go b/pkg/types/tss.go index ed574d73..ecdf0af8 100644 --- a/pkg/types/tss.go +++ b/pkg/types/tss.go @@ -3,7 +3,7 @@ package types import ( "encoding/json" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/tss" ) type TssMessage struct { diff --git a/pkg/types/tss_test.go b/pkg/types/tss_test.go index 9fa7fc6f..de4a8db3 100644 --- a/pkg/types/tss_test.go +++ b/pkg/types/tss_test.go @@ -3,7 +3,7 @@ package types import ( "testing" - "github.com/bnb-chain/tss-lib/v2/tss" + "github.com/bnb-chain/tss-lib/v3/tss" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) From bd6cca2ff9bdb6a92017ae521459aac588202d84 Mon Sep 17 00:00:00 2001 From: anhthii Date: Tue, 8 Sep 2026 22:15:47 +0700 Subject: [PATCH 2/3] (chore): bump version to v0.4.0 --- cmd/mpcium/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mpcium/main.go b/cmd/mpcium/main.go index f50d0af0..b8127ea3 100644 --- a/cmd/mpcium/main.go +++ b/cmd/mpcium/main.go @@ -33,7 +33,7 @@ import ( ) const ( - Version = "0.3.5" + Version = "0.4.0" DefaultBackupPeriodSeconds = 300 // (5 minutes) ) From 3a88aae4f2bf096b68e9224c95e3fb57e0084cdd Mon Sep 17 00:00:00 2001 From: anhthii Date: Tue, 8 Sep 2026 23:59:19 +0700 Subject: [PATCH 3/3] feat(mpc): bind keygen/signing/resharing to a per-ceremony session nonce tss-lib v3 mixes an optional session nonce into the SSID that every ZK proof is bound to (GG20 session binding). Without it, keygen and resharing run with ssidNonce = 0, so two ceremonies among the same node set share an SSID and a proof from one is valid in the other. Derive the nonce as SHA-256(domainTag || 0x1f || initiatorPayload), where initiatorPayload is the exact signed body of the initiator request (msg.Raw()). Every node already verifies the same signed request, so every node derives an identical nonce with no extra coordination round; the domain tag keeps keygen / signing / resharing nonces disjoint. - pkg/mpc/session_nonce.go: SessionNonceFromInitiator + newTSSParameters / newTSSReSharingParameters wrappers that require the nonce (fail-fast). - Thread sessionNonce through Create{KeyGen,Signing,Reshare}Session and the session constructors; KeyGenSession.Init() now returns error. - eventconsumer derives the nonce right after AuthorizeInitiatorMessage and handles the new Init() errors. No client-facing change: pkg/types wire messages are untouched, the nonce is derived server-side from fields the client already sends and signs. All nodes must upgrade together (mixed nonce/no-nonce nodes compute different SSIDs). --- pkg/eventconsumer/event_consumer.go | 46 ++++++++++++-- pkg/mpc/ecdsa_keygen_session.go | 13 +++- pkg/mpc/ecdsa_resharing_session.go | 15 ++++- pkg/mpc/ecdsa_signing_session.go | 7 +- pkg/mpc/eddsa_keygen_session.go | 11 +++- pkg/mpc/eddsa_resharing_session.go | 17 ++++- pkg/mpc/eddsa_signing_session.go | 7 +- pkg/mpc/node.go | 18 ++++-- pkg/mpc/session.go | 13 ++-- pkg/mpc/session_nonce.go | 99 +++++++++++++++++++++++++++++ pkg/mpc/session_nonce_test.go | 78 +++++++++++++++++++++++ 11 files changed, 300 insertions(+), 24 deletions(-) create mode 100644 pkg/mpc/session_nonce.go create mode 100644 pkg/mpc/session_nonce_test.go diff --git a/pkg/eventconsumer/event_consumer.go b/pkg/eventconsumer/event_consumer.go index f19d646e..143578cb 100644 --- a/pkg/eventconsumer/event_consumer.go +++ b/pkg/eventconsumer/event_consumer.go @@ -159,6 +159,15 @@ func (ec *eventConsumer) handleKeyGenEvent(natMsg *nats.Msg) { walletID := msg.WalletID + // Bind this ceremony's ZK proofs to a session-unique nonce, derived from the + // already-verified initiator request so every node computes the same value + // without a coordination round. + sessionNonce, err := mpc.SessionNonceFromInitiator(mpc.NonceDomainKeygen, &msg) + if err != nil { + ec.handleKeygenSessionError(walletID, err, "Failed to derive session nonce", natMsg) + return + } + // Attempt to get previously stored wallet creation result (if any) by the wallet ID storedWalletCreationResult, storedWalletCreationResultError := ec.node.GetWalletCreationResult(walletID) @@ -194,18 +203,24 @@ func (ec *eventConsumer) handleKeyGenEvent(natMsg *nats.Msg) { } defer ec.removeSession(walletID, "keygen") - ecdsaSession, err := ec.node.CreateKeyGenSession(mpc.SessionTypeECDSA, walletID, ec.mpcThreshold, ec.genKeyResultQueue) + ecdsaSession, err := ec.node.CreateKeyGenSession(mpc.SessionTypeECDSA, walletID, ec.mpcThreshold, ec.genKeyResultQueue, sessionNonce) if err != nil { ec.handleKeygenSessionError(walletID, err, "Failed to create ECDSA key generation session", natMsg) return } - eddsaSession, err := ec.node.CreateKeyGenSession(mpc.SessionTypeEDDSA, walletID, ec.mpcThreshold, ec.genKeyResultQueue) + eddsaSession, err := ec.node.CreateKeyGenSession(mpc.SessionTypeEDDSA, walletID, ec.mpcThreshold, ec.genKeyResultQueue, sessionNonce) if err != nil { ec.handleKeygenSessionError(walletID, err, "Failed to create EdDSA key generation session", natMsg) return } - ecdsaSession.Init() - eddsaSession.Init() + if err := ecdsaSession.Init(); err != nil { + ec.handleKeygenSessionError(walletID, err, "Failed to initialize ECDSA key generation session", natMsg) + return + } + if err := eddsaSession.Init(); err != nil { + ec.handleKeygenSessionError(walletID, err, "Failed to initialize EdDSA key generation session", natMsg) + return + } ctxEcdsa, doneEcdsa := context.WithCancel(baseCtx) ctxEddsa, doneEddsa := context.WithCancel(baseCtx) @@ -436,6 +451,19 @@ func (ec *eventConsumer) handleSigningEvent(natMsg *nats.Msg) { return } + sessionNonce, err := mpc.SessionNonceFromInitiator(mpc.NonceDomainSigning, &msg) + if err != nil { + ec.handleSigningSessionError( + msg.WalletID, + msg.TxID, + msg.NetworkInternalCode, + err, + "Failed to derive session nonce", + natMsg, + ) + return + } + var session mpc.SigningSession idempotentKey := composeSigningIdempotentKey(msg.TxID, natMsg) resultTopic := event.SigningResultSubject(natMsg.Header.Get(event.ClientIDHeader)) @@ -451,6 +479,7 @@ func (ec *eventConsumer) handleSigningEvent(natMsg *nats.Msg) { ec.signingResultQueue, msg.DerivationPath, idempotentKey, + sessionNonce, ) case types.KeyTypeEd25519: session, sessionErr = ec.node.CreateSigningSession( @@ -462,6 +491,7 @@ func (ec *eventConsumer) handleSigningEvent(natMsg *nats.Msg) { ec.signingResultQueue, msg.DerivationPath, idempotentKey, + sessionNonce, ) default: sessionErr = fmt.Errorf("unsupported key type: %v", msg.KeyType) @@ -676,6 +706,13 @@ func (ec *eventConsumer) consumeReshareEvent() error { return } + sessionNonce, err := mpc.SessionNonceFromInitiator(mpc.NonceDomainReshare, &msg) + if err != nil { + logger.Error("Failed to derive session nonce", err) + ec.handleReshareSessionError(msg.SessionID, walletID, keyType, msg.NewThreshold, err, "Failed to derive session nonce", natMsg) + return + } + createSession := func(isNewPeer bool) (mpc.ReshareSession, error) { return ec.node.CreateReshareSession( sessionType, @@ -684,6 +721,7 @@ func (ec *eventConsumer) consumeReshareEvent() error { msg.NodeIDs, isNewPeer, ec.reshareResultQueue, + sessionNonce, ) } diff --git a/pkg/mpc/ecdsa_keygen_session.go b/pkg/mpc/ecdsa_keygen_session.go index c6b5e08b..902a95d9 100644 --- a/pkg/mpc/ecdsa_keygen_session.go +++ b/pkg/mpc/ecdsa_keygen_session.go @@ -4,6 +4,7 @@ import ( "crypto/ecdsa" "encoding/json" "fmt" + "math/big" "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" "github.com/bnb-chain/tss-lib/v3/tss" @@ -19,7 +20,7 @@ import ( type KeyGenSession interface { Session - Init() + Init() error GenerateKey(done func()) GetPubKeyResult() []byte WaitForPeersReady() error @@ -43,6 +44,7 @@ func newECDSAKeygenSession( keyinfoStore keyinfo.Store, resultQueue messaging.MessageQueue, identityStore identity.Store, + sessionNonce *big.Int, ) *ecdsaKeygenSession { return &ecdsaKeygenSession{ session: session{ @@ -54,6 +56,7 @@ func newECDSAKeygenSession( participantPeerIDs: participantPeerIDs, selfPartyID: selfID, partyIDs: partyIDs, + sessionNonce: sessionNonce, outCh: make(chan tss.Message), ErrCh: make(chan error, 1), doneCh: make(chan struct{}), @@ -80,12 +83,16 @@ func newECDSAKeygenSession( } } -func (s *ecdsaKeygenSession) Init() { +func (s *ecdsaKeygenSession) Init() error { logger.Infof("Initializing session with partyID: %s, peerIDs %s", s.selfPartyID, s.partyIDs) ctx := tss.NewPeerContext(s.partyIDs) - params := tss.NewParameters(tss.S256(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold) + params, err := newTSSParameters(tss.S256(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold, s.sessionNonce) + if err != nil { + return fmt.Errorf("failed to build ECDSA keygen parameters: %w", err) + } s.party = keygen.NewLocalParty(params, s.outCh, s.endCh, *s.preParams) logger.Infof("[INITIALIZED] Initialized session successfully partyID: %s, peerIDs %s, walletID %s, threshold = %d", s.selfPartyID, s.partyIDs, s.walletID, s.threshold) + return nil } func (s *ecdsaKeygenSession) GenerateKey(done func()) { diff --git a/pkg/mpc/ecdsa_resharing_session.go b/pkg/mpc/ecdsa_resharing_session.go index 452b2f19..661fee75 100644 --- a/pkg/mpc/ecdsa_resharing_session.go +++ b/pkg/mpc/ecdsa_resharing_session.go @@ -4,6 +4,7 @@ import ( "crypto/ecdsa" "encoding/json" "fmt" + "math/big" "github.com/bnb-chain/tss-lib/v3/ecdsa/keygen" "github.com/bnb-chain/tss-lib/v3/ecdsa/resharing" @@ -33,7 +34,10 @@ type ecdsaReshareSession struct { oldPeerIDs []string newPeerIDs []string reshareParams *tss.ReSharingParameters - endCh chan *keygen.LocalPartySaveData + // paramsErr defers a session-nonce failure to Init, since the constructor + // cannot return an error. + paramsErr error + endCh chan *keygen.LocalPartySaveData } func NewECDSAReshareSession( @@ -54,6 +58,7 @@ func NewECDSAReshareSession( newPeerIDs []string, isNewParty bool, version int, + sessionNonce *big.Int, ) *ecdsaReshareSession { realPartyIDs := oldPartyIDs @@ -69,6 +74,7 @@ func NewECDSAReshareSession( participantPeerIDs: participantPeerIDs, selfPartyID: selfID, partyIDs: realPartyIDs, + sessionNonce: sessionNonce, outCh: make(chan tss.Message), ErrCh: make(chan error, 1), doneCh: make(chan struct{}), @@ -92,7 +98,7 @@ func NewECDSAReshareSession( sessionType: SessionTypeECDSA, identityStore: identityStore, } - reshareParams := tss.NewReSharingParameters( + reshareParams, paramsErr := newTSSReSharingParameters( tss.S256(), tss.NewPeerContext(oldPartyIDs), tss.NewPeerContext(newPartyIDs), @@ -101,6 +107,7 @@ func NewECDSAReshareSession( threshold, len(newPartyIDs), newThreshold, + sessionNonce, ) var oldPeerIDs []string @@ -111,6 +118,7 @@ func NewECDSAReshareSession( return &ecdsaReshareSession{ session: &session, reshareParams: reshareParams, + paramsErr: paramsErr, isNewParty: isNewParty, oldPeerIDs: oldPeerIDs, newPeerIDs: newPeerIDs, @@ -141,6 +149,9 @@ func (s *ecdsaReshareSession) GetLegacyCommitteePeers() []string { } func (s *ecdsaReshareSession) Init() error { + if s.paramsErr != nil { + return fmt.Errorf("failed to build ecdsa resharing parameters: %w", s.paramsErr) + } logger.Infof("Initializing ecdsa resharing session with partyID: %s, newPartyIDs %s", s.selfPartyID, s.partyIDs) var share keygen.LocalPartySaveData diff --git a/pkg/mpc/ecdsa_signing_session.go b/pkg/mpc/ecdsa_signing_session.go index f1496d9d..fc922eba 100644 --- a/pkg/mpc/ecdsa_signing_session.go +++ b/pkg/mpc/ecdsa_signing_session.go @@ -66,6 +66,7 @@ func newECDSASigningSession( derivationPath []uint32, idempotentKey string, ckd *CKD, + sessionNonce *big.Int, ) *ecdsaSigningSession { return &ecdsaSigningSession{ @@ -77,6 +78,7 @@ func newECDSASigningSession( participantPeerIDs: participantPeerIDs, selfPartyID: selfID, partyIDs: partyIDs, + sessionNonce: sessionNonce, outCh: make(chan tss.Message), ErrCh: make(chan error, 1), doneCh: make(chan struct{}), @@ -112,7 +114,10 @@ func newECDSASigningSession( func (s *ecdsaSigningSession) Init(tx *big.Int) error { logger.Infof("Initializing signing session with partyID: %s, peerIDs %s", s.selfPartyID, s.partyIDs) ctx := tss.NewPeerContext(s.partyIDs) - params := tss.NewParameters(tss.S256(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold) + params, err := newTSSParameters(tss.S256(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold, s.sessionNonce) + if err != nil { + return errors.Wrap(err, "Failed to build ECDSA signing parameters") + } keyInfo, err := s.keyinfoStore.Get(s.composeKey(s.walletID)) if err != nil { diff --git a/pkg/mpc/eddsa_keygen_session.go b/pkg/mpc/eddsa_keygen_session.go index 027b86e3..6cac96d5 100644 --- a/pkg/mpc/eddsa_keygen_session.go +++ b/pkg/mpc/eddsa_keygen_session.go @@ -3,6 +3,7 @@ package mpc import ( "encoding/json" "fmt" + "math/big" "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" "github.com/bnb-chain/tss-lib/v3/tss" @@ -32,6 +33,7 @@ func newEDDSAKeygenSession( keyinfoStore keyinfo.Store, resultQueue messaging.MessageQueue, identityStore identity.Store, + sessionNonce *big.Int, ) *eddsaKeygenSession { return &eddsaKeygenSession{session: session{ walletID: walletID, @@ -42,6 +44,7 @@ func newEDDSAKeygenSession( participantPeerIDs: participantPeerIDs, selfPartyID: selfID, partyIDs: partyIDs, + sessionNonce: sessionNonce, outCh: make(chan tss.Message), ErrCh: make(chan error, 1), doneCh: make(chan struct{}), @@ -67,12 +70,16 @@ func newEDDSAKeygenSession( } } -func (s *eddsaKeygenSession) Init() { +func (s *eddsaKeygenSession) Init() error { logger.Infof("Initializing session with partyID: %s, peerIDs %s", s.selfPartyID, s.partyIDs) ctx := tss.NewPeerContext(s.partyIDs) - params := tss.NewParameters(tss.Edwards(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold) + params, err := newTSSParameters(tss.Edwards(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold, s.sessionNonce) + if err != nil { + return fmt.Errorf("failed to build EdDSA keygen parameters: %w", err) + } s.party = keygen.NewLocalParty(params, s.outCh, s.endCh) logger.Infof("[INITIALIZED] Initialized session successfully partyID: %s, peerIDs %s, walletID %s, threshold = %d", s.selfPartyID, s.partyIDs, s.walletID, s.threshold) + return nil } func (s *eddsaKeygenSession) GenerateKey(done func()) { diff --git a/pkg/mpc/eddsa_resharing_session.go b/pkg/mpc/eddsa_resharing_session.go index 8090aec1..a4d1ad9a 100644 --- a/pkg/mpc/eddsa_resharing_session.go +++ b/pkg/mpc/eddsa_resharing_session.go @@ -3,6 +3,7 @@ package mpc import ( "encoding/json" "fmt" + "math/big" "github.com/bnb-chain/tss-lib/v3/eddsa/keygen" "github.com/bnb-chain/tss-lib/v3/eddsa/resharing" @@ -22,7 +23,10 @@ type eddsaReshareSession struct { oldPeerIDs []string newPeerIDs []string reshareParams *tss.ReSharingParameters - endCh chan *keygen.LocalPartySaveData + // paramsErr defers a session-nonce failure to Init, since the constructor + // cannot return an error. + paramsErr error + endCh chan *keygen.LocalPartySaveData } func NewEDDSAReshareSession( @@ -42,6 +46,7 @@ func NewEDDSAReshareSession( newPeerIDs []string, isNewParty bool, version int, + sessionNonce *big.Int, ) *eddsaReshareSession { realPartyIDs := oldPartyIDs @@ -58,6 +63,7 @@ func NewEDDSAReshareSession( participantPeerIDs: participantPeerIDs, selfPartyID: selfID, partyIDs: realPartyIDs, + sessionNonce: sessionNonce, outCh: make(chan tss.Message), ErrCh: make(chan error, 1), doneCh: make(chan struct{}), @@ -80,7 +86,7 @@ func NewEDDSAReshareSession( identityStore: identityStore, } - reshareParams := tss.NewReSharingParameters( + reshareParams, paramsErr := newTSSReSharingParameters( tss.Edwards(), tss.NewPeerContext(oldPartyIDs), tss.NewPeerContext(newPartyIDs), @@ -89,6 +95,7 @@ func NewEDDSAReshareSession( threshold, len(newPartyIDs), newThreshold, + sessionNonce, ) var oldPeerIDs []string @@ -99,6 +106,7 @@ func NewEDDSAReshareSession( return &eddsaReshareSession{ session: &session, reshareParams: reshareParams, + paramsErr: paramsErr, isNewParty: isNewParty, oldPeerIDs: oldPeerIDs, newPeerIDs: newPeerIDs, @@ -129,6 +137,9 @@ func (s *eddsaReshareSession) GetLegacyCommitteePeers() []string { } func (s *eddsaReshareSession) Init() error { + if s.paramsErr != nil { + return fmt.Errorf("failed to build eddsa resharing parameters: %w", s.paramsErr) + } logger.Infof("Initializing eddsa resharing session with partyID: %s, peerIDs %s", s.selfPartyID, s.partyIDs) var share keygen.LocalPartySaveData if s.isNewParty { @@ -161,7 +172,7 @@ func (s *eddsaReshareSession) Reshare(done func()) { if saveData.EDDSAPub != nil { defer security.ZeroEddsaKeygenLocalPartySaveData(saveData) - keyBytes, err := json.Marshal(saveData) + keyBytes, err := json.Marshal(saveData) if err != nil { s.ErrCh <- err return diff --git a/pkg/mpc/eddsa_signing_session.go b/pkg/mpc/eddsa_signing_session.go index a94a50fb..6009c5ef 100644 --- a/pkg/mpc/eddsa_signing_session.go +++ b/pkg/mpc/eddsa_signing_session.go @@ -50,6 +50,7 @@ func newEDDSASigningSession( derivationPath []uint32, idempotentKey string, ckd *CKD, + sessionNonce *big.Int, ) *eddsaSigningSession { return &eddsaSigningSession{ session: session{ @@ -60,6 +61,7 @@ func newEDDSASigningSession( participantPeerIDs: participantPeerIDs, selfPartyID: selfID, partyIDs: partyIDs, + sessionNonce: sessionNonce, outCh: make(chan tss.Message), ErrCh: make(chan error, 1), doneCh: make(chan struct{}), @@ -93,7 +95,10 @@ func newEDDSASigningSession( func (s *eddsaSigningSession) Init(tx *big.Int) error { logger.Infof("Initializing signing session with partyID: %s, peerIDs %s", s.selfPartyID, s.partyIDs) ctx := tss.NewPeerContext(s.partyIDs) - params := tss.NewParameters(tss.Edwards(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold) + params, err := newTSSParameters(tss.Edwards(), ctx, s.selfPartyID, len(s.partyIDs), s.threshold, s.sessionNonce) + if err != nil { + return errors.Wrap(err, "Failed to build EdDSA signing parameters") + } keyInfo, err := s.keyinfoStore.Get(s.composeKey(s.walletID)) if err != nil { diff --git a/pkg/mpc/node.go b/pkg/mpc/node.go index be3b5b1c..d365d470 100644 --- a/pkg/mpc/node.go +++ b/pkg/mpc/node.go @@ -3,6 +3,7 @@ package mpc import ( "encoding/json" "fmt" + "math/big" "slices" "time" @@ -83,6 +84,7 @@ func (p *Node) CreateKeyGenSession( walletID string, threshold int, resultQueue messaging.MessageQueue, + sessionNonce *big.Int, ) (KeyGenSession, error) { if !p.peerRegistry.ArePeersReady() { return nil, errors.New("All nodes are not ready!") @@ -95,15 +97,15 @@ func (p *Node) CreateKeyGenSession( switch sessionType { case SessionTypeECDSA: - return p.createECDSAKeyGenSession(walletID, threshold, DefaultVersion, resultQueue) + return p.createECDSAKeyGenSession(walletID, threshold, DefaultVersion, resultQueue, sessionNonce) case SessionTypeEDDSA: - return p.createEDDSAKeyGenSession(walletID, threshold, DefaultVersion, resultQueue) + return p.createEDDSAKeyGenSession(walletID, threshold, DefaultVersion, resultQueue, sessionNonce) default: return nil, fmt.Errorf("Unknown session type: %s", sessionType) } } -func (p *Node) createECDSAKeyGenSession(walletID string, threshold int, version int, resultQueue messaging.MessageQueue) (KeyGenSession, error) { +func (p *Node) createECDSAKeyGenSession(walletID string, threshold int, version int, resultQueue messaging.MessageQueue, sessionNonce *big.Int) (KeyGenSession, error) { readyPeerIDs := p.peerRegistry.GetReadyPeersIncludeSelf() selfPartyID, allPartyIDs := p.generatePartyIDs(PurposeKeygen, readyPeerIDs, version) session := newECDSAKeygenSession( @@ -119,11 +121,12 @@ func (p *Node) createECDSAKeyGenSession(walletID string, threshold int, version p.keyinfoStore, resultQueue, p.identityStore, + sessionNonce, ) return session, nil } -func (p *Node) createEDDSAKeyGenSession(walletID string, threshold int, version int, resultQueue messaging.MessageQueue) (KeyGenSession, error) { +func (p *Node) createEDDSAKeyGenSession(walletID string, threshold int, version int, resultQueue messaging.MessageQueue, sessionNonce *big.Int) (KeyGenSession, error) { readyPeerIDs := p.peerRegistry.GetReadyPeersIncludeSelf() selfPartyID, allPartyIDs := p.generatePartyIDs(PurposeKeygen, readyPeerIDs, version) session := newEDDSAKeygenSession( @@ -138,6 +141,7 @@ func (p *Node) createEDDSAKeyGenSession(walletID string, threshold int, version p.keyinfoStore, resultQueue, p.identityStore, + sessionNonce, ) return session, nil } @@ -151,6 +155,7 @@ func (p *Node) CreateSigningSession( resultQueue messaging.MessageQueue, derivationPath []uint32, idempotentKey string, + sessionNonce *big.Int, ) (SigningSession, error) { version := p.getVersion(sessionType, walletID) keyInfo, err := p.getKeyInfo(sessionType, walletID) @@ -201,6 +206,7 @@ func (p *Node) CreateSigningSession( derivationPath, idempotentKey, p.ckd, + sessionNonce, ), nil case SessionTypeEDDSA: @@ -222,6 +228,7 @@ func (p *Node) CreateSigningSession( derivationPath, idempotentKey, p.ckd, + sessionNonce, ), nil } @@ -267,6 +274,7 @@ func (p *Node) CreateReshareSession( newPeerIDs []string, isNewPeer bool, resultQueue messaging.MessageQueue, + sessionNonce *big.Int, ) (ReshareSession, error) { // 1. Check peer readiness count := p.peerRegistry.GetReadyPeersCount() @@ -382,6 +390,7 @@ func (p *Node) CreateReshareSession( newPeerIDs, isNewPeer, oldKeyInfo.Version, + sessionNonce, ), nil case SessionTypeEDDSA: @@ -402,6 +411,7 @@ func (p *Node) CreateReshareSession( newPeerIDs, isNewPeer, oldKeyInfo.Version, + sessionNonce, ), nil default: diff --git a/pkg/mpc/session.go b/pkg/mpc/session.go index c81b4bc6..5c065771 100644 --- a/pkg/mpc/session.go +++ b/pkg/mpc/session.go @@ -3,6 +3,7 @@ package mpc import ( "encoding/json" "fmt" + "math/big" "runtime/debug" "strings" "sync" @@ -65,10 +66,14 @@ type session struct { selfPartyID *tss.PartyID // IDs of all parties in the session including self partyIDs []*tss.PartyID - outCh chan tss.Message - ErrCh chan error - party tss.Party - version int + // sessionNonce binds every ZK proof in this ceremony to this session via + // tss-lib's SSID. Must be byte-identical across all parties; derived from the + // verified initiator request. See SessionNonceFromInitiator. + sessionNonce *big.Int + outCh chan tss.Message + ErrCh chan error + party tss.Party + version int // preParams is nil for EDDSA session preParams *keygen.LocalPreParams diff --git a/pkg/mpc/session_nonce.go b/pkg/mpc/session_nonce.go new file mode 100644 index 00000000..d9e31866 --- /dev/null +++ b/pkg/mpc/session_nonce.go @@ -0,0 +1,99 @@ +package mpc + +import ( + "crypto/elliptic" + "crypto/sha256" + "errors" + "fmt" + "math/big" + + "github.com/bnb-chain/tss-lib/v3/tss" + "github.com/fystack/mpcium/pkg/types" +) + +// NonceDomain is a domain-separation tag folded into a session nonce so a nonce +// derived for one ceremony type can never be valid in another. +type NonceDomain string + +const ( + NonceDomainKeygen NonceDomain = "mpcium/ssid-nonce/keygen/v1" + NonceDomainSigning NonceDomain = "mpcium/ssid-nonce/signing/v1" + NonceDomainReshare NonceDomain = "mpcium/ssid-nonce/reshare/v1" +) + +// nonceFieldSep separates the domain tag from the initiator payload in the hash +// input. 0x1f (unit separator) cannot appear in a domain tag. +var nonceFieldSep = []byte{0x1f} + +// ErrNilSessionNonce is returned when a session is built without the nonce that +// GG20 session binding requires. +var ErrNilSessionNonce = errors.New("session nonce is required") + +// SessionNonceFromInitiator derives the per-ceremony nonce that tss-lib v3 mixes +// into the SSID of every ZK proof, binding the proofs to this exact ceremony and +// preventing cross-session proof replay. +// +// It is SHA-256(domain || 0x1f || initiatorPayload), where initiatorPayload is +// the exact byte string the initiator signed (msg.Raw()). Every node +// independently verifies the same signed request, so every node derives an +// identical nonce with no extra coordination round; the domain tag keeps keygen, +// signing and resharing nonces disjoint. +// +// Per-ceremony uniqueness comes from the initiator payload: +// - keygen: the wallet ID +// - signing: key type + wallet ID + network + tx ID + tx + derivation path +// - reshare: the full resharing request, including its session ID +// +// Note: a keygen retried for the same wallet ID re-derives the same nonce. That +// still binds proofs across distinct concurrent ceremonies (the property GG20 +// needs); strict per-attempt uniqueness would require a nonce field in the +// signed keygen request. +func SessionNonceFromInitiator(domain NonceDomain, msg types.InitiatorMessage) (*big.Int, error) { + if msg == nil { + return nil, errors.New("session nonce: initiator message is nil") + } + raw, err := msg.Raw() + if err != nil { + return nil, fmt.Errorf("session nonce: read initiator payload: %w", err) + } + h := sha256.New() + h.Write([]byte(domain)) + h.Write(nonceFieldSep) + h.Write(raw) + // Positive 256-bit integer. tss-lib only hashes this value into the SSID, so + // there is no curve-order bound to respect. + return new(big.Int).SetBytes(h.Sum(nil)), nil +} + +// newTSSParameters builds tss-lib parameters with the session nonce applied. +// The nonce is mandatory: keygen and signing proofs must be session-bound. +func newTSSParameters( + ec elliptic.Curve, + ctx *tss.PeerContext, + partyID *tss.PartyID, + partyCount, threshold int, + sessionNonce *big.Int, +) (*tss.Parameters, error) { + if sessionNonce == nil { + return nil, ErrNilSessionNonce + } + params := tss.NewParameters(ec, ctx, partyID, partyCount, threshold) + params.SetSessionNonce(sessionNonce) + return params, nil +} + +// newTSSReSharingParameters is newTSSParameters for a resharing ceremony. +func newTSSReSharingParameters( + ec elliptic.Curve, + ctx, newCtx *tss.PeerContext, + partyID *tss.PartyID, + partyCount, threshold, newPartyCount, newThreshold int, + sessionNonce *big.Int, +) (*tss.ReSharingParameters, error) { + if sessionNonce == nil { + return nil, ErrNilSessionNonce + } + params := tss.NewReSharingParameters(ec, ctx, newCtx, partyID, partyCount, threshold, newPartyCount, newThreshold) + params.SetSessionNonce(sessionNonce) + return params, nil +} diff --git a/pkg/mpc/session_nonce_test.go b/pkg/mpc/session_nonce_test.go new file mode 100644 index 00000000..8ee55f37 --- /dev/null +++ b/pkg/mpc/session_nonce_test.go @@ -0,0 +1,78 @@ +package mpc + +import ( + "math/big" + "testing" + + "github.com/bnb-chain/tss-lib/v3/tss" + "github.com/fystack/mpcium/pkg/types" + "github.com/stretchr/testify/require" +) + +// TestSessionNonceDeterministic is the property every node relies on: the same +// signed initiator payload must yield a byte-identical nonce, or SSID-bound +// proofs fail verification across the cluster. +func TestSessionNonceDeterministic(t *testing.T) { + msg := &types.GenerateKeyMessage{WalletID: "wallet-abc", Signature: []byte("sig-a")} + other := &types.GenerateKeyMessage{WalletID: "wallet-abc", Signature: []byte("different-sig")} + + n1, err := SessionNonceFromInitiator(NonceDomainKeygen, msg) + require.NoError(t, err) + n2, err := SessionNonceFromInitiator(NonceDomainKeygen, other) + require.NoError(t, err) + + // Raw() excludes the signature, so nonce depends only on the signed payload. + require.Equal(t, 0, n1.Cmp(n2), "same wallet ID must give the same nonce regardless of signature bytes") + require.Positive(t, n1.Sign(), "nonce must be a positive integer") +} + +func TestSessionNonceUniquePerWallet(t *testing.T) { + a, err := SessionNonceFromInitiator(NonceDomainKeygen, &types.GenerateKeyMessage{WalletID: "wallet-a"}) + require.NoError(t, err) + b, err := SessionNonceFromInitiator(NonceDomainKeygen, &types.GenerateKeyMessage{WalletID: "wallet-b"}) + require.NoError(t, err) + require.NotEqual(t, 0, a.Cmp(b)) +} + +// TestSessionNonceDomainSeparation ensures a nonce derived for one ceremony type +// can never collide with another, even on structurally similar payloads. +func TestSessionNonceDomainSeparation(t *testing.T) { + keygen, err := SessionNonceFromInitiator(NonceDomainKeygen, &types.GenerateKeyMessage{WalletID: "w"}) + require.NoError(t, err) + reshare, err := SessionNonceFromInitiator(NonceDomainReshare, &types.ResharingMessage{WalletID: "w", SessionID: "s"}) + require.NoError(t, err) + signing, err := SessionNonceFromInitiator(NonceDomainSigning, &types.SignTxMessage{WalletID: "w", TxID: "t"}) + require.NoError(t, err) + + require.NotEqual(t, 0, keygen.Cmp(reshare)) + require.NotEqual(t, 0, keygen.Cmp(signing)) + require.NotEqual(t, 0, reshare.Cmp(signing)) +} + +func TestSessionNonceReshareVariesWithSessionID(t *testing.T) { + base := &types.ResharingMessage{WalletID: "w", SessionID: "s1", NodeIDs: []string{"n1", "n2"}, NewThreshold: 1} + retry := &types.ResharingMessage{WalletID: "w", SessionID: "s2", NodeIDs: []string{"n1", "n2"}, NewThreshold: 1} + + n1, err := SessionNonceFromInitiator(NonceDomainReshare, base) + require.NoError(t, err) + n2, err := SessionNonceFromInitiator(NonceDomainReshare, retry) + require.NoError(t, err) + require.NotEqual(t, 0, n1.Cmp(n2), "a fresh session ID must produce a fresh nonce") +} + +func TestNewTSSParametersRequiresNonce(t *testing.T) { + ctx := tss.NewPeerContext([]*tss.PartyID{}) + _, err := newTSSParameters(tss.S256(), ctx, nil, 3, 2, nil) + require.ErrorIs(t, err, ErrNilSessionNonce) + + _, err = newTSSReSharingParameters(tss.S256(), ctx, ctx, nil, 3, 2, 3, 2, nil) + require.ErrorIs(t, err, ErrNilSessionNonce) +} + +func TestNewTSSParametersSetsNonce(t *testing.T) { + nonce := big.NewInt(0xC0FFEE) + ctx := tss.NewPeerContext([]*tss.PartyID{}) + params, err := newTSSParameters(tss.S256(), ctx, nil, 3, 2, nonce) + require.NoError(t, err) + require.Equal(t, 0, params.SessionNonce().Cmp(nonce)) +}