Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Python binding to the Networking and Cryptography (NaCl) library

Project description

Latest Version https://travis-ci.org/pyca/pynacl.svg?branch=master https://codecov.io/github/pyca/pynacl/coverage.svg?branch=master

PyNaCl is a Python binding to libsodium, which is a fork of the Networking and Cryptography library. These libraries have a stated goal of improving usability, security and speed. It supports Python 2.7 and 3.3+ as well as PyPy 2.6+.

Installation

Linux

PyNaCl relies on libsodium, a portable C library. A copy is bundled with PyNaCl so to install you can run:

$ pip install pynacl

If you’d prefer to use one provided by your distribution you can disable the bundled copy during install by running:

$ SODIUM_INSTALL=system pip install pynacl

Mac OS X & Windows

PyNaCl ships as a binary wheel on OS X and Windows so all dependencies are included. Make sure you have an up-to-date pip and run:

$ pip install pynacl

Features

  • Digital signatures
  • Secret-key encryption
  • Public-key encryption

Changes

  • 1.1.2 - 2017-03-31:
    • reorder link time library search path when using bundled libsodium
  • 1.1.1 - 2017-03-15:
    • Fixed a circular import bug in nacl.utils.
  • 1.1.0 - 2017-03-14:
    • Dropped support for Python 2.6.
    • Added shared_key() method on Box.
    • You can now pass None to nonce when encrypting with Box or SecretBox and it will automatically generate a random nonce.
    • Added support for siphash24.
    • Added support for blake2b.
    • Added support for scrypt.
    • Update libsodium to 1.0.11.
    • Default to the bundled libsodium when compiling.
    • All raised exceptions are defined mixing-in nacl.exceptions.CryptoError
  • 1.0.1:
    • Fix an issue with absolute paths that prevented the creation of wheels.
  • 1.0:
    • PyNaCl has been ported to use the new APIs available in cffi 1.0+. Due to this change we no longer support PyPy releases older than 2.6.
    • Python 3.2 support has been dropped.
    • Functions to convert between Ed25519 and Curve25519 keys have been added.
  • 0.3.0:
    • The low-level API (nacl.c.*) has been changed to match the upstream NaCl C/C++ conventions (as well as those of other NaCl bindings). The order of arguments and return values has changed significantly. To avoid silent failures, nacl.c has been removed, and replaced with nacl.bindings (with the new argument ordering). If you have code which calls these functions (e.g. nacl.c.crypto_box_keypair()), you must review the new docstrings and update your code/imports to match the new conventions.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
PyNaCl-1.1.2-cp27-cp27m-macosx_10_6_intel.whl (178.8 kB) Copy SHA256 hash SHA256 Wheel cp27
PyNaCl-1.1.2-cp27-cp27m-manylinux1_i686.whl (478.9 kB) Copy SHA256 hash SHA256 Wheel cp27
PyNaCl-1.1.2-cp27-cp27m-manylinux1_x86_64.whl (539.8 kB) Copy SHA256 hash SHA256 Wheel cp27
PyNaCl-1.1.2-cp27-cp27mu-manylinux1_i686.whl (479.0 kB) Copy SHA256 hash SHA256 Wheel cp27
PyNaCl-1.1.2-cp27-cp27mu-manylinux1_x86_64.whl (539.8 kB) Copy SHA256 hash SHA256 Wheel cp27
PyNaCl-1.1.2-cp27-cp27m-win32.whl (138.8 kB) Copy SHA256 hash SHA256 Wheel cp27
PyNaCl-1.1.2-cp27-cp27m-win_amd64.whl (130.2 kB) Copy SHA256 hash SHA256 Wheel cp27
PyNaCl-1.1.2-cp33-cp33m-macosx_10_6_intel.whl (178.9 kB) Copy SHA256 hash SHA256 Wheel cp33
PyNaCl-1.1.2-cp33-cp33m-manylinux1_i686.whl (476.0 kB) Copy SHA256 hash SHA256 Wheel cp33
PyNaCl-1.1.2-cp33-cp33m-manylinux1_x86_64.whl (536.6 kB) Copy SHA256 hash SHA256 Wheel cp33
PyNaCl-1.1.2-cp33-cp33m-win32.whl (138.7 kB) Copy SHA256 hash SHA256 Wheel cp33
PyNaCl-1.1.2-cp33-cp33m-win_amd64.whl (130.1 kB) Copy SHA256 hash SHA256 Wheel cp33
PyNaCl-1.1.2-cp34-cp34m-macosx_10_6_intel.whl (178.9 kB) Copy SHA256 hash SHA256 Wheel cp34
PyNaCl-1.1.2-cp34-cp34m-manylinux1_i686.whl (476.2 kB) Copy SHA256 hash SHA256 Wheel cp34
PyNaCl-1.1.2-cp34-cp34m-manylinux1_x86_64.whl (536.7 kB) Copy SHA256 hash SHA256 Wheel cp34
PyNaCl-1.1.2-cp34-cp34m-win32.whl (138.7 kB) Copy SHA256 hash SHA256 Wheel cp34
PyNaCl-1.1.2-cp34-cp34m-win_amd64.whl (130.1 kB) Copy SHA256 hash SHA256 Wheel cp34
PyNaCl-1.1.2-cp35-cp35m-macosx_10_6_intel.whl (178.9 kB) Copy SHA256 hash SHA256 Wheel cp35
PyNaCl-1.1.2-cp35-cp35m-manylinux1_i686.whl (476.2 kB) Copy SHA256 hash SHA256 Wheel cp35
PyNaCl-1.1.2-cp35-cp35m-manylinux1_x86_64.whl (536.7 kB) Copy SHA256 hash SHA256 Wheel cp35
PyNaCl-1.1.2-cp35-cp35m-win32.whl (138.5 kB) Copy SHA256 hash SHA256 Wheel cp35
PyNaCl-1.1.2-cp35-cp35m-win_amd64.whl (140.0 kB) Copy SHA256 hash SHA256 Wheel cp35
PyNaCl-1.1.2-cp36-cp36m-macosx_10_6_intel.whl (178.9 kB) Copy SHA256 hash SHA256 Wheel cp36
PyNaCl-1.1.2-cp36-cp36m-manylinux1_i686.whl (476.1 kB) Copy SHA256 hash SHA256 Wheel cp36
PyNaCl-1.1.2-cp36-cp36m-manylinux1_x86_64.whl (536.7 kB) Copy SHA256 hash SHA256 Wheel cp36
PyNaCl-1.1.2-cp36-cp36m-win32.whl (140.0 kB) Copy SHA256 hash SHA256 Wheel cp36
PyNaCl-1.1.2-cp36-cp36m-win_amd64.whl (131.7 kB) Copy SHA256 hash SHA256 Wheel cp36
PyNaCl-1.1.2.tar.gz (3.1 MB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page