Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6db6d1e
EdDSA with the secp256k1 elliptic curve for Schnorr signatures and Ta…
Dec 21, 2021
f1ad161
EdDSA with Schnorr (BIP340), supporting Taproot. In round 3, if R has…
Dec 24, 2021
e42ec28
Curve name in fixture file suffix for resharing. Exposing EdDSA hashi…
Dec 27, 2021
da94e85
Adding ecdsa fixtures back.
Dec 27, 2021
872d9bc
Signing, EdDSA, Edwards: simplifying the references to the hashing al…
Dec 27, 2021
8c87d47
Resharing, EdDSA, Edwards: simplifying the references to the hashing …
Dec 27, 2021
4c394d2
Util functions for Schnorr signatures.
Dec 30, 2021
581c172
Refactoring of Schnorr verification. No functional change.
Jan 16, 2022
a1c6f72
Fixing import not used.
Jan 16, 2022
ba2ecfa
Minor change: ECDSA signing task name. No functional change.
Jan 20, 2022
64ca29c
No functional change (force push)
Jan 26, 2022
21ad118
Various changes matching an external repo. Adding elliptic curve as p…
Jan 26, 2022
0a3f5fd
MTA unit tests: hard-coded constants instead of fixture files.
Jan 27, 2022
97fda5f
Hard-coded constants instead of fixture files for certain unit tests.…
Jan 27, 2022
2be88a6
Removing unused import in test util file.
Jan 27, 2022
2862aa2
Minor fixes to unit tests. No functional change to protocols.
Jan 27, 2022
4155de9
delete test fixtures from repo
creamwhip Jan 28, 2022
7fbb47a
gitignore test fixtures dirs
creamwhip Jan 28, 2022
32a4ad2
Exposing lock and unlock functions in party. Avoiding race condition …
Jan 28, 2022
3a7d0bf
fix .gitignore for test fixtures
creamwhip Jan 29, 2022
8488daf
upgrade to latest github.com/Roasbeef/btcd BIP340 branch, upgrade deps
creamwhip Jan 29, 2022
68d2ee8
Makefile: remove sleeps
creamwhip Jan 29, 2022
a916c49
use schnorr verify from Roasbeef's btcd fork
creamwhip Jan 29, 2022
f1aec76
.github/workflows: run tests with race detection
creamwhip Jan 29, 2022
384dc5b
remove dep github.com/decred/dcrd/dcrec/secp256k1/v2
creamwhip Jan 29, 2022
c8e9a99
eddsa: minor clean ups
creamwhip Jan 29, 2022
004ee6f
eddsa: use schnorrVerify with an error return value
creamwhip Jan 29, 2022
1e9891f
move tools (benchgen, benchsign) to their own module
creamwhip Jan 29, 2022
0f000a7
go mod tidy in cmd tools module
creamwhip Jan 29, 2022
0397aac
upgrade btcsuite/btcd and btcsuite/btcd/btcec/v2
creamwhip Feb 4, 2022
ce97eec
Makefile: unit test coverage
creamwhip Feb 4, 2022
6fc01c0
.github/workflows: use go 1.17
creamwhip Feb 4, 2022
5f617c7
upgrade deps
creamwhip Feb 13, 2022
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
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: macOS-latest
steps:

- name: Set up Go 1.16
- name: Set up Go 1.17
uses: actions/setup-go@v1
with:
go-version: 1.16
go-version: 1.17
id: go

- name: Check out code into the Go module directory
Expand All @@ -27,5 +27,5 @@ jobs:
run: go get -v -t -d ./...

