README
¶
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
Documentation
¶
Index ¶
- func GenerateKeyPair() ([]byte, []byte)
- func GeneratePubKey(seckey []byte) ([]byte, error)
- func RecoverPubkey(msg []byte, sig []byte) ([]byte, error)
- func Sign(msg []byte, seckey []byte) ([]byte, error)
- func VerifySeckeyValidity(seckey []byte) error
- func VerifySignature(msg []byte, sig []byte, pubkey1 []byte) error
- func VerifySignatureValidity(sig []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
func GeneratePubKey ¶
func RecoverPubkey ¶
recovers a public key from the signature
func VerifySeckeyValidity ¶
func VerifySignature ¶
for compressed signatures, does not need pubkey
func VerifySignatureValidity ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.