cryptography
cryptography is a package which provides cryptographic recipes and primitives to Python developers.
Install
cryptography on PyPI
pip
pip install cryptographyuv
uv add cryptographypoetry
poetry add cryptographyPackage facts
| License | Apache-2.0 OR BSD-3-Clause (permissive) |
| Python support | supports the current Python release (!=3.9.0,!=3.9.1,>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — cffi, typing-extensions |
| Maintenance | actively maintained — 13 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the 100 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: cryptography-50.0.0-cp311-abi3-macosx_11_0_arm64.whl; cryptography-50.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; cryptography-50.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; cryptography-50.0.0-cp311-abi3-manylinux_2_28_aarch64.whl; cryptography-50.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl; cryptography-50.0.0-cp311-abi3-manylinux_2_28_x86_64.whl; cryptography-50.0.0-cp311-abi3-manylinux_2_31_armv7l.whl; cryptography-50.0.0-cp311-abi3-manylinux_2_34_aarch64.whl; cryptography-50.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl; cryptography-50.0.0-cp311-abi3-manylinux_2_34_x86_64.whl; cryptography-50.0.0-cp311-abi3-musllinux_1_2_aarch64.whl; cryptography-50.0.0-cp311-abi3-musllinux_1_2_x86_64.whl; cryptography-50.0.0-cp311-abi3-win_amd64.whl; cryptography-50.0.0-cp314-cp314t-macosx_11_0_arm64.whl; cryptography-50.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; cryptography-50.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; cryptography-50.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl; cryptography-50.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl; cryptography-50.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl; cryptography-50.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl
About cryptography
from the package's own PyPI description — quoted content, verbatim
pyca/cryptography
.. image:: https://img.shields.io/pypi/v/cryptography.svg :target: https://pypi.org/project/cryptography/ :alt: Latest Version
.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest :target: https://cryptography.io :alt: Latest Docs
.. image:: https://github.com/pyca/cryptography/actions/workflows/ci.yml/badge.svg :target: https://github.com/pyca/cryptography/actions/workflows/ci.yml?query=branch%3Amain
cryptography is a package which provides cryptographic recipes and
primitives to Python developers. Our goal is for it to be your "cryptographic
standard library". It supports Python 3.9+ and PyPy3 7.3.11+.
cryptography includes both high level recipes and low level interfaces to
common cryptographic algorithms such as symmetric ciphers, message digests, and
key derivation functions. For example, to encrypt something with
cryptography's high level symmetric encryption recipe:
.. code-block:: pycon
>>> from cryptography.fernet import Fernet
>>> # Put this somewhere safe!
>>> key = Fernet.generate_key()
>>> f = Fernet(key)
>>> token = f.encrypt(b"A really secret...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
cryptography provides cryptographic recipes and primitives—symmetric ciphers, message digests, key derivation, and high-level encryption interfaces—for Python developers to build secure applications.
Medium install friction due to compiled dependencies (cffi), but well-mitigated by extensive wheel coverage across Python 3.9–3.14, multiple architectures (x86_64, aarch64, armv7l, ppc64le), and active maintenance (last release 13 days ago).
Dual-licensed under Apache-2.0 OR BSD-3-Clause (permissive); users may choose either license, both allowing commercial use and modification with minimal restrictions.
Usage
pip install cryptography
from cryptography.fernet import Fernet
key = Fernet.generate_key()
f = Fernet(key)
token = f.encrypt(b"secret message")
f.decrypt(token)
Requires Python 3.9+ (excluding 3.9.0 and 3.9.1); cffi compilation may need a C compiler and development headers on some platforms.
Verdict: cryptography is a production-stable, top-100 PyPI package with active maintenance, no known vulnerabilities, and permissive licensing. Medium install friction is offset by comprehensive wheel distribution and strong community backing; suitable for any application requiring cryptographic operations.
Needs verification
- Whether cffi's build-time dependencies (C compiler, OpenSSL headers) are pre-satisfied in typical deployment environments
- Performance characteristics and suitability for high-throughput cryptographic workloads compared to alternatives
Similar packages
permissive · top 1,000 on PyPI
pycryptodomexpermissive · top 1,000 on PyPI
python-josepermissive · top 1,000 on PyPI
ecdsapermissive · top 1,000 on PyPI
pyOpenSSLpermissive · top 1,000 on PyPI
bcryptpermissive · top 1,000 on PyPI
oscryptopermissive · top 1,000 on PyPI
PyNaClpermissive · top 1,000 on PyPI
paramikocopyleft · top 1,000 on PyPI
PyOTPpermissive · top 1,000 on PyPI