- name: Run Tests
run: make test_unit
run: make test

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ benchdata
*.swp
.vscode/*.json

# Test fixtures
test/*fixtures/*.json
40 changes: 31 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
MODULE = github.com/binance-chain/tss-lib
PACKAGES = $(shell go list ./... | grep -v '/vendor/')
UT_TIMEOUT = -timeout 60m
UT_COVER = -covermode=atomic -cover
UT_PACKAGES_LEVEL_0 = $(shell go list ./... | grep -v '/vendor/' | grep 'keygen' )
UT_PACKAGES_LEVEL_1 = $(shell go list ./... | grep -v '/vendor/' | grep -v 'keygen' )

all: protob test

Expand Down Expand Up @@ -29,24 +33,42 @@ build: protob
### Benchmarking

benchgen: fmt
go run ./cmd/tss-benchgen benchdata
cd cmd && go run ./tss-benchgen benchdata

benchsign: fmt
go run ./cmd/tss-benchsign benchdata
cd cmd && go run ./tss-benchsign benchdata

########################################
### Testing

test_unit:
@echo "--> Running Unit Tests"
test_unit_level0:
@echo "--> Running Unit Tests - Level 0"
@echo "!!! WARNING: This will take a long time :)"
go test -timeout 60m $(PACKAGES)
@echo "!!! WARNING: This will delete fixtures :("
go clean -testcache
rm -f ./test/_ecdsa_fixtures/*json
rm -f ./test/_eddsa_fixtures/*json
go test ${UT_TIMEOUT} ${UT_COVER} $(UT_PACKAGES_LEVEL_0)

test_unit_race:
@echo "--> Running Unit Tests (with Race Detection)"

test_unit: test_unit_level0
@echo "--> Running Unit Tests - Level 1"
@echo "!!! WARNING: This will take a long time :)"
go test ${UT_TIMEOUT} ${UT_COVER} $(UT_PACKAGES_LEVEL_1)

test_unit_race_level0:
@echo "--> Running Unit Tests (with Race Detection) - Level 0"
@echo "!!! WARNING: This will take a long time :)"
@echo "!!! WARNING: This will delete fixtures :("
go clean -testcache
rm -f ./test/_ecdsa_fixtures/*json
rm -f ./test/_eddsa_fixtures/*json
go test -race ${UT_TIMEOUT} ${UT_COVER} $(UT_PACKAGES_LEVEL_0)

test_unit_race: test_unit_race_level0
@echo "--> Running Unit Tests (with Race Detection) - Level 1"
@echo "!!! WARNING: This will take a long time :)"
# go clean -testcache
go test -timeout 60m -race $(PACKAGES)
go test -race ${UT_TIMEOUT} ${UT_COVER} $(UT_PACKAGES_LEVEL_1)

test:
make test_unit_race
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,3 @@ A full review of this library was carried out by Kudelski Security and their fin

## References
\[1\] https://eprint.iacr.org/2020/540.pdf

41 changes: 41 additions & 0 deletions cmd/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module github.com/binance-chain/tss-lib/cmd

go 1.17

require (
github.com/binance-chain/tss-lib v1.3.3
github.com/btcsuite/btcd/btcec/v2 v2.0.0
github.com/ipfs/go-log v1.0.5
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
golang.org/x/text v0.3.7
)

require (
github.com/agl/ed25519 v0.0.0-20200305024217-f36fc4b53d43 // indirect
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c // indirect
github.com/btcsuite/btcutil v1.0.3-0.20211129182920-9c4bbabe7acd // indirect
github.com/decred/dcrd/dcrec/edwards/v2 v2.0.2 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/ipfs/go-log/v2 v2.5.0 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/otiai10/primes v0.0.0-20210501021515-f1b2be525a11 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.20.0 // indirect
golang.org/x/crypto v0.0.0-20220128200615-198e4374d7ed // indirect
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect
google.golang.org/protobuf v1.27.1 // indirect
)

replace github.com/binance-chain/tss-lib => github.com/SwingbyProtocol/tss-lib v1.5.1-0.20220129135114-1e9891f47740

replace github.com/agl/ed25519 => github.com/SwingbyProtocol/edwards25519 v0.0.0-20200305024217-f36fc4b53d43

replace github.com/btcsuite/btcd => github.com/Roasbeef/btcd v0.0.0-20220128222530-5a59e7c0ddfb

replace github.com/btcsuite/btcd/btcec/v2 => github.com/Roasbeef/btcd/btcec/v2 v2.0.0-20220128222530-5a59e7c0ddfb
Loading