Debian Codegraph @

README.rst

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 .. image:: https://github.com/Legrandin/pycryptodome/workflows/Integration%20test/badge.svg?branch=master
2 :target: https://github.com/Legrandin/pycryptodome/actions
3
4 .. image:: https://badge.fury.io/py/pycryptodome.svg
5 :target: https://pypi.org/project/pycryptodome
6
7 .. image:: https://badge.fury.io/py/pycryptodomex.svg
8 :target: https://pypi.org/project/pycryptodomex
9
10 PyCryptodome
11 ============
12
13 PyCryptodome is a self-contained Python package of low-level
14 cryptographic primitives.
15
16 It supports Python 2.7, Python 3.5 and newer, and PyPy.
17
18 The installation procedure depends on the package you want the library to be in.
19 PyCryptodome can be used as:
20
21 #. **an almost drop-in replacement for the old PyCrypto library**.
22 You install it with::
23
24 pip install pycryptodome
25
26 In this case, all modules are installed under the ``Crypto`` package.
27
28 One must avoid having both PyCrypto and PyCryptodome installed
29 at the same time, as they will interfere with each other.
30
31 This option is therefore recommended only when you are sure that
32 the whole application is deployed in a ``virtualenv``.
33
34 #. **a library independent of the old PyCrypto**.
35 You install it with::
36
37 pip install pycryptodomex
38
39 In this case, all modules are installed under the ``Cryptodome`` package.
40 PyCrypto and PyCryptodome can coexist.
41
42 For faster public key operations in Unix, you should install `GMP`_ in your system.
43
44 PyCryptodome is a fork of PyCrypto. It brings the following enhancements
45 with respect to the last official version of PyCrypto (2.6.1):
46
47 * Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
48 * Accelerated AES on Intel platforms via AES-NI
49 * First class support for PyPy
50 * Elliptic curves cryptography (NIST P-curves; Ed25519, Ed448)
51 * Better and more compact API (`nonce` and `iv` attributes for ciphers,
52 automatic generation of random nonces and IVs, simplified CTR cipher mode,
53 and more)
54 * SHA-3 hash algorithms (FIPS 202) and derived functions (NIST SP-800 185):
55
56 - SHAKE128 and SHA256 XOFs
57 - cSHAKE128 and cSHAKE256 XOFs
58 - KMAC128 and KMAC256
59 - TupleHash128 and TupleHash256
60
61 * KangarooTwelve, TurboSHAKE128, and TurboSHAKE256 XOFs
62 * Truncated hash algorithms SHA-512/224 and SHA-512/256 (FIPS 180-4)
63 * BLAKE2b and BLAKE2s hash algorithms
64 * Salsa20 and ChaCha20/XChaCha20 stream ciphers
65 * Poly1305 MAC
66 * ChaCha20-Poly1305 and XChaCha20-Poly1305 authenticated ciphers
67 * scrypt, bcrypt, HKDF, and NIST SP 800 108r1 Counter Mode key derivation functions
68 * Deterministic (EC)DSA and EdDSA
69 * Password-protected PKCS#8 key containers
70 * Shamir's Secret Sharing scheme
71 * Random numbers get sourced directly from the OS (and not from a CSPRNG in userspace)
72 * Simplified install process, including better support for Windows
73 * Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
74 * Major clean ups and simplification of the code base
75
76 PyCryptodome is not a wrapper to a separate C library like *OpenSSL*.
77 To the largest possible extent, algorithms are implemented in pure Python.
78 Only the pieces that are extremely critical to performance (e.g. block ciphers)
79 are implemented as C extensions.
80
81 For more information, see the `homepage`_.
82
83 For security issues, please send an email to [email protected].
84
85 All the code can be downloaded from `GitHub`_.
86
87 .. _`homepage`: https://www.pycryptodome.org
88 .. _`GMP`: https://gmplib.org
89 .. _GitHub: https://github.com/Legrandin/pycryptodome