{"id":26920,"library":"eciespy","title":"eciespy","description":"Elliptic Curve Integrated Encryption Scheme (ECIES) for secp256k1 and curve25519 in Python. Current version 0.4.6, supports Python >=3.9. Active development with multi-curve support and custom key pair generation.","status":"active","version":"0.4.6","language":"python","source_language":"en","source_url":"https://github.com/ecies/py","tags":["cryptography","ecies","elliptic-curve","secp256k1","curve25519"],"install":[{"cmd":"pip install eciespy","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"eciespy is the package name but the module is ecies","wrong":"from eciespy import encrypt","symbol":"encrypt","correct":"from ecies import encrypt"},{"note":"Same as encrypt, use ecies module","wrong":"from eciespy import decrypt","symbol":"decrypt","correct":"from ecies import decrypt"}],"quickstart":{"code":"import os\nfrom ecies import encrypt, decrypt\n\n# Generate a private key (hex)\nprivate_key = os.urandom(32).hex()\n# Derive public key (hex, uncompressed)\n# ecies can also use Ethereum-style keys\n# For quickstart, we use a known key pair:\nprivkey = '0x0000000000000000000000000000000000000000000000000000000000000001'\npubkey = '0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798'\n# Encrypt\nplaintext = b'Hello, ECIES!'\nciphertext = encrypt(pubkey, plaintext)\n# Decrypt\nassert decrypt(privkey, ciphertext) == plaintext\nprint('Success!')","lang":"python","description":"Basic encrypt/decrypt with secp256k1 keys."},"warnings":[{"fix":"Replace ecies.utils.xxx with new API from ecies.keys or ecies.consts.","message":"In v0.4.5, functions in ecies.utils are deprecated and will be removed after v0.5.0. Use ecies.keys or ecies.consts instead.","severity":"breaking","affected_versions":">=0.4.5"},{"fix":"Switch to homemade key pairs via ecies.keys.HomemadeKey or use the built-in key generation.","message":"The eth-keys dependency is optional since v0.4.4 and will be removed eventually. Ethereum-style keys may stop working.","severity":"deprecated","affected_versions":">=0.4.4"},{"fix":"Ensure public key is valid uncompressed '04' + 64 bytes or compressed '02'/'03' + 32 bytes.","message":"Keys must be hex strings with or without '0x' prefix. Encryption expects uncompressed public key (130 hex chars with '04' prefix) or compressed (66 hex chars).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from ecies import encrypt, decrypt' instead of 'eciespy'.","cause":"Wrong import path; the package is 'eciespy' but the module is 'ecies'.","error":"ImportError: cannot import name 'encrypt' from 'eciespy'"},{"fix":"Ensure public key is hex (130 or 66 characters) and starts with '04' for uncompressed.","cause":"Public key not in valid hex, or missing '04' prefix for uncompressed key.","error":"ValueError: Public key format is not correct"},{"fix":"Use 'from ecies.keys import generate_key_pair' or HomemadeKey.","cause":"Function was deprecated and moved in v0.4.5.","error":"AttributeError: module 'ecies.utils' has no attribute 'generate_key_pair'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}