cosmos-sdk/crypto/keys/secp256k1/internal/secp256k1
github-actions[bot] 06f5339d78
chore: fix spelling errors (#23270)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
Co-authored-by: Alex | Interchain Labs <alex@skip.money>
2025-01-09 20:52:55 +00:00
..
libsecp256k1 chore: fix spelling errors (#23270) 2025-01-09 20:52:55 +00:00
.gitignore Migrate Tendermint PubKey types to the SDK (#7047) 2020-08-18 13:53:40 +00:00
curve.go refactor: fix lint issues + gofumpt (#15062) 2023-02-19 10:31:49 +00:00
dummy.go build(deps): Bump github.com/cosmos/iavl from 0.17.3 to 0.18.0 (#11363) 2022-03-11 17:42:27 +01:00
ext.h Migrate Tendermint PubKey types to the SDK (#7047) 2020-08-18 13:53:40 +00:00
LICENSE Migrate Tendermint PubKey types to the SDK (#7047) 2020-08-18 13:53:40 +00:00
panic_cb.go fix: cgosecp256k1 verification (#11298) 2022-03-10 20:06:42 +00:00
README.md docs: cgo secp256k1 ldflags (#18357) 2023-11-03 17:07:43 +00:00
scalar_mult_cgo.go feat: secp256k1 public key constant time (#18026) 2023-12-04 19:04:02 +00:00
scalar_mult_nocgo.go refactor: fix lint issues + gofumpt (#15062) 2023-02-19 10:31:49 +00:00
secp256_test.go refactor: replace error-handling code for potential wrapped errors (#20214) 2024-04-30 11:14:02 +00:00
secp256.go style: enable strict gofumpt (#15579) 2023-03-28 18:59:21 +00:00

secp256k1

This package is copied from 8fddf27a98/crypto/secp256k1

Unlike the rest of go-ethereum it is 3-clause BSD licensed so compatible with our Apache2.0 license. We opt to copy in here rather than depend on go-ethereum to avoid issues with vendoring of the GPL parts of that repository by downstream.

Duplicate Symbols

If a project is importing go-ethereum and the Cosmos SDK, cgo secp256k1 will only work on linux operating systems due to duplicated symbols. If you are testing on a mac, we recommend using a docker container or something similar.

To avoid duplicate symbol errors ldflags must be set to allow for multiple definitions.

Gcc

  • go build -tags libsecp256k1_sdk -ldflags=all="-extldflags=-Wl,--allow-multiple-definition"

Clang

  • go build -tags libsecp256k1_sdk -ldflags=all="-extldflags=-zmuldefs"