A self-contained cryptographic library for Python https://www.pycryptodome.org
Find a file
2018-12-24 13:14:46 +00:00
appveyor Download wheels into a dedicated directory 2018-04-08 21:38:05 +02:00
Doc Remove superfluous colon 2018-12-18 16:50:38 +01:00
lib/Crypto Add (experimental) API to initialize SHA-1 with a certain state 2018-12-24 13:14:46 +00:00
src Add (experimental) API to initialize SHA-1 with a certain state 2018-12-24 13:14:46 +00:00
travis Build OSX wheels only on tags 2018-11-24 15:02:15 +01:00
.gitignore Bug fixes on RsaKey class 2015-11-13 22:05:14 +01:00
.travis.yml Build OSX wheels only on tags 2018-11-24 15:02:15 +01:00
appveyor.yml Fix typos 2018-09-28 21:44:35 +02:00
AUTHORS.rst update authors info 2018-11-30 01:14:08 +01:00
bench_monty.py Rough benchmarker 2018-01-22 00:15:30 +01:00
Changelog.rst Bump version 2018-11-26 20:14:10 +01:00
compiler_opt.py Fix setting debug flag 2018-12-01 08:27:32 +01:00
FuturePlans.rst More updates to docs 2018-10-11 22:31:01 +02:00
INSTALL.rst GMP headers are not needed for installation 2018-10-02 19:18:23 +02:00
LICENSE.rst Correct spelling error in OCB license and cite US patent numbers 2018-11-21 11:40:59 -06:00
MANIFEST.in Move auto-detection logic into separate file 2018-11-26 12:39:46 +01:00
pct-speedtest.py Drop support for EOL Python 2.4 2018-09-24 08:51:20 +03:00
README.rst First version 2018-10-11 22:31:01 +02:00
setup.py Fix for correctly removing module in Cryptodome 2018-11-26 21:19:04 +01:00

.. image:: https://travis-ci.org/Legrandin/pycryptodome.svg?branch=master
   :target: https://travis-ci.org/Legrandin/pycryptodome

.. image:: https://ci.appveyor.com/api/projects/status/mbxyqdodw9ylfib9/branch/master?svg=true
   :target: https://ci.appveyor.com/project/Legrandin/pycryptodome

PyCryptodome
============

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

It supports Python 2.6 and 2.7, Python 3.4 and newer, and PyPy.

The installation procedure depends on the package you want the library to be in.
PyCryptodome can be used as:

#. **an almost drop-in replacement for the old PyCrypto library**.
   You install it with::

       pip install pycryptodome
   
   In this case, all modules are installed under the ``Crypto`` package.
    
   One must avoid having both PyCrypto and PyCryptodome installed
   at the same time, as they will interfere with each other.

   This option is therefore recommended only when you are sure that
   the whole application is deployed in a ``virtualenv``.

#. **a library independent of the old PyCrypto**.
   You install it with::

       pip install pycryptodomex
   
   In this case, all modules are installed under the ``Cryptodome`` package.
   PyCrypto and PyCryptodome can coexist.

For faster public key operations in Unix, you should install `GMP`_ in your system.

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

* Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
* Accelerated AES on Intel platforms via AES-NI
* First class support for PyPy
* Elliptic curves cryptography (NIST P-256 curve only)
* 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), SHA-512/t and BLAKE2 hash algorithms
* Salsa20 and ChaCha20 stream ciphers
* Poly1305 MAC
* ChaCha20-Poly1305 authenticated cipher
* scrypt and HKDF
* Deterministic (EC)DSA
* 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`_.

.. _`homepage`: http://www.pycryptodome.org
.. _`GMP`: https://gmplib.org
.. _GitHub: https://github.com/Legrandin/pycryptodome