README.rst 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .. image:: https://travis-ci.org/Legrandin/pycryptodome.svg?branch=master
  2. :target: https://travis-ci.org/Legrandin/pycryptodome
  3. .. image:: https://ci.appveyor.com/api/projects/status/mbxyqdodw9ylfib9/branch/master?svg=true
  4. :target: https://ci.appveyor.com/project/Legrandin/pycryptodome
  5. PyCryptodome
  6. ============
  7. PyCryptodome is a self-contained Python package of low-level
  8. cryptographic primitives.
  9. It supports Python 2.6 and 2.7, Python 3.4 and newer, and PyPy.
  10. The installation procedure depends on the package you want the library to be in.
  11. PyCryptodome can be used as:
  12. #. **an almost drop-in replacement for the old PyCrypto library**.
  13. You install it with::
  14. pip install pycryptodome
  15. In this case, all modules are installed under the ``Crypto`` package.
  16. One must avoid having both PyCrypto and PyCryptodome installed
  17. at the same time, as they will interfere with each other.
  18. This option is therefore recommended only when you are sure that
  19. the whole application is deployed in a ``virtualenv``.
  20. #. **a library independent of the old PyCrypto**.
  21. You install it with::
  22. pip install pycryptodomex
  23. In this case, all modules are installed under the ``Cryptodome`` package.
  24. PyCrypto and PyCryptodome can coexist.
  25. For faster public key operations in Unix, you should install `GMP`_ in your system.
  26. PyCryptodome is a fork of PyCrypto. It brings the following enhancements
  27. with respect to the last official version of PyCrypto (2.6.1):
  28. * Authenticated encryption modes (GCM, CCM, EAX, SIV, OCB)
  29. * Accelerated AES on Intel platforms via AES-NI
  30. * First class support for PyPy
  31. * Elliptic curves cryptography (NIST P-256, P-384 and P-521 curves only)
  32. * Better and more compact API (`nonce` and `iv` attributes for ciphers,
  33. automatic generation of random nonces and IVs, simplified CTR cipher mode,
  34. and more)
  35. * SHA-3 (including SHAKE XOFs), truncated SHA-512 and BLAKE2 hash algorithms
  36. * Salsa20 and ChaCha20/XChaCha20 stream ciphers
  37. * Poly1305 MAC
  38. * ChaCha20-Poly1305 and XChaCha20-Poly1305 authenticated ciphers
  39. * scrypt, bcrypt and HKDF derivation functions
  40. * Deterministic (EC)DSA
  41. * Password-protected PKCS#8 key containers
  42. * Shamir's Secret Sharing scheme
  43. * Random numbers get sourced directly from the OS (and not from a CSPRNG in userspace)
  44. * Simplified install process, including better support for Windows
  45. * Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
  46. * Major clean ups and simplification of the code base
  47. PyCryptodome is not a wrapper to a separate C library like *OpenSSL*.
  48. To the largest possible extent, algorithms are implemented in pure Python.
  49. Only the pieces that are extremely critical to performance (e.g. block ciphers)
  50. are implemented as C extensions.
  51. For more information, see the `homepage`_.
  52. All the code can be downloaded from `GitHub`_.
  53. .. _`homepage`: https://www.pycryptodome.org
  54. .. _`GMP`: https://gmplib.org
  55. .. _GitHub: https://github.com/Legrandin/pycryptodome