Versions in this module Expand all Collapse all v0 v0.0.3 Feb 7, 2021 Changes in this version + var Ed25519 = newEdwardsDSA() + var SecSchnorr = newSecSchnorrDSA() + var Secp256k1 = newSecp256k1DSA() + type DSA interface + Add func(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) + Decrypt func(privkey []byte, in []byte) ([]byte, error) + Encrypt func(x, y *big.Int, in []byte) ([]byte, error) + GenerateKey func(rand io.Reader) ([]byte, *big.Int, *big.Int, error) + GenerateSharedSecret func(privkey []byte, x, y *big.Int) []byte + GetN func() *big.Int + GetP func() *big.Int + IsOnCurve func(x *big.Int, y *big.Int) bool + NewPrivateKey func(*big.Int) PrivateKey + NewPublicKey func(x *big.Int, y *big.Int) PublicKey + NewSignature func(r *big.Int, s *big.Int) Signature + ParseDERSignature func(sigStr []byte) (Signature, error) + ParsePubKey func(pubKeyStr []byte) (PublicKey, error) + ParseSignature func(sigStr []byte) (Signature, error) + PrivKeyBytesLen func() int + PrivKeyFromBytes func(pk []byte) (PrivateKey, PublicKey) + PrivKeyFromScalar func(pk []byte) (PrivateKey, PublicKey) + PubKeyBytesLen func() int + PubKeyBytesLenCompressed func() int + PubKeyBytesLenUncompressed func() int + RecoverCompact func(signature, hash []byte) (PublicKey, bool, error) + ScalarBaseMult func(k []byte) (*big.Int, *big.Int) + ScalarMult func(x, y *big.Int, k []byte) (*big.Int, *big.Int) + Sign func(priv PrivateKey, hash []byte) (r, s *big.Int, err error) + Verify func(pub PublicKey, hash []byte, r, s *big.Int) bool + type EcType int + const ECDSA_SM2 + const ECDSA_Secp256k1 + const ECDSA_SecpSchnorr + const EdDSA_Ed25519 + type Key interface + GetType func() int + Serialize func() []byte + type PrivateKey interface + GetD func() *big.Int + Public func() (*big.Int, *big.Int) + SerializeSecret func() []byte + type PublicKey interface + GetCurve func() interface{} + GetX func() *big.Int + GetY func() *big.Int + SerializeCompressed func() []byte + SerializeUncompressed func() []byte + ToECDSA func() *ecdsa.PublicKey + type Signature interface + GetR func() *big.Int + GetS func() *big.Int