Documentation ¶
Index ¶
- func CompressPubkey(pubkey *ecdsa.PublicKey) []byte
- func DecompressPubkey(pubkey []byte) (*ecdsa.PublicKey, error)
- func Ecrecover(digestHash, sig []byte) (ecc.PublicKey, error)
- func FromECDSAPub(pub *ecdsa.PublicKey) []byte
- func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
- func Keccak256(data ...[]byte) []byte
- func Keccak256Hash(data ...[]byte) (h hash.Hash)
- func ParseSignature(signature []byte) (*secp256k1.Signature, error)
- func Sign(digestHash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error)
- func ToECDSA(d []byte) (*ecdsa.PrivateKey, error)
- func UnmarshalPubkey(pub []byte) (*ecdsa.PublicKey, error)
- func VerifySignature(pubkey *ecdsa.PublicKey, digestHash, signature []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressPubkey ¶
CompressPubkey encodes a public key to the 33-byte compressed format.
func DecompressPubkey ¶
DecompressPubkey parses a public key in the 33-byte compressed format.
func FromECDSAPub ¶
func HexToECDSA ¶
func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
HexToECDSA parses a secp256k1 private key.
func Keccak256Hash ¶
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
func Sign ¶
func Sign(digestHash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error)
<head><R><S>
func ToECDSA ¶
func ToECDSA(d []byte) (*ecdsa.PrivateKey, error)
ToECDSA creates a private key with the given D value.
func UnmarshalPubkey ¶
UnmarshalPubkey converts bytes to a secp256k1 public key.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package bip39 is the official Golang implementation of the BIP39 spec.
|
Package bip39 is the official Golang implementation of the BIP39 spec. |
ed25519/internal
Package ed25519 implements the Ed25519 signature algorithm.
|
Package ed25519 implements the Ed25519 signature algorithm. |
secp256k1
Package secp256k1 implements support for the elliptic curves needed for qitmeer.
|
Package secp256k1 implements support for the elliptic curves needed for qitmeer. |
whirlpool
Package whirlpool implements the ISO/IEC 10118-3:2004 whirlpool cryptographic hash.
|
Package whirlpool implements the ISO/IEC 10118-3:2004 whirlpool cryptographic hash. |
Click to show internal directories.
Click to hide internal directories.