go-secp256k1
go-secp256k1 copied to clipboard
binary secp256k1 library fail to work
pkg info secp256k1-0.1.20171222 secp256k1-0.1.20171222 Name : secp256k1 Version : 0.1.20171222 Installed on : Tue Sep 18 03:26:40 2018 CST Origin : math/secp256k1 Architecture : FreeBSD:11:amd64 Prefix : /usr/local Categories : security math java Licenses : MIT Maintainer : [email protected] WWW : https://github.com/bitcoin-core/secp256k1 Comment : Optimized C library for EC operations on curve secp256k1 Options : GMP : on JAVA : on Shared Libs required: libgmp.so.10 Shared Libs provided: libsecp256k1.so.0 Annotations : FreeBSD_version: 1101001 repo_type : binary repository : FreeBSD Flat size : 749KiB Description : An optimized C library for EC operations on curve secp256k1.
This library is a work in progress and is being used to research best practices. Use at your own risk.
Features:
- secp256k1 ECDSA signing/verification and key generation.
- Adding/multiplying private/public keys.
- Serialization/parsing of private keys, public keys, signatures.
- Constant time, constant memory access signing and pubkey generation.
- Derandomized DSA (via RFC6979 or with a caller provided function.)
- Very efficient implementation.
WWW: https://github.com/bitcoin-core/secp256k1
I installed this binary package (both .so and .a) but it won't work with .go code. The original C code won't compile with my FreeBSD system. Any idea how to fix this?
go run keys.go
# github.com/toxeus/go-secp256k1
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:19:47: could not determine kind of name for C.SECP256K1_START_SIGN
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:19:20: could not determine kind of name for C.SECP256K1_START_VERIFY
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:35:13: could not determine kind of name for C.secp256k1_ec_pubkey_create
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:48:13: could not determine kind of name for C.secp256k1_ec_pubkey_verify
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:43:13: could not determine kind of name for C.secp256k1_ec_seckey_verify
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:55:13: could not determine kind of name for C.secp256k1_ecdsa_sign
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:65:13: could not determine kind of name for C.secp256k1_ecdsa_verify
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:19:2: could not determine kind of name for C.secp256k1_start
../go/src/github.com/toxeus/go-secp256k1/secp256k1.go:23:2: could not determine kind of name for C.secp256k1_stop
Compiling the original C source code (tar.gz) returned the following error.
config.status:1136: creating src/libsecp256k1-config.h
config.status:1365: executing depfiles commands
config.status:1440: cd . && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles
make: exec(build-aux/install-sh) failed (No such file or directory)
*** Error code 1
Stop.
make: stopped in ./src/secp256k1-master
config.status:1447: $? = 1
config.status:1451: error: in `./src/secp256k1-master':
config.status:1457: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
Thanks for your report. Sorry for the long silence - I was on vacation. I will look into this this week.
Thanks for your report. Sorry for the long silence - I was on vacation. I will look into this this week.
Any update?
It builds fine on my system. Please make sure to strictly follow the instructions when building this package. Using the tar.gz won't work.