Versions in this module Expand all Collapse all v1 v1.0.1 Dec 12, 2020 Changes in this version + const OperationModeCBC + const OperationModeGCM + const PropertyKDF + const PropertyOperationMode + const VERSION + var ErrTooShort = errors.New("ecc/ecies: invalid ciphertext, too short") + var ErrUnexpectedOptionDataType = errors.New("ecc/ecies: unexpected option value data type") + var ErrUnknownOption = errors.New("ecc/ecies: unknown encryption option") + var ErrWrongKeyLength = errors.New("ecc/key: could not parse key, wrong length") + var OptionAESGCM EncryptOption = EncryptOption + var RandReader io.Reader = rand.Reader + func HKDFSHA256(secret []byte) (key []byte, err error) + type EncryptOption struct + Property OptionProperty + Value interface{} + func NewOptionKDF(kdf func(secret []byte) ([]byte, error)) *EncryptOption + type OperationMode uint8 + type OptionProperty uint8 + type Private struct + D *big.Int + Public *Public + func GenerateKey(curve elliptic.Curve) (*Private, error) + func (private *Private) Decrypt(m []byte, curve elliptic.Curve, options ...*EncryptOption) ([]byte, error) + func (private *Private) Sign(digest []byte) (r *big.Int, s *big.Int, err error) + func (private *Private) SignToASN1(digest []byte) ([]byte, error) + func (private *Private) ToECDSA() *ecdsa.PrivateKey + type Public struct + Curve elliptic.Curve + X *big.Int + Y *big.Int + func ParsePublicKey(curve elliptic.Curve, rawBytes []byte) (*Public, error) + func (public *Public) Bytes() []byte + func (public *Public) Encrypt(message []byte, options ...*EncryptOption) ([]byte, error) + func (public *Public) Equal(key *Public) bool + func (public *Public) Fingerprint(Hash ...hash.Hash) []byte + func (public *Public) ToECDSA() *ecdsa.PublicKey + func (public *Public) Verify(digest []byte, r *big.Int, s *big.Int) bool + func (public *Public) VerifyASN1(digest []byte, signature []byte) bool v1.0.0 Dec 12, 2020