DESCRIPTION.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. PyNaCl
  2. ======
  3. .. image:: https://img.shields.io/pypi/v/pynacl.svg
  4. :target: https://pypi.python.org/pypi/PyNaCl/
  5. :alt: Latest Version
  6. .. image:: https://travis-ci.org/pyca/pynacl.svg?branch=master
  7. :target: https://travis-ci.org/pyca/pynacl
  8. .. image:: https://codecov.io/github/pyca/pynacl/coverage.svg?branch=master
  9. :target: https://codecov.io/github/pyca/pynacl?branch=master
  10. PyNaCl is a Python binding to `libsodium`_, which is a fork of the
  11. `Networking and Cryptography library`_. These libraries have a stated goal of
  12. improving usability, security and speed. It supports Python 2.7 and 3.3+ as
  13. well as PyPy 2.6+.
  14. .. _Networking and Cryptography library: https://nacl.cr.yp.to/
  15. Installation
  16. ------------
  17. Linux
  18. ~~~~~
  19. PyNaCl relies on `libsodium`_, a portable C library. A copy is bundled
  20. with PyNaCl so to install you can run:
  21. .. code-block:: console
  22. $ pip install pynacl
  23. If you'd prefer to use one provided by your distribution you can disable
  24. the bundled copy during install by running:
  25. .. code-block:: console
  26. $ SODIUM_INSTALL=system pip install pynacl
  27. .. _libsodium: https://github.com/jedisct1/libsodium
  28. Mac OS X & Windows
  29. ~~~~~~~~~~~~~~~~~~
  30. PyNaCl ships as a binary wheel on OS X and Windows so all dependencies
  31. are included. Make sure you have an up-to-date pip and run:
  32. .. code-block:: console
  33. $ pip install pynacl
  34. Features
  35. --------
  36. * Digital signatures
  37. * Secret-key encryption
  38. * Public-key encryption
  39. Changes
  40. -------
  41. * 1.1.2 - 2017-03-31:
  42. * reorder link time library search path when using bundled
  43. libsodium
  44. * 1.1.1 - 2017-03-15:
  45. * Fixed a circular import bug in ``nacl.utils``.
  46. * 1.1.0 - 2017-03-14:
  47. * Dropped support for Python 2.6.
  48. * Added ``shared_key()`` method on ``Box``.
  49. * You can now pass ``None`` to ``nonce`` when encrypting with ``Box`` or
  50. ``SecretBox`` and it will automatically generate a random nonce.
  51. * Added support for ``siphash24``.
  52. * Added support for ``blake2b``.
  53. * Added support for ``scrypt``.
  54. * Update ``libsodium`` to 1.0.11.
  55. * Default to the bundled ``libsodium`` when compiling.
  56. * All raised exceptions are defined mixing-in
  57. ``nacl.exceptions.CryptoError``
  58. * 1.0.1:
  59. * Fix an issue with absolute paths that prevented the creation of wheels.
  60. * 1.0:
  61. * PyNaCl has been ported to use the new APIs available in cffi 1.0+.
  62. Due to this change we no longer support PyPy releases older than 2.6.
  63. * Python 3.2 support has been dropped.
  64. * Functions to convert between Ed25519 and Curve25519 keys have been added.
  65. * 0.3.0:
  66. * The low-level API (`nacl.c.*`) has been changed to match the
  67. upstream NaCl C/C++ conventions (as well as those of other NaCl bindings).
  68. The order of arguments and return values has changed significantly. To
  69. avoid silent failures, `nacl.c` has been removed, and replaced with
  70. `nacl.bindings` (with the new argument ordering). If you have code which
  71. calls these functions (e.g. `nacl.c.crypto_box_keypair()`), you must review
  72. the new docstrings and update your code/imports to match the new
  73. conventions.