pycryptodome

Cryptographic library for Python

BSD, Public Domain 58 个版本 Python !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7
Helder Eijs <helderijs@gmail.com>
安装
pip install pycryptodome
poetry add pycryptodome
pipenv install pycryptodome
conda install pycryptodome
描述

PyCryptodome

PyCryptodome is a self-contained Python package of low-level cryptographic primitives.

It supports Python 2.7, Python 3.7 and newer, and PyPy.

You can install it with::

pip install pycryptodome

All modules are installed under the Crypto package.

Check the pycryptodomex_ project for the equivalent library that works under the Cryptodome package.

PyCryptodome is a fork of PyCrypto. It brings several enhancements with respect to the last official version of PyCrypto (2.6.1), for instance:

  • Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB, KW, KWP)
  • Hybrid Public Key Encryption (HPKE)
  • Accelerated AES on Intel platforms via AES-NI
  • First class support for PyPy
  • Elliptic curves cryptography (NIST P-curves; Ed25519, Ed448, Curve25519)
  • Better and more compact API (nonce and iv attributes for ciphers, automatic generation of random nonces and IVs, simplified CTR cipher mode, and more)
  • SHA-3 (including SHAKE XOFs) and BLAKE2 hash algorithms
  • Salsa20 and ChaCha20 stream ciphers
  • scrypt and HKDF
  • Deterministic (EC)DSA and EdDSA
  • Password-protected PKCS#8 key containers
  • Shamir's Secret Sharing scheme
  • Random numbers get sourced directly from the OS (and not from a CSPRNG in userspace)
  • Simplified install process, including better support for Windows
  • Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
  • Major clean ups and simplification of the code base

PyCryptodome is not a wrapper to a separate C library like OpenSSL. To the largest possible extent, algorithms are implemented in pure Python. Only the pieces that are extremely critical to performance (e.g. block ciphers) are implemented as C extensions.

For more information, see the homepage_.

All the code can be downloaded from GitHub_.

.. _pycryptodomex: https://pypi.python.org/pypi/pycryptodomex .. _homepage: http://www.pycryptodome.org .. _GitHub: https://github.com/Legrandin/pycryptodome

版本列表
3.23.0 2025-05-17
3.22.0 2025-03-15
3.21.0 2024-10-02
3.20.0 2024-01-10
3.19.1 2023-12-28
3.19.0 2023-09-16
3.18.0 2023-05-19
3.17 2023-01-28
3.16.0 2022-11-26
3.15.0 2022-06-22
3.14.1 2022-02-04
3.14.0 2022-01-30
3.13.0 2022-01-23
3.12.0 2021-12-04
3.11.0 2021-10-08
3.10.4 2021-09-24
3.10.3 2021-09-24
3.10.1 2021-02-09
3.9.9 2020-11-02
3.9.8 2020-06-24
3.9.7 2020-02-21
3.9.6 2020-02-02
3.9.4 2019-11-18
3.9.3 2019-11-12
3.9.2 2019-11-10
3.9.1 2019-11-02
3.9.0 2019-08-28
3.8.2 2019-05-30
3.8.1 2019-04-04
3.8.0 2019-03-23
3.7.3 2019-01-20
3.7.2 2018-11-26
3.7.1 2018-11-25
3.7.0 2018-10-28
3.6.6 2018-08-17
3.6.5 2018-08-12
3.6.4 2018-07-10
3.6.3 2018-06-21
3.6.1 2018-04-16
3.6.0 2018-04-08
3.5.1 2018-03-08
3.5.0 2018-03-07
3.4.11 2018-02-04
3.4.9 2018-02-01
3.4.8 2018-01-28
3.4.7 2017-08-26
3.4.6 2017-05-17
3.4.5 2017-02-07
3.4.4 2017-02-02
3.4.3 2016-10-17
3.4 2016-02-07
3.3.1 2015-11-02
3.3 2015-10-28
3.2.1 2015-09-09
3.2 2015-09-05
3.1 2015-03-16
3.0 2014-07-01
3.0rc1 2014-06-14