Versions in this module Expand all Collapse all v0 v0.0.4 Nov 3, 2022 Changes in this version + func CipherMarshal(data []byte) ([]byte, error) + func CipherUnmarshal(data []byte) ([]byte, error) + func Decrypt(priv *PrivateKey, data []byte, mode int) ([]byte, error) + func DecryptAsn1(pub *PrivateKey, data []byte) ([]byte, error) + func Encrypt(pub *PublicKey, data []byte, random io.Reader, mode int) ([]byte, error) + func EncryptAsn1(pub *PublicKey, data []byte, rand io.Reader) ([]byte, error) + func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) + func SignASN1(rand io.Reader, priv *PrivateKey, hash []byte) ([]byte, error) + func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool + func VerifyASN1(pub *PublicKey, hash, sig []byte) bool + type PrivateKey struct + D *big.Int + func GenerateKey(c elliptic.Curve, rand io.Reader) (*PrivateKey, error) + func (priv *PrivateKey) DecryptAsn1(data []byte) ([]byte, error) + func (priv *PrivateKey) Equal(x crypto.PrivateKey) bool + func (priv *PrivateKey) Public() crypto.PublicKey + func (priv *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) + type PublicKey struct + X *big.Int + Y *big.Int + func (pub *PublicKey) EncryptAsn1(data []byte, random io.Reader) ([]byte, error) + func (pub *PublicKey) Equal(x crypto.PublicKey) bool