{"id":24648,"library":"sslcrypto","title":"sslcrypto","description":"sslcrypto is a Python library providing ECIES (Elliptic Curve Integrated Encryption Scheme), AES, and RSA encryption with OpenSSL-based implementation and a pure Python fallback. Current version 5.3 offers multiple backends (OpenSSL, LibreSSL, cryptography, pure Python) and supports a wide range of curves and RSA key sizes. Release cadence is irregular, with occasional major version bumps due to API changes.","status":"active","version":"5.3","language":"python","source_language":"en","source_url":"https://github.com/imachug/sslcrypto","tags":["encryption","elliptic-curve","aes","rsa","ecies","crypto","openssl"],"install":[{"cmd":"pip install sslcrypto","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install sslcrypto[all]","lang":"bash","label":"Install with all backend dependencies"}],"dependencies":[{"reason":"Optional backend for faster operations","package":"cryptography","optional":true}],"imports":[{"note":"Module is lowercase 'aes' in version 5.x","wrong":"from sslcrypto import AES","symbol":"aes","correct":"from sslcrypto import aes"},{"note":"Module is 'ecc' and does not export 'ECC' class","wrong":"from sslcrypto.ecc import ECC","symbol":"ecc","correct":"from sslcrypto import ecc"},{"note":"Module is 'rsa', not 'RSA'","wrong":"from sslcrypto.rsa import RSA","symbol":"rsa","correct":"from sslcrypto import rsa"}],"quickstart":{"code":"from sslcrypto import aes\n\nkey = aes.generate_key()\niv = aes.generate_iv()\n\ncipher = aes.new(key, aes.MODE_CBC, iv=iv)\nencrypted = cipher.encrypt(b'secret message')\n\ndecipher = aes.new(key, aes.MODE_CBC, iv=iv)\ndecrypted = decipher.decrypt(encrypted)\nprint(decrypted)","lang":"python","description":"Generate an AES key, IV, encrypt and decrypt a message using CBC mode."},"warnings":[{"fix":"Update to new pattern if you were passing curve as keyword to low-level functions; generally safe if using high-level wrappers.","message":"Version 4.x to 5.x broke named curve arguments: use curve name as string directly, not as key in a dict. Previous usage `curve='secp256k1'` still works, but internal API changed.","severity":"breaking","affected_versions":">=5.0"},{"fix":"Encode/decode to base64 manually if needed: base64.b64encode(encrypted)","message":"AES encryption in version 5 returns bytes object in Python 3, not base64 string as in older versions. Decryption expects raw bytes.","severity":"breaking","affected_versions":">=5.0"},{"fix":"Use cipher.encrypt(data) instead of cipher.ciphertext","message":"The `ciphertext` attribute of AES objects is deprecated; use `cipher.encrypt()` return value directly.","severity":"deprecated","affected_versions":">=4.0"},{"fix":"pip install sslcrypto[all]","message":"Default backend selection may fail on systems without OpenSSL. Install with `[all]` extra to ensure fallback works.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'5.3':30 'ae':14,67 'api':61 'backend':33 'base':21 'bump':58 'cadenc':51 'chang':62 'crypto':70 'cryptographi':36 'current':28 'curv':10,45,66 'due':59 'eci':8,69 'ellipt':9,65 'elliptic-curv':64 'encrypt':12,17,63 'fallback':27 'implement':22 'integr':11 'irregular':53 'key':48 'librari':6 'libressl':35 'major':56 'multipl':32 'occasion':55 'offer':31 'openssl':20,34,71 'openssl-bas':19 'provid':7 'pure':25,37 'python':5,26,38 'rang':43 'releas':50 'rsa':16,47,68 'scheme':13 'size':49 'sslcrypto':1,2 'support':40 'version':29,57 'wide':42","created_at":"2026-05-01T08:14:11.786547+00:00","updated_at":"2026-05-01T08:14:11.786547+00:00","problems":[{"fix":"Run `pip install sslcrypto`","cause":"sslcrypto is not installed.","error":"ModuleNotFoundError: No module named 'sslcrypto'"},{"fix":"Install sslcrypto with 'all' extra: `pip install sslcrypto[all]`","cause":"No OpenSSL, LibreSSL, or cryptography library found. Pure Python fallback not available because optional dependencies are missing.","error":"sslcrypto.lib.backend.UnavailableBackendError: Cannot find any suitable backend"},{"fix":"Ensure iv is bytes: `iv = b'some_16_byte_iv'` or `iv = os.urandom(16)`","cause":"Passed a non-bytes value (e.g., string) to AES initialization (iv argument).","error":"TypeError: initial_value must be bytes or None"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"5.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/imachug/sslcrypto","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sslcrypto/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth-security","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}