diff --git a/blssig/aggregation.go b/blssig/aggregation.go index 615dcad4..08c41f05 100644 --- a/blssig/aggregation.go +++ b/blssig/aggregation.go @@ -10,9 +10,9 @@ import ( "github.com/filecoin-project/go-f3/internal/measurements" "go.opentelemetry.io/otel/metric" - "github.com/drand/kyber" - "github.com/drand/kyber/sign" - "github.com/drand/kyber/sign/bdn" + "go.dedis.ch/kyber/v4" + "go.dedis.ch/kyber/v4/sign" + "go.dedis.ch/kyber/v4/sign/bdn" ) // Max size of the point cache. @@ -121,7 +121,7 @@ func (v *Verifier) Aggregate(pubkeys []gpbft.PubKey) (_agg gpbft.Aggregate, _err kPubkeys = append(kPubkeys, point.Clone()) } - mask, err := sign.NewMask(v.suite, kPubkeys, nil) + mask, err := sign.NewMask(kPubkeys, nil) if err != nil { return nil, fmt.Errorf("creating key mask: %w", err) } diff --git a/blssig/cache_test.go b/blssig/cache_test.go index 91d564f7..e66fa437 100644 --- a/blssig/cache_test.go +++ b/blssig/cache_test.go @@ -4,8 +4,8 @@ import ( "runtime" "testing" - bls12381 "github.com/drand/kyber-bls12381" - "github.com/drand/kyber/sign/bdn" + bls12381 "go.dedis.ch/kyber/v4/pairing/bls12381/kilic" + "go.dedis.ch/kyber/v4/sign/bdn" "github.com/stretchr/testify/require" "github.com/filecoin-project/go-f3/gpbft" diff --git a/blssig/signer.go b/blssig/signer.go index 9c3cf6f8..116c162a 100644 --- a/blssig/signer.go +++ b/blssig/signer.go @@ -5,9 +5,9 @@ import ( "context" "errors" - "github.com/drand/kyber" - bls12381 "github.com/drand/kyber-bls12381" - "github.com/drand/kyber/sign/bdn" + "go.dedis.ch/kyber/v4" + bls12381 "go.dedis.ch/kyber/v4/pairing/bls12381/kilic" + "go.dedis.ch/kyber/v4/sign/bdn" "github.com/filecoin-project/go-f3/gpbft" ) diff --git a/blssig/verifier.go b/blssig/verifier.go index ad6c746d..1dece32f 100644 --- a/blssig/verifier.go +++ b/blssig/verifier.go @@ -7,10 +7,9 @@ import ( "runtime/debug" "sync" - "github.com/drand/kyber" - bls12381 "github.com/drand/kyber-bls12381" - "github.com/drand/kyber/pairing" - "github.com/drand/kyber/sign/bdn" + "go.dedis.ch/kyber/v4" + bls12381 "go.dedis.ch/kyber/v4/pairing/bls12381/kilic" + "go.dedis.ch/kyber/v4/sign/bdn" "go.opentelemetry.io/otel/metric" "github.com/filecoin-project/go-f3/gpbft" @@ -18,7 +17,6 @@ import ( ) type Verifier struct { - suite pairing.Suite scheme *bdn.Scheme keyGroup kyber.Group @@ -29,7 +27,6 @@ type Verifier struct { func VerifierWithKeyOnG1() *Verifier { suite := bls12381.NewBLS12381Suite() return &Verifier{ - suite: suite, scheme: bdn.NewSchemeOnG2(suite), keyGroup: suite.G1(), } diff --git a/blssig/verifier_test.go b/blssig/verifier_test.go index bced0983..3622bef1 100644 --- a/blssig/verifier_test.go +++ b/blssig/verifier_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - bls12381 "github.com/drand/kyber-bls12381" - "github.com/drand/kyber/sign/bdn" + bls12381 "go.dedis.ch/kyber/v4/pairing/bls12381/kilic" + "go.dedis.ch/kyber/v4/sign/bdn" "github.com/stretchr/testify/require" ) diff --git a/go.mod b/go.mod index f5987118..0e7dcfa6 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,6 @@ go 1.22 require ( github.com/Kubuxu/go-broadcast v0.0.0-20240621161059-1a8c90734cd6 - github.com/drand/kyber v1.3.1 - github.com/drand/kyber-bls12381 v0.3.1 github.com/filecoin-project/go-bitfield v0.2.4 github.com/filecoin-project/go-clock v0.1.0 github.com/filecoin-project/go-state-types v0.14.0 @@ -21,6 +19,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.25.5 github.com/whyrusleeping/cbor-gen v0.1.1 + go.dedis.ch/kyber/v4 v4.0.0-00010101000000-000000000000 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/metric v1.28.0 go.uber.org/multierr v1.11.0 @@ -144,4 +143,4 @@ require ( lukechampine.com/blake3 v1.2.1 // indirect ) -replace github.com/drand/kyber => github.com/Stebalien/kyber v1.3.2-0.20240827162216-c96a0e427578 +replace go.dedis.ch/kyber/v4 => github.com/Stebalien/kyber/v4 v4.0.0-pre2.0.20240905225310-9acfb6fcce75 diff --git a/go.sum b/go.sum index 2c4cf26e..37dd68a0 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,8 @@ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGy github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Kubuxu/go-broadcast v0.0.0-20240621161059-1a8c90734cd6 h1:yh2/1fz3ajTaeKskSWxtSBNScdRZfQ/A5nyd9+64T6M= github.com/Kubuxu/go-broadcast v0.0.0-20240621161059-1a8c90734cd6/go.mod h1:5LOj/fF3Oc/cvJqzDiyfx4XwtBPRWUYEz+V+b13sH5U= -github.com/Stebalien/kyber v1.3.2-0.20240827162216-c96a0e427578 h1:dx1hCR7KbG1HbehvPPRJKExoI9COfy8eMg7sCidKJEs= -github.com/Stebalien/kyber v1.3.2-0.20240827162216-c96a0e427578/go.mod h1:f+mNHjiGT++CuueBrpeMhFNdKZAsy0tu03bKq9D5LPA= +github.com/Stebalien/kyber/v4 v4.0.0-pre2.0.20240905225310-9acfb6fcce75 h1:0SoYW75b+HfVy/bdgP8/gMWBNuUkiHsDpFuovFdRJfo= +github.com/Stebalien/kyber/v4 v4.0.0-pre2.0.20240905225310-9acfb6fcce75/go.mod h1:tg6jwKTYEjm94VxkFwiQy+ec9hoQvccIU989wNjXWVI= github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= @@ -51,8 +51,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3 github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/drand/kyber-bls12381 v0.3.1 h1:KWb8l/zYTP5yrvKTgvhOrk2eNPscbMiUOIeWBnmUxGo= -github.com/drand/kyber-bls12381 v0.3.1/go.mod h1:H4y9bLPu7KZA/1efDg+jtJ7emKx+ro3PU7/jWUVt140= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/gosigar v0.14.2 h1:Dg80n8cr90OZ7x+bAax/QjoW/XqTI11RmA79ZwIm9/4= diff --git a/sim/signing/bls.go b/sim/signing/bls.go index e9a3878d..54b7d673 100644 --- a/sim/signing/bls.go +++ b/sim/signing/bls.go @@ -5,9 +5,9 @@ import ( "errors" "sync" - bls12381 "github.com/drand/kyber-bls12381" - "github.com/drand/kyber/pairing" - "github.com/drand/kyber/sign/bdn" + bls12381 "go.dedis.ch/kyber/v4/pairing/bls12381/kilic" + "go.dedis.ch/kyber/v4/pairing" + "go.dedis.ch/kyber/v4/sign/bdn" "github.com/filecoin-project/go-f3/blssig" "github.com/filecoin-project/go-f3/gpbft" ) diff --git a/test/signing_suite_test.go b/test/signing_suite_test.go index 4b91f732..3af1e297 100644 --- a/test/signing_suite_test.go +++ b/test/signing_suite_test.go @@ -5,8 +5,8 @@ import ( "slices" "testing" - bls12381 "github.com/drand/kyber-bls12381" - "github.com/drand/kyber/sign/bdn" + bls12381 "go.dedis.ch/kyber/v4/pairing/bls12381/kilic" + "go.dedis.ch/kyber/v4/sign/bdn" "github.com/filecoin-project/go-f3/blssig" "github.com/filecoin-project/go-f3/gpbft" "github.com/filecoin-project/go-f3/sim/signing"