diff --git a/crypto/bls12381.go b/crypto/bls12381.go new file mode 100644 index 0000000..a2b117d --- /dev/null +++ b/crypto/bls12381.go @@ -0,0 +1,183 @@ +package crypto + +import ( + "crypto/subtle" + "encoding/hex" + + "github.com/pkg/errors" + blst "github.com/supranational/blst/bindings/go" +) + +const ( + // BLSSecretKeyLength is the length of a BLS secret key in bytes + BLSSecretKeyLength = 32 + // BLSPubkeyLength is the length of a BLS public key in bytes + BLSPubkeyLength = 48 + // BLSAggregateSignatureLength is the length of a BLS aggregate signature in bytes + BLSAggregateSignatureLength = 96 +) + +var dst = []byte("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_") + +type ( + blstPublicKey = blst.P1Affine + blstSignature = blst.P2Affine + blstAggregateSignature = blst.P2Aggregate + blstAggregatePublicKey = blst.P1Aggregate +) + +type ( + // BLS12381PrivateKey represents a BLS12381 private key + BLS12381PrivateKey struct { + p *blst.SecretKey + } + // BLS12381PublicKey represents a BLS12381 public key + BLS12381PublicKey struct { + p *blstPublicKey + } + // BLSAggregateSignature represents an aggregated BLS signature + BLSAggregateSignature struct { + p *blstSignature + } +) + +// GenerateBLS12381PrivateKey generates a new BLS12381 private key from the given input key material (ikm). +func GenerateBLS12381PrivateKey(ikm []byte) (*BLS12381PrivateKey, error) { + if len(ikm) < 32 { + return nil, errors.Wrapf(ErrPrivateKey, "input key material must be at least 32 bytes, got %d bytes", len(ikm)) + } + priv := &BLS12381PrivateKey{ + p: blst.KeyGen(ikm), + } + if IsZero(priv.p.Serialize()) { + return nil, errors.Wrapf(ErrPrivateKey, "private key generation failed, resulting key is zero") + } + return priv, nil +} + +// BLS12381PrivateKeyFromBytes creates a BLS12381 private key from the given byte slice. +func BLS12381PrivateKeyFromBytes(b []byte) (*BLS12381PrivateKey, error) { + if len(b) != BLSSecretKeyLength { + return nil, errors.Wrapf(ErrPrivateKey, "invalid private key length: got %d, want %d", len(b), BLSSecretKeyLength) + } + if IsZero(b) { + return nil, errors.Wrapf(ErrPrivateKey, "private key is zero") + } + sk := new(blst.SecretKey).Deserialize(b) + if sk == nil { + return nil, errors.Wrapf(ErrPrivateKey, "invalid private key") + } + return &BLS12381PrivateKey{p: sk}, nil +} + +// Bytes returns the byte representation of the BLS12381 private key. +func (k *BLS12381PrivateKey) Bytes() []byte { + return k.p.Serialize() +} + +// HexString returns the hexadecimal string representation of the BLS12381 private key. +func (k *BLS12381PrivateKey) HexString() string { + return hex.EncodeToString(k.Bytes()) +} + +// Sign signs the given message using the BLS12381 private key. +func (k *BLS12381PrivateKey) Sign(msg []byte) ([]byte, error) { + signature := new(blstSignature).Sign(k.p, msg, dst) + return signature.Compress(), nil +} + +// PublicKey returns the public key corresponding to the BLS12381 private key. +func (k *BLS12381PrivateKey) PublicKey() *BLS12381PublicKey { + return &BLS12381PublicKey{ + p: new(blstPublicKey).From(k.p), + } +} + +// Zero clears the BLS12381 private key, effectively zeroizing it. +func (k *BLS12381PrivateKey) Zero() { + k.p.Zeroize() +} + +// BLS12381PublicKeyFromBytes creates a BLS12381 public key from the given byte slice. +func BLS12381PublicKeyFromBytes(b []byte) (*BLS12381PublicKey, error) { + if len(b) != BLSPubkeyLength { + return nil, errors.Wrapf(ErrPublicKey, "invalid public key length: got %d, want %d", len(b), BLSPubkeyLength) + } + pk := new(blstPublicKey).Uncompress(b) + if pk == nil { + return nil, errors.Wrapf(ErrPublicKey, "invalid public key") + } + if !pk.KeyValidate() { + return nil, errors.Wrapf(ErrPublicKey, "invalid public key, key validation failed") + } + return &BLS12381PublicKey{p: pk}, nil +} + +// Bytes returns the byte representation of the BLS12381 public key. +func (k *BLS12381PublicKey) Bytes() []byte { + return k.p.Compress() +} + +// HexString returns the hexadecimal string representation of the BLS12381 public key. +func (k *BLS12381PublicKey) HexString() string { + return hex.EncodeToString(k.Bytes()) +} + +// Verify verifies the given signature against the message using the BLS12381 public key. +func (k *BLS12381PublicKey) Verify(msg []byte, sig []byte) bool { + signature := new(blstSignature).Uncompress(sig) + if signature == nil { + return false + } + return signature.Verify(true, k.p, false, msg, dst) +} + +// NewBLSAggregateSignature aggregates multiple BLS signatures into a single signature. +func NewBLSAggregateSignature(sigs [][]byte) (*BLSAggregateSignature, error) { + signature := new(blstAggregateSignature) + valid := signature.AggregateCompressed(sigs, true) + if !valid { + return nil, errors.Wrapf(ErrSignature, "provided signatures fail the group check and cannot be compressed") + } + return &BLSAggregateSignature{p: signature.ToAffine()}, nil +} + +// BLSAggregateSignatureFromBytes creates a BLS aggregate signature from the given byte slice. +func BLSAggregateSignatureFromBytes(b []byte) (*BLSAggregateSignature, error) { + if len(b) != BLSAggregateSignatureLength { + return nil, errors.Wrapf(ErrSignature, "invalid aggregate signature length: got %d, want %d", len(b), BLSAggregateSignatureLength) + } + p := new(blstSignature).Uncompress(b) + if p == nil { + return nil, errors.Wrapf(ErrSignature, "invalid aggregate signature") + } + return &BLSAggregateSignature{p: p}, nil +} + +// Bytes returns the byte representation of the BLS aggregate signature. +func (s *BLSAggregateSignature) Bytes() []byte { + return s.p.Compress() +} + +// HexString returns the hexadecimal string representation of the BLS aggregate signature. +func (s *BLSAggregateSignature) HexString() string { + return hex.EncodeToString(s.Bytes()) +} + +// Verify verifies the aggregate signature against the given public keys and message. +func (s *BLSAggregateSignature) Verify(pubKeys []*BLS12381PublicKey, msg []byte) bool { + blstPubkeys := make([]*blstPublicKey, len(pubKeys)) + for i, pubKey := range pubKeys { + blstPubkeys[i] = pubKey.p + } + return s.p.FastAggregateVerify(true, blstPubkeys, msg, dst) +} + +// IsZero checks if the given byte slice is all zeros in constant time. +func IsZero(sKey []byte) bool { + b := byte(0) + for _, s := range sKey { + b |= s + } + return subtle.ConstantTimeByteEq(b, 0) == 1 +} diff --git a/crypto/bls12381_test.go b/crypto/bls12381_test.go new file mode 100644 index 0000000..1ebaa2d --- /dev/null +++ b/crypto/bls12381_test.go @@ -0,0 +1,291 @@ +package crypto + +import ( + "encoding/hex" + "testing" + + "github.com/iotexproject/go-pkgs/hash" + "github.com/stretchr/testify/require" +) + +func TestBLS12381CompatibilityEth(t *testing.T) { + r := require.New(t) + t.Run("privateKeyAndPublicKey", func(t *testing.T) { + cases := []struct { + ikm string + privateKey string + publicKey string + }{ + {ikm: "1a9ef39562fb483911451758f0d381bfb5d35081cf850433173a004049aa7552", + privateKey: "3794dfaa739d26ac8dcd106fdf637f8aef5d5dde20facd0da7ba1dcf6b1a572b", + publicKey: "966a25e30fc3ba7bac1abe1a04b757a80ec21e8da9907674c47d471c033d95014a871fdac1d4f3393c05d64f72243511"}, + {ikm: "cf0d37ca13a6a0ce67763a9f32accd016d68ab6975c03c44e6e5621aca094164", + privateKey: "4bebb18e9497002a0ba81d1a5ce1b3f9b9fc8527c8a46ff0a0219f3b3aebee5b", + publicKey: "937243f9c1e6b1f99fae5de153f0571e2d6b63320b409f3df87c52fbb24ce7b9c77c0330a8730ea89fc3bb2653607bf9"}, + {ikm: "9ee12ee0ec4729cc58c452269078fc17eee71947add87515557f5e0693148768", + privateKey: "0d798eac4b2da3c68830f33f8a3f08cd57ecaefc73e6a4e7004666199b3451f3", + publicKey: "83a53e77e141d498197c4dcefc857d3b6e0fa06f7b4ae1c08fb3aae831c75e45a87210a162ee9e516c96d10c8ec0a51f"}, + {ikm: "e719eacb17e6a4f05519cdaf1f52eab3cfbd574a557467943a4c82fc38466cb6", + privateKey: "2adf2d6a14f5ba2104b5a70e8da5c1a60ac249d1249db68a83519ce8b0eeef45", + publicKey: "8c68b3646579d510ed2e9716de5f70a96d2a97e8bd236dcfe8ce796aba12d18227030c9e1f692990a812813ca8b48364"}, + {ikm: "cb76b37510b45900b2f9c5f1ad9979a7522eb64a6638f128e740c909f0932cf0", + privateKey: "12fdede47dc18299ce9db67fb2b67182fc02727934b10ebfae122b4f8d0aebfd", + publicKey: "acc3d3d71b6c3cb31b7fa5c37e2d1eb2549cb42722e653a1ef483f8b74ca37903dc5bd0e8ef72eda8c424b304ffbd316"}, + } + for _, c := range cases { + // generate private key from ikm + ikm, err := hex.DecodeString(c.ikm) + r.NoError(err, "decoding ikm should not error") + priv, err := GenerateBLS12381PrivateKey(ikm) + r.NoError(err, "private key generation should not error") + // check private key + r.Equal(c.privateKey, priv.HexString(), "private key hex string should match expected") + expectBytes, err := hex.DecodeString(c.privateKey) + r.NoError(err, "decoding expected private key should not error") + r.Equal(expectBytes, priv.Bytes(), "private key bytes should match expected") + // derive and check public key + pub := priv.PublicKey() + r.Equal(c.publicKey, pub.HexString(), "public key hex string should match expected") + expectPubBytes, err := hex.DecodeString(c.publicKey) + r.NoError(err, "decoding expected public key should not error") + r.Equal(expectPubBytes, pub.Bytes(), "public key bytes should match expected") + // create private key from bytes + privFromBytes, err := BLS12381PrivateKeyFromBytes(priv.Bytes()) + r.NoError(err, "creating private key from bytes should not error") + r.Equal(priv.HexString(), privFromBytes.HexString(), "private key from bytes hex string should match") + r.Equal(priv.Bytes(), privFromBytes.Bytes(), "private key from bytes should match") + // create public key from bytes + pubFromBytes, err := BLS12381PublicKeyFromBytes(pub.Bytes()) + r.NoError(err, "creating public key from bytes should not error") + r.Equal(pub.HexString(), pubFromBytes.HexString(), "public key from bytes hex string should match") + r.Equal(pub.Bytes(), pubFromBytes.Bytes(), "public key from bytes should match") + } + }) + t.Run("signature", func(t *testing.T) { + cases := []struct { + privateKey string + msg string + signature string + }{ + {privateKey: "2d7afd069bf2b4c8ce02e8104e61e2db23adeb448e9698c43e84a0a797002892", + msg: "a4cd490a0924dc10aaa96c352d6513264d6cfabb22b167ddfcd13ca293cc2867", + signature: "a7f2ff330aa2b70e9ae3ff8418384815e6ed76e25b315894bdee012a583ed98406fa62b206edf76f0b32d3cf04c60bf100fd16d3a777a2b348104f65c5e0f57add8af17f0c20f343834e36f8f5ffccbf6d5844919752d86b9c554a238444aa5c"}, + {privateKey: "629e123505db736cf74de16cb55b155ef72f03bdc171764c77eedc72b8f8215b", + msg: "e4911fdb384a736a06268083c87d576a296c0232835ac80e478f4cf7a7d0610e", + signature: "84be624cb08e082a95c314008520f450707064a30aeb7a1c507f0c0b779397f25c0f402adefb346075e2bd4097a2fd631454dfb31c9715b7d478600b340c57053da2acf09a0247e8b56060721954f5727cee2ebe8381eac1e256be8ca5b94251"}, + } + for _, c := range cases { + // sign the message + privKeyBytes, err := hex.DecodeString(c.privateKey) + r.NoError(err, "decoding private key should not error") + priv, err := BLS12381PrivateKeyFromBytes(privKeyBytes) + r.NoError(err, "private key generation should not error") + msgBytes, err := hex.DecodeString(c.msg) + r.NoError(err, "decoding message should not error") + sig, err := priv.Sign(msgBytes) + r.NoError(err, "signing should not error") + r.Equal(c.signature, hex.EncodeToString(sig), "signature hex string should match expected") + // verify the signature + pub := priv.PublicKey() + r.True(pub.Verify(msgBytes, sig), "signature should be valid") + } + }) + t.Run("aggregateSignature", func(t *testing.T) { + cases := []struct { + msg string + pubkeys []string + signatures []string + aggregate string + }{ + { + msg: "813eab1bc4999dda23dd7e3d556d15fb02c23c9cce59fae5156d97ff453915a9", + pubkeys: []string{ + "ad5b9a812c121e0b06b52ce2ff3d1879fc4e8386d3f7aa2926b25d40d966031f13f98ff804a4e2ee188c9d9fc815a1d2", + "a06d81d1bc33d6eaa8d5254d17e8521d26887077a55f00358daac76629ef662f0ea48b05ac3f46fbed2f18c909dd6526", + "8d4ac523a5ec3dfbee4d1ed69c82f50ae13c9764a42dbf1f0530e19909a5baed6c2a0813e3fd7720ddf3980172fb477b", + "93b7f26176aa97f76476396ed8b695c2e0f559ad7bed50233e542f604510d30c4fdd42a8df78062e36da7db5c86a0252", + "84308af049bbc88e33a8a6f1bb5d92039c8f8106b1adab34c22c04864f8ee1fa530676c00bbcffd65d18017452974493", + }, + signatures: []string{ + "a60e5fa25333fd52875cd56715387c673fb8514284f71ef8fd24bc5f3446aa9f9d7017d594430da105f1d2030ac802eb000976682ed19baa04e649069905561003a430a193f430d10c3f8cc4cff6ab81821b4c4d4ec93d964938da472c474023", + "965c555db62c4056340f819c7b34ef93999c50ea508909aa266d21e7bcfb43e31a7a5f0815d207742703af2a6ed1d481081f7e0edccb25b0974cac99c6a8d6c73b70c3d219538d3578281878f309b960a214d9482a874627c3c7368548f28637", + "ab7c0c75923974160959bfd3b3c1856feec7fb5e998d9b8fa93f132774c9017a12181fad340a642cb6022556b5d65f0710b0ac2337655a980e55cdfe0d90cdea4832c5d62ff19a5da196af67df6b87ca0d877d61ddc6fb9d2d7ccff4a5649a52", + "8e1bbe115f6d4209928561fd667fca15a950e3d1b0fa8299e9cbc592a93ae439f26ea26f448451e1637689d19139e66c00770bdce20fb82869865a709f868dc77307a23862b5267537c8e5f5a7fd8d91580d57da1e57458fc805834311c79871", + "8ead132c26c914953dd619947ee6b6a80caa1dbe4ec0bf832819cc2a2d7cac14db68d10ad88246e6486b6832e00e3b7100550402a38b837498358b96c23949c5ddd47cf3532e6a958d8187c34723b35ec79b8f9fb213a56204c91b9955f8d2ca", + }, + aggregate: "a226c93260a62bc95dbddfe81b128f943d8db79931ca08d46aa7fb6720ea639fe6de056ba4a24a79ccf796eac974d86106353141aa6bdb6c79b53987b9823ab5ecffb2b9e1f5cf88f42b2e62136ecb867af9894c067ba7bb66981f043b4ceb38", + }, + } + for _, c := range cases { + // aggregate the signatures + var sigs [][]byte + for _, s := range c.signatures { + sigBytes, err := hex.DecodeString(s) + r.NoError(err, "decoding signature should not error") + sigs = append(sigs, sigBytes) + } + aggSig, err := NewBLSAggregateSignature(sigs) + r.NoError(err, "aggregating signatures should not error") + r.Equal(c.aggregate, aggSig.HexString(), "aggregate signature hex string should match expected") + // from bytes + aggSigFromBytes, err := BLSAggregateSignatureFromBytes(aggSig.Bytes()) + r.NoError(err, "creating aggregate signature from bytes should not error") + r.Equal(aggSig.HexString(), aggSigFromBytes.HexString(), "aggregate signature from bytes hex string should match") + r.Equal(aggSig.Bytes(), aggSigFromBytes.Bytes(), "aggregate signature from bytes should match") + // verify the aggregate signature + var pubKeys []*BLS12381PublicKey + for _, pk := range c.pubkeys { + pkBytes, err := hex.DecodeString(pk) + r.NoError(err, "decoding public key should not error") + pubKey, err := BLS12381PublicKeyFromBytes(pkBytes) + r.NoError(err, "creating public key from bytes should not error") + pubKeys = append(pubKeys, pubKey) + } + msgBytes, err := hex.DecodeString(c.msg) + r.NoError(err, "decoding message should not error") + r.True(aggSig.Verify(pubKeys, msgBytes), "aggregate signature should be valid") + } + }) +} + +// BenchmarkBLS12381Sign benchmarks the BLS12381 signing operation +func BenchmarkBLS12381Sign(b *testing.B) { + // Generate a test private key + ikm := make([]byte, 32) + for i := range ikm { + ikm[i] = byte(i) + } + + priv, err := GenerateBLS12381PrivateKey(ikm) + if err != nil { + b.Fatalf("Failed to generate private key: %v", err) + } + + // Create a test message + msg := hash.Hash160b([]byte("test message for benchmarking")) + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + _, err := priv.Sign(msg[:]) + if err != nil { + b.Fatalf("Failed to sign message: %v", err) + } + } +} + +// BenchmarkBLS12381Verify benchmarks the BLS12381 signature verification operation +func BenchmarkBLS12381Verify(b *testing.B) { + // Generate a test private key + ikm := make([]byte, 32) + for i := range ikm { + ikm[i] = byte(i) + } + + priv, err := GenerateBLS12381PrivateKey(ikm) + if err != nil { + b.Fatalf("Failed to generate private key: %v", err) + } + + pub := priv.PublicKey() + + // Create a test message and sign it + msg := hash.Hash160b([]byte("test message for benchmarking")) + sig, err := priv.Sign(msg[:]) + if err != nil { + b.Fatalf("Failed to sign message: %v", err) + } + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + if !pub.Verify(msg[:], sig) { + b.Fatalf("Failed to verify signature") + } + } +} + +// BenchmarkBLSAggregateSignature benchmarks the BLS signature aggregation operation +func BenchmarkBLSAggregateSignature(b *testing.B) { + // Generate multiple signatures for aggregation + numSigs := 24 + var signatures [][]byte + msg := hash.Hash160b([]byte("test message for benchmarking")) + + for i := 0; i < numSigs; i++ { + ikm := make([]byte, 32) + for j := range ikm { + ikm[j] = byte(i*32 + j) + } + + priv, err := GenerateBLS12381PrivateKey(ikm) + if err != nil { + b.Fatalf("Failed to generate private key %d: %v", i, err) + } + + sig, err := priv.Sign(msg[:]) + if err != nil { + b.Fatalf("Failed to sign message %d: %v", i, err) + } + + signatures = append(signatures, sig) + } + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + _, err := NewBLSAggregateSignature(signatures) + if err != nil { + b.Fatalf("Failed to aggregate signatures: %v", err) + } + } +} + +// BenchmarkBLSAggregateVerify benchmarks the BLS aggregate signature verification operation +func BenchmarkBLSAggregateVerify(b *testing.B) { + // Generate multiple key pairs and signatures for aggregate verification + numSigs := 24 + var signatures [][]byte + var pubKeys []*BLS12381PublicKey + msg := hash.Hash160b([]byte("test message for benchmarking")) + + for i := 0; i < numSigs; i++ { + ikm := make([]byte, 32) + for j := range ikm { + ikm[j] = byte(i*32 + j) + } + + priv, err := GenerateBLS12381PrivateKey(ikm) + if err != nil { + b.Fatalf("Failed to generate private key %d: %v", i, err) + } + + pub := priv.PublicKey() + pubKeys = append(pubKeys, pub) + + sig, err := priv.Sign(msg[:]) + if err != nil { + b.Fatalf("Failed to sign message %d: %v", i, err) + } + + signatures = append(signatures, sig) + } + + aggSign, err := NewBLSAggregateSignature(signatures) + if err != nil { + b.Fatalf("Failed to aggregate signatures: %v", err) + } + + b.ResetTimer() + b.ReportAllocs() + + for i := 0; i < b.N; i++ { + valid := aggSign.Verify(pubKeys, msg[:]) + if !valid { + b.Fatalf("Aggregate signature verification failed") + } + } +} diff --git a/crypto/key.go b/crypto/key.go index 2917d07..0955904 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -10,9 +10,9 @@ import ( "encoding/hex" "io/ioutil" + "github.com/erigontech/secp256k1" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" - "github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/iotexproject/iotex-address/address" "github.com/pkg/errors" @@ -40,6 +40,8 @@ var ( ErrPublicKey = errors.New("invalid public key") // ErrPrivateKey indicates the error of private key ErrPrivateKey = errors.New("invalid private key") + // ErrSignature indicates the error of signature + ErrSignature = errors.New("invalid signature") ) type ( diff --git a/go.mod b/go.mod index 09ba929..c65f5b3 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21.11 require ( github.com/cespare/cp v1.1.1 // indirect github.com/dustinxie/gmsm v1.4.0 + github.com/erigontech/secp256k1 v1.1.0 github.com/ethereum/go-ethereum v1.10.26 github.com/iotexproject/iotex-address v0.2.7 github.com/pkg/errors v0.9.1 @@ -12,6 +13,8 @@ require ( golang.org/x/net v0.21.0 ) +require github.com/supranational/blst v0.3.15 + require ( github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect @@ -27,13 +30,10 @@ require ( github.com/holiman/uint256 v1.2.4 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/supranational/blst v0.3.11 // indirect golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/lint v0.0.0-20241112194109-818c5a804067 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.28.0 // indirect - golang.org/x/tools v0.15.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 6bd63f8..0bf7b93 100644 --- a/go.sum +++ b/go.sum @@ -47,6 +47,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/dustinxie/gmsm v1.4.0 h1:6nksaLOaQZ3jWsiOngxuLxqF1lMnx1kOkBSzu1q5b5A= github.com/dustinxie/gmsm v1.4.0/go.mod h1:RXcL1h0Punq69MHL2yZrWYCDFPbqxrXCZiZvZnKjGUI= +github.com/erigontech/secp256k1 v1.1.0 h1:mO3YJMUSoASE15Ya//SoHiisptUhdXExuMUN1M0X9qY= +github.com/erigontech/secp256k1 v1.1.0/go.mod h1:GokhPepsMB+EYDs7I5JZCprxHW6+yfOcJKaKtoZ+Fls= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -116,6 +118,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.15 h1:rd9viN6tfARE5wv3KZJ9H8e1cg0jXW8syFCcsbHa76o= +github.com/supranational/blst v0.3.15/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -123,21 +127,15 @@ github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0h github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/lint v0.0.0-20241112194109-818c5a804067 h1:adDmSQyFTCiv19j015EGKJBoaa7ElV0Q1Wovb/4G7NA= -golang.org/x/lint v0.0.0-20241112194109-818c5a804067/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -146,10 +144,6 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=