PyCryptodome is a self-contained cryptographic library for Python that provides low-level cryptographic primitives.
The library solves the problem of needing modern, well-maintained cryptographic functionality in Python by offering a fork of the older PyCrypto with substantial enhancements. It implements algorithms primarily in pure Python, with performance-critical components like block ciphers written as C extensions. This hybrid approach balances portability with speed. The tool sources random numbers directly from the operating system rather than relying on userspace CSPRNGs, and it can be installed either as a drop-in replacement for PyCrypto under the Crypto package namespace or as an independent library under the Cryptodome namespace to allow coexistence with PyCrypto.
Developers should choose this library if they need authenticated encryption modes, elliptic curve cryptography including modern curves like Ed25519 and Curve25519, or modern hash algorithms such as SHA-3 and BLAKE2. It suits projects requiring comprehensive cryptographic coverage without external dependencies like OpenSSL. The tool supports Python 2.7, Python 3.7 and newer versions, and PyPy. On Unix systems, installing GMP separately can accelerate public key operations. The independent Cryptodome namespace installation is recommended when PyCrypto coexistence is needed, while the Crypto namespace option works best in isolated virtual environments.
Development activity shows consistent integration testing through automated workflows and active package maintenance across multiple distribution channels. The project maintains a dedicated security contact for vulnerability reporting, indicating a structured approach to handling security issues.