-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from ecies/cgo-support
CGO secp256k1 support added, more mature version of Go native version…
- Loading branch information
Showing
8 changed files
with
599 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
module github.com/ecies/go/v2 | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/fomichev/secp256k1 v0.0.0-20180413221153-00116ff8c62f | ||
github.com/kr/pretty v0.1.0 // indirect | ||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 | ||
github.com/ethereum/go-ethereum v1.10.15 | ||
github.com/stretchr/testify v1.7.0 | ||
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 | ||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect | ||
) | ||
|
||
go 1.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build cgo && !ecies_test_race | ||
// +build cgo,!ecies_test_race | ||
|
||
package eciesgo | ||
|
||
import ( | ||
"crypto/elliptic" | ||
|
||
"github.com/ethereum/go-ethereum/crypto/secp256k1" | ||
) | ||
|
||
func getCurve() elliptic.Curve { | ||
return secp256k1.S256() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build !cgo || ecies_test_race | ||
// +build !cgo ecies_test_race | ||
|
||
package eciesgo | ||
|
||
import ( | ||
"crypto/elliptic" | ||
|
||
"github.com/decred/dcrd/dcrec/secp256k1/v4" | ||
) | ||
|
||
func getCurve() elliptic.Curve { | ||
return secp256k1.S256() | ||
} |