Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: secp256k1 public key constant time #18026

Merged
merged 64 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c32ca65
added bench test for ed25519 key
bizk Aug 15, 2023
d54017c
added multisig test
bizk Aug 15, 2023
ffc39eb
added hashihg for basic ADR28 address on ed25519
bizk Aug 15, 2023
1770ef3
ran lint fix
bizk Aug 16, 2023
546dd4e
merge with master
bizk Aug 16, 2023
5f20b8c
Refactor tests
bizk Aug 16, 2023
d057344
merge
bizk Aug 17, 2023
71d6a6d
Merge branch 'main' of github.com:Zondax/cosmos-sdk into zondax/featu…
bizk Sep 19, 2023
f46939e
empty commit to re run actions
bizk Sep 19, 2023
c5872a0
empty commit to re run actions
bizk Sep 19, 2023
b148bd3
Merge branch 'main' of github.com:Zondax/cosmos-sdk into zondax/featu…
bizk Sep 29, 2023
e6d38b7
Merge branch 'main' of github.com:Zondax/cosmos-sdk into …
bizk Sep 29, 2023
0655ad1
added go constant time secp256k1
bizk Oct 6, 2023
09ce545
added constant time pub key implementation and tests
bizk Oct 9, 2023
2af7ad3
Merge branch 'main' of github.com:Zondax/cosmos-sdk into zondax/featu…
bizk Oct 9, 2023
1b18936
reverted changes and deleted optimization to make code fully constant
bizk Oct 9, 2023
f0e1c06
removed tidy code
bizk Oct 9, 2023
ae93077
Added changelog.md
bizk Oct 9, 2023
4ebca65
cleanup
bizk Oct 9, 2023
b6a0494
cleanup
bizk Oct 9, 2023
e5f98c5
go lint fix
bizk Oct 9, 2023
0586436
gofumpt files
bizk Oct 10, 2023
6416425
added fix on deprecated package
bizk Oct 10, 2023
8898092
suggestion by linter
bizk Oct 10, 2023
70c604c
ran gci
bizk Oct 10, 2023
5e96e6b
gci fix
bizk Oct 10, 2023
6a70994
returned file back to how it was
bizk Oct 10, 2023
d1fb6d0
Merge branch 'main' into feature/secp256k1constant
bizk Oct 10, 2023
d6519f4
Merge branch 'main' into feature/secp256k1constant
bizk Oct 17, 2023
c89049c
Merge branch 'main' into feature/secp256k1constant
bizk Oct 25, 2023
9b2fb97
switched secp point generation library
bizk Oct 26, 2023
8f2685c
Merge branch 'feature/secp256k1constant' of github.com:Zondax/cosmos-…
bizk Oct 26, 2023
f3462b9
switched secp priv key generation to constant time implementation and…
bizk Oct 26, 2023
b18542c
Merge branch 'main' into feature/secp256k1constant
bizk Oct 26, 2023
cc501e3
added missing go.mod files
bizk Oct 30, 2023
6b3c859
Merge branch 'main' into feature/secp256k1constant
bizk Oct 30, 2023
68154f5
solved issue with go.mod files
bizk Oct 30, 2023
54318a5
fixed small tests
bizk Oct 31, 2023
c25aa08
Merge branch 'feature/secp256k1constant' of github.com:Zondax/cosmos-…
bizk Oct 31, 2023
a8508ed
fixed hd and ledger tests, also added missing go.mod
bizk Oct 31, 2023
16883d1
fixed add_key test
bizk Oct 31, 2023
465f1e6
lint-fix
bizk Nov 1, 2023
7389cd2
fixed issues
bizk Nov 1, 2023
397c526
gcied add.go file
bizk Nov 1, 2023
f8be857
Merge branch 'main' into feature/secp256k1constant
bizk Nov 1, 2023
4eb2fbf
gcied modified file
bizk Nov 1, 2023
87e1ecf
Merge branch 'feature/secp256k1constant' of github.com:Zondax/cosmos-…
bizk Nov 1, 2023
84db0b4
lint fix
bizk Nov 1, 2023
1485810
Merge branch 'main' into feature/secp256k1constant
bizk Nov 1, 2023
4cb92c4
Merge branch 'main' into feature/secp256k1constant
bizk Nov 2, 2023
9f15cfd
ran go mod script
bizk Nov 7, 2023
8ea5da5
rollback internal secp key generation on test
bizk Nov 7, 2023
b6e6cbe
Merge branch 'main' into feature/secp256k1constant
bizk Nov 7, 2023
ef99726
lint fix
bizk Nov 7, 2023
01c79d5
Merge branch 'main' into feature/secp256k1constant
bizk Nov 7, 2023
c2d5fa9
Merge branch 'main' into feature/secp256k1constant
bizk Nov 7, 2023
10b8a8a
Merge branch 'main' into feature/secp256k1constant
bizk Nov 9, 2023
0b29d5e
fixed tests
bizk Nov 13, 2023
8bc73ee
merge
bizk Nov 21, 2023
9b04f9e
Merge branch 'main' into feature/secp256k1constant
bizk Nov 28, 2023
eeb4fc7
fixed changelog
bizk Nov 28, 2023
7989412
Merge branch 'main' into feature/secp256k1constant
bizk Nov 29, 2023
2217d1b
Merge branch 'main' into feature/secp256k1constant
bizk Dec 4, 2023
0c101fa
removed unused import
bizk Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (types) [#17670](https://github.com/cosmos/cosmos-sdk/pull/17670) Use `ctx.CometInfo` in place of `ctx.VoteInfos`
* [#17733](https://github.com/cosmos/cosmos-sdk/pull/17733) Ensure `buf export` exports all proto dependencies
* (version) [#18063](https://github.com/cosmos/cosmos-sdk/pull/18063) Include additional information in the Info struct. This change enhances the Info struct by adding support for additional information through the ExtraInfo field
* [#18204](https://github.com/cosmos/cosmos-sdk/pull/18204) Use streaming json parser to parse chain-id from genesis file.
bizk marked this conversation as resolved.
Show resolved Hide resolved
* (crypto/keys) [#7051](https://github.com/cosmos/cosmos-sdk/issues/7051) Made public key generation constant time on `secp256k1`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entry for pull request #14372 contains a potential typo: "antehandle" may be intended to be "ante handle" or "antehandler". Please verify the correct terminology and update accordingly.

bizk marked this conversation as resolved.
Show resolved Hide resolved
* (crypto | x/auth) [#14372](https://github.com/cosmos/cosmos-sdk/pull/18194) Key checks on signatures antehandle.
* (codec/unknownproto)[#18541](https://github.com/cosmos/cosmos-sdk/pull/18541) Remove the use of "protoc-gen-gogo/descriptor" in favour of using the official protobuf descriptorpb types inside unknownproto.
* (staking) [#18506](https://github.com/cosmos/cosmos-sdk/pull/18506) Detect the length of the ed25519 pubkey in CreateValidator to prevent panic.
Expand Down
8 changes: 5 additions & 3 deletions client/keys/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down Expand Up @@ -217,16 +218,17 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf
}

var pk cryptotypes.PubKey
// create an empty pubkey in order to get the algo TypeUrl.
tempAny, err := codectypes.NewAnyWithValue(algo.Generate()([]byte{}).PubKey())

// create an empty seckp256k1 pubkey since it is the key returned by algo Generate function.
enotySecpPubKey, err := codectypes.NewAnyWithValue(&secp256k1.PubKey{})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The secp256k1.PubKey{} struct should be initialized with a key of the correct size to prevent potential issues.

- enotySecpPubKey, err := codectypes.NewAnyWithValue(&secp256k1.PubKey{})
+ enotySecpPubKey, err := codectypes.NewAnyWithValue(&secp256k1.PubKey{Key: make([]byte, secp256k1.PubKeySize)})

Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
enotySecpPubKey, err := codectypes.NewAnyWithValue(&secp256k1.PubKey{})
enotySecpPubKey, err := codectypes.NewAnyWithValue(&secp256k1.PubKey{Key: make([]byte, secp256k1.PubKeySize)})

if err != nil {
return err
}

jsonPub, err := json.Marshal(struct {
Type string `json:"@type,omitempty"`
Key string `json:"key,omitempty"`
}{tempAny.TypeUrl, string(b64)})
}{enotySecpPubKey.TypeUrl, string(b64)})
if err != nil {
return fmt.Errorf("failed to JSON marshal typeURL and base64 key: %w", err)
}
bizk marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 2 additions & 0 deletions client/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ require (
github.com/tidwall/btree v1.7.0 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions client/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw=
github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
Expand Down
8 changes: 7 additions & 1 deletion crypto/hd/algo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package hd

import (
"github.com/cosmos/go-bip39"
"gitlab.com/yawning/secp256k1-voi/secec"

"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
"github.com/cosmos/cosmos-sdk/crypto/types"
Expand Down Expand Up @@ -65,6 +66,11 @@ func (s secp256k1Algo) Generate() GenerateFn {
bzArr := make([]byte, secp256k1.PrivKeySize)
copy(bzArr, bz)

return &secp256k1.PrivKey{Key: bzArr}
privKeyObj, err := secec.NewPrivateKey(bz)
if err != nil {
panic(err)
}

return &secp256k1.PrivKey{Key: privKeyObj.Bytes()}
}
}
2 changes: 1 addition & 1 deletion crypto/keys/secp256k1/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
func BenchmarkKeyGeneration(b *testing.B) {
b.ReportAllocs()
benchmarkKeygenWrapper := func(reader io.Reader) types.PrivKey {
priv := genPrivKey(reader)
priv := genPrivKey()
return &PrivKey{Key: priv}
}
benchmarking.BenchmarkKeyGeneration(b, benchmarkKeygenWrapper)
Expand Down
10 changes: 5 additions & 5 deletions crypto/keys/secp256k1/internal/secp256k1/scalar_mult_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
// nolint // this nolint lets us use this file in its original and unmodified form.
package secp256k1

import (
"math/big"
"unsafe"
)

/*

#include "libsecp256k1/include/secp256k1.h"
Expand All @@ -22,6 +17,11 @@ extern int secp256k1_ext_scalar_mul(const secp256k1_context* ctx, const unsigned
*/
import "C"

import (
"math/big"
"unsafe"
)

func (BitCurve *BitCurve) ScalarMult(Bx, By *big.Int, scalar []byte) (*big.Int, *big.Int) {
// Ensure scalar is exactly 32 bytes. We pad always, even if
// scalar is 32 bytes long, to avoid a timing side channel.
Expand Down
1 change: 1 addition & 0 deletions crypto/keys/secp256k1/internal/secp256k1/secp256_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func generateKeyPair() (pubkey, privkey []byte) {
if err != nil {
panic(err)
}

pubkey = elliptic.Marshal(S256(), key.X, key.Y) //nolint:staticcheck // crypto will be refactored soon.
privkey = make([]byte, 32)
blob := key.D.Bytes()
Expand Down
8 changes: 5 additions & 3 deletions crypto/keys/secp256k1/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 19 additions & 6 deletions crypto/keys/secp256k1/secp256k1.go
bizk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/cometbft/cometbft/crypto"
secp256k1dcrd "github.com/decred/dcrd/dcrec/secp256k1/v4"
"gitlab.com/yawning/secp256k1-voi/secec"
"golang.org/x/crypto/ripemd160" //nolint: staticcheck // keep around for backwards compatibility

errorsmod "cosmossdk.io/errors"
Expand Down Expand Up @@ -39,10 +40,12 @@ func (privKey *PrivKey) Bytes() []byte {
// PubKey performs the point-scalar multiplication from the privKey on the
// generator point to get the pubkey.
func (privKey *PrivKey) PubKey() cryptotypes.PubKey {
pubkeyObject := secp256k1dcrd.PrivKeyFromBytes(privKey.Key).PubKey()
privateKeyObject, err := secec.NewPrivateKey(privKey.Key)
if err != nil {
panic(err)
}
bizk marked this conversation as resolved.
Show resolved Hide resolved

pk := pubkeyObject.SerializeCompressed()
return &PubKey{Key: pk}
return &PubKey{Key: privateKeyObject.PublicKey().CompressedBytes()}
}

// Equals - you probably don't need to use this.
Expand Down Expand Up @@ -85,11 +88,21 @@ func (privKey *PrivKey) UnmarshalAminoJSON(bz []byte) error {
// GenPrivKey generates a new ECDSA private key on curve secp256k1 private key.
// It uses OS randomness to generate the private key.
func GenPrivKey() *PrivKey {
return &PrivKey{Key: genPrivKey(crypto.CReader())}
return &PrivKey{Key: genPrivKey()}
}

// genPrivKey generates a new secp256k1 private key.
func genPrivKey() []byte {
privateKeyObject, err := secec.GenerateKey()
if err != nil {
panic(err)
}
bizk marked this conversation as resolved.
Show resolved Hide resolved

return privateKeyObject.Bytes()
}
bizk marked this conversation as resolved.
Show resolved Hide resolved

// genPrivKey generates a new secp256k1 private key using the provided reader.
func genPrivKey(rand io.Reader) []byte {
// genPrivKeyLegacy generates a new secp256k1 private key using the provided reader.
func genPrivKeyLegacy(rand io.Reader) []byte {
var privKeyBytes [PrivKeySize]byte
d := new(big.Int)
for {
Expand Down
1 change: 0 additions & 1 deletion crypto/keys/secp256k1/secp256k1_cgo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"testing"

"github.com/magiconair/properties/assert"

"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions crypto/keys/secp256k1/secp256k1_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func Test_genPrivKey(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
if tt.shouldPanic {
require.Panics(t, func() {
genPrivKey(bytes.NewReader(tt.notSoRand))
genPrivKeyLegacy(bytes.NewReader(tt.notSoRand))
})
return
}
got := genPrivKey(bytes.NewReader(tt.notSoRand))
got := genPrivKeyLegacy(bytes.NewReader(tt.notSoRand))
fe := new(big.Int).SetBytes(got)
require.True(t, fe.Cmp(secp.S256().N) < 0)
require.True(t, fe.Sign() > 0)
Expand Down
27 changes: 22 additions & 5 deletions crypto/keys/secp256k1/secp256k1_nocgo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package secp256k1
import (
"testing"

secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v4"
secp256k1_dcrd "github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/stretchr/testify/require"
)

Expand All @@ -19,18 +19,18 @@ func TestSignatureVerificationAndRejectUpperS(t *testing.T) {
priv := GenPrivKey()
sigStr, err := priv.Sign(msg)
require.NoError(t, err)
var r secp256k1.ModNScalar
var r secp256k1_dcrd.ModNScalar
r.SetByteSlice(sigStr[:32])
var s secp256k1.ModNScalar
var s secp256k1_dcrd.ModNScalar
s.SetByteSlice(sigStr[32:64])
require.False(t, s.IsOverHalfOrder())

pub := priv.PubKey()
require.True(t, pub.VerifySignature(msg, sigStr))

// malleate:
var S256 secp256k1.ModNScalar
S256.SetByteSlice(secp256k1.S256().N.Bytes())
var S256 secp256k1_dcrd.ModNScalar
S256.SetByteSlice(secp256k1_dcrd.S256().N.Bytes())
s.Negate().Add(&S256)
require.True(t, s.IsOverHalfOrder())

Expand All @@ -46,3 +46,20 @@ func TestSignatureVerificationAndRejectUpperS(t *testing.T) {
)
}
}

func TestConstantTimePubKeyGeneration(t *testing.T) {
for i := 0; i < 500; i++ {
pk := GenPrivKey().PubKey()
require.NotNil(t, pk)
}
}

// Legacy generation code
func TestNonConstantTimePubKeyGeneration(t *testing.T) {
for i := 0; i < 500; i++ {
privKey := GenPrivKey()
nonConstantTimePk := secp256k1_dcrd.PrivKeyFromBytes(privKey.Key).PubKey().SerializeCompressed() // Legacy functionability from pubkey
pk := &PubKey{Key: nonConstantTimePk}
require.NotNil(t, pk)
}
}
11 changes: 11 additions & 0 deletions crypto/keys/secp256k1/secp256k1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,3 +450,14 @@ func TestMarshalAmino_BackwardsCompatibility(t *testing.T) {
})
}
}

func TestLegacyKeyGenerationAgainstConstantTime(t *testing.T) {
privKey := secp256k1.GenPrivKey()

pubKey := privKey.PubKey()

nonConstantTimePk := secp.PrivKeyFromBytes(privKey.Key).PubKey().SerializeCompressed() // Legacy functionability from pubkey
legacyPubKey := &secp256k1.PubKey{Key: nonConstantTimePk}

require.Equal(t, legacyPubKey, pubKey)
}
9 changes: 5 additions & 4 deletions crypto/ledger/ledger_secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

secp "github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
"gitlab.com/yawning/secp256k1-voi/secec"

"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
Expand Down Expand Up @@ -320,13 +321,13 @@ func getPubKeyUnsafe(device SECP256K1, path hd.BIP44Params) (types.PubKey, error
}

// re-serialize in the 33-byte compressed format
cmp, err := secp.ParsePubKey(publicKey)
cmp, err := secec.NewPublicKey(publicKey)
if err != nil {
return nil, fmt.Errorf("error parsing public key: %w", err)
}

compressedPublicKey := make([]byte, secp256k1.PubKeySize)
copy(compressedPublicKey, cmp.SerializeCompressed())
copy(compressedPublicKey, cmp.CompressedBytes())
bizk marked this conversation as resolved.
Show resolved Hide resolved

return options.createPubkey(compressedPublicKey), nil
bizk marked this conversation as resolved.
Show resolved Hide resolved
}
Expand All @@ -344,13 +345,13 @@ func getPubKeyAddrSafe(device SECP256K1, path hd.BIP44Params, hrp string) (types
}

// re-serialize in the 33-byte compressed format
cmp, err := secp.ParsePubKey(publicKey)
cmp, err := secec.NewPublicKey(publicKey)
if err != nil {
return nil, "", fmt.Errorf("error parsing public key: %w", err)
}

compressedPublicKey := make([]byte, secp256k1.PubKeySize)
copy(compressedPublicKey, cmp.SerializeCompressed())
copy(compressedPublicKey, cmp.CompressedBytes())

bizk marked this conversation as resolved.
Show resolved Hide resolved
return options.createPubkey(compressedPublicKey), addr, nil
}
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ require (
github.com/spf13/viper v1.17.0
github.com/stretchr/testify v1.8.4
github.com/tendermint/go-amino v0.16.0
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b
golang.org/x/crypto v0.16.0
golang.org/x/exp v0.0.0-20231127185646-65229373498e
golang.org/x/sync v0.5.0
Expand Down Expand Up @@ -147,6 +148,7 @@ require (
github.com/tidwall/btree v1.7.0 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.19.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,10 @@ github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw=
github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
Expand Down
2 changes: 2 additions & 0 deletions simapp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ require (
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions simapp/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,10 @@ github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw=
github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
Expand Down
6 changes: 6 additions & 0 deletions simapp/gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,12 @@ schema = 3
[mod."github.com/zondax/ledger-go"]
version = "v0.14.3"
hash = "sha256-tldEok5ebZ4R4B7H8dSlYS5oVuLvh89n9wUaVlDjYwg="
[mod."gitlab.com/yawning/secp256k1-voi"]
version = "v0.0.0-20230925100816-f2616030848b"
hash = "sha256-X8INg01LTg13iOuwPI3uOhPN7r01sPZtmtwJ2sudjCA="
[mod."gitlab.com/yawning/tuplehash"]
version = "v0.0.0-20230713102510-df83abbf9a02"
hash = "sha256-pehQduoaJRLchebhgvMYacVvbuNIBA++XkiqCuqdato="
[mod."go.etcd.io/bbolt"]
version = "v1.3.7"
hash = "sha256-poZk8tPLDWwW95oCOkTJcQtEvOJTD9UXAZ2TqGJutwk="
Expand Down
2 changes: 2 additions & 0 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ require (
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,10 @@ github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U=
github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=
github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw=
github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA=
gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q=
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
Expand Down
Loading
Loading