Versions in this module Expand all Collapse all v1 v1.0.3 Sep 5, 2024 v1.0.2 Sep 5, 2024 Changes in this version + var DefaultCurve = ethcrypto.S256() + var ECIES_AES128_SHA256 = &ECIESParams + var ECIES_AES192_SHA384 = &ECIESParams + var ECIES_AES256_SHA256 = &ECIESParams + var ECIES_AES256_SHA384 = &ECIESParams + var ECIES_AES256_SHA512 = &ECIESParams + var ErrImport = errors.New("ecies: failed to import key") + var ErrInvalidCurve = errors.New("ecies: invalid elliptic curve") + var ErrInvalidKeyLen = fmt.Errorf("ecies: invalid key size (> %d) in ECIESParams", maxKeyLen) + var ErrInvalidMessage = errors.New("ecies: invalid message") + var ErrInvalidPublicKey = errors.New("ecies: invalid public key") + var ErrSharedKeyIsPointAtInfinity = errors.New("ecies: shared key is point at infinity") + var ErrSharedKeyTooBig = errors.New("ecies: shared key params are too big") + var ErrSharedTooLong = errors.New("ecies: shared secret is too long") + var ErrUnsupportedECDHAlgorithm = errors.New("ecies: unsupported ECDH algorithm") + var ErrUnsupportedECIESParameters = errors.New("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