aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/secp256k1
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-12-04 03:04:39 +0800
committerFelix Lange <fjl@twurst.com>2015-12-04 04:12:13 +0800
commit02356b36d618d5633e2f097505c95bf45dd7f4ab (patch)
treeef8ca832765c7b11d3ecd6fb098e9ab66e9ce7ce /crypto/secp256k1
parent6d3a92428323bd482bc657228b71cf600b0757ed (diff)
downloaddexon-02356b36d618d5633e2f097505c95bf45dd7f4ab.tar.gz
dexon-02356b36d618d5633e2f097505c95bf45dd7f4ab.tar.zst
dexon-02356b36d618d5633e2f097505c95bf45dd7f4ab.zip
crypto/secp256k1: remove dependency on libgmp
Turns out we actually don't need it, USE_NUM_NONE works because we also set USE_FIELD_INV_BUILTIN.
Diffstat (limited to 'crypto/secp256k1')
-rw-r--r--crypto/secp256k1/README.md25
-rw-r--r--crypto/secp256k1/secp256.go9
2 files changed, 1 insertions, 33 deletions
diff --git a/crypto/secp256k1/README.md b/crypto/secp256k1/README.md
deleted file mode 100644
index 5a86147d4..000000000
--- a/crypto/secp256k1/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-secp256k1-go
-=======
-
-golang secp256k1 library
-
-Implements cryptographic operations for the secp256k1 ECDSA curve used by Bitcoin.
-
-Installing
-===
-
-GMP library headers are required to build. On Debian-based systems, the package is called `libgmp-dev`.
-
-```
-sudo apt-get install libgmp-dev
-```
-
-Now compiles with cgo!
-
-Test
-===
-
-To run tests do
-```
-go tests
-``` \ No newline at end of file
diff --git a/crypto/secp256k1/secp256.go b/crypto/secp256k1/secp256.go
index 8dc248145..97b4bd8da 100644
--- a/crypto/secp256k1/secp256.go
+++ b/crypto/secp256k1/secp256.go
@@ -21,14 +21,7 @@ package secp256k1
/*
#cgo CFLAGS: -I./libsecp256k1
#cgo CFLAGS: -I./libsecp256k1/src/
-#cgo darwin CFLAGS: -I/usr/local/include
-#cgo freebsd CFLAGS: -I/usr/local/include
-#cgo linux,arm CFLAGS: -I/usr/local/arm/include
-#cgo LDFLAGS: -lgmp
-#cgo darwin LDFLAGS: -L/usr/local/lib
-#cgo freebsd LDFLAGS: -L/usr/local/lib
-#cgo linux,arm LDFLAGS: -L/usr/local/arm/lib
-#define USE_NUM_GMP
+#define USE_NUM_NONE
#define USE_FIELD_10X26
#define USE_FIELD_INV_BUILTIN
#define USE_SCALAR_8X32