Versions in this module Expand all Collapse all v0 v0.2.7 Jul 12, 2021 Changes in this version + var ErrInvalidKeyLen = fmt.Errorf("ecies: invalid key size (> %d) in ECIESParams", maxKeyLen) v0.1.4 Mar 6, 2020 Changes in this version + var DefaultCurve = ethcrypto.S256() + var ECIES_AES128_SHA256 = &ECIESParams + var ECIES_AES256_SHA256 = &ECIESParams + var ECIES_AES256_SHA384 = &ECIESParams + var ECIES_AES256_SHA512 = &ECIESParams + var ErrImport = fmt.Errorf("ecies: failed to import key") + var ErrInvalidCurve = fmt.Errorf("ecies: invalid elliptic curve") + var ErrInvalidMessage = fmt.Errorf("ecies: invalid message") + var ErrInvalidParams = fmt.Errorf("ecies: invalid ECIES parameters") + var ErrInvalidPublicKey = fmt.Errorf("ecies: invalid public key") + var ErrKeyDataTooLong = fmt.Errorf("ecies: can't supply requested key data") + var ErrSharedKeyIsPointAtInfinity = fmt.Errorf("ecies: shared key is point at infinity") + var ErrSharedKeyTooBig = fmt.Errorf("ecies: shared key params are too big") + var ErrSharedTooLong = fmt.Errorf("ecies: shared secret is too long") + var ErrUnsupportedECDHAlgorithm = fmt.Errorf("ecies: unsupported ECDH algorithm") + var ErrUnsupportedECIESParameters = fmt.Errorf("ecies: unsupported ECIES parameters") + func AddParamsForCurve(curve elliptic.Curve, params *ECIESParams) + func Encrypt(rand io.Reader, pub *PublicKey, m, s1, s2 []byte) (ct []byte, err error) + func MaxSharedKeyLength(pub *PublicKey) int + type ECIESParams struct + BlockSize int + Cipher func([]byte) (cipher.Block, error) + Hash func() hash.Hash + KeyLen int + func ParamsFromCurve(curve elliptic.Curve) (params *ECIESParams) + type PrivateKey struct + D *big.Int + func GenerateKey(rand io.Reader, curve elliptic.Curve, params *ECIESParams) (prv *PrivateKey, err error) + func ImportECDSA(prv *ecdsa.PrivateKey) *PrivateKey + func (prv *PrivateKey) Decrypt(c, s1, s2 []byte) (m []byte, err error) + func (prv *PrivateKey) ExportECDSA() *ecdsa.PrivateKey + func (prv *PrivateKey) GenerateShared(pub *PublicKey, skLen, macLen int) (sk []byte, err error) + type PublicKey struct + Params *ECIESParams + X *big.Int + Y *big.Int + func ImportECDSAPublic(pub *ecdsa.PublicKey) *PublicKey + func (pub *PublicKey) ExportECDSA() *ecdsa.PublicKey