Python binding to the Networking and Cryptography (NaCl) library
Project description
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.4+ as well as PyPy 2.6+.
Features
Digital signatures
Secret-key encryption
Public-key encryption
Hashing and message authentication
Password based key derivation and password hashing
Installation
Binary wheel install
PyNaCl ships as a binary wheel on OS X, Windows and Linux manylinux1 [1] , so all dependencies are included. Make sure you have an up-to-date pip and run:
$ pip install pynacl
Linux source build
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 the version of libsodium provided by your distribution, you can disable the bundled copy during install by running:
$ SODIUM_INSTALL=system pip install pynacl
Changelog
1.3.0 2018-09-26
Added support for Python 3.7.
Update libsodium to 1.0.16.
Run and test all code examples in PyNaCl docs through sphinx’s doctest builder.
Add low-level bindings for chacha20-poly1305 AEAD constructions.
Add low-level bindings for the chacha20-poly1305 secretstream constructions.
Add low-level bindings for ed25519ph pre-hashed signing construction.
Add low-level bindings for constant-time increment and addition on fixed-precision big integers represented as little-endian byte sequences.
Add low-level bindings for the ISO/IEC 7816-4 compatible padding API.
Add low-level bindings for libsodium’s crypto_kx… key exchange construction.
Set hypothesis deadline to None in tests/test_pwhash.py to avoid incorrect test failures on slower processor architectures. GitHub issue #370
1.2.1 - 2017-12-04
Update hypothesis minimum allowed version.
Infrastructure: add proper configuration for readthedocs builder runtime environment.
1.2.0 - 2017-11-01
Update libsodium to 1.0.15.
Infrastructure: add jenkins support for automatic build of manylinux1 binary wheels
Added support for SealedBox construction.
Added support for argon2i and argon2id password hashing constructs and restructured high-level password hashing implementation to expose the same interface for all hashers.
Added support for 128 bit siphashx24 variant of siphash24.
Added support for from_seed APIs for X25519 keypair generation.
Dropped support for Python 3.3.
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 - 2016-01-24
Fix an issue with absolute paths that prevented the creation of wheels.
1.0 - 2016-01-23
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 - 2015-03-04
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for PyNaCl-1.3.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf459128feb543cfca16a95f8da31e2e65e4c5257d2f3dfa8c0c1031139c9c92 |
|
MD5 | bbe3a1832d7a7c64ff94871f0caa168e |
|
BLAKE2b-256 | e3439316326e8f1a69a4dfe93c3fc8230e2b7e20d15b0db70fa70d97fb7463a5 |
Hashes for PyNaCl-1.3.0-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53126cd91356342dcae7e209f840212a58dcf1177ad52c1d938d428eebc9fee5 |
|
MD5 | 5e8fe045da62b0d3510b170fbe39bf3f |
|
BLAKE2b-256 | 046fb7a37c8f4939cad599593a98aa1c9dca346b62646c415851768f6ebf61b4 |
Hashes for PyNaCl-1.3.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd4ecb473a96ad0f90c20acba4f0bf0df91a4e03a1f4dd6a4bdc9ca75aa3a715 |
|
MD5 | 3328f4d61a4bfd1de8e2710a45ac2698 |
|
BLAKE2b-256 | fce7179847c0dce637c59cea416c75b8de1ec1e862358c7369ad99c1fad00158 |
Hashes for PyNaCl-1.3.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d23c04e8d709444220557ae48ed01f3f1086439f12dbf11976e849a4926db56 |
|
MD5 | 454f5816471e281d12606a1beaf09e65 |
|
BLAKE2b-256 | 5fec124aa6519da0dad93dd6b056a9489d4b5893d7272e85366ffeeae7e806de |
Hashes for PyNaCl-1.3.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6482d3017a0c0327a49dddc8bd1074cc730d45db2ccb09c3bac1f8f32d1eb61b |
|
MD5 | 59ca9a8bc48f1ec4fb035c00b4f5d236 |
|
BLAKE2b-256 | b50f5f21bd04c8f45685c7b72013fc8efaf0e25baf3b77e62b3b915b5b43a7b6 |
Hashes for PyNaCl-1.3.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a39f54ccbcd2757d1d63b0ec00a00980c0b382c62865b61a505163943624ab20 |
|
MD5 | 8fa23a6103eb0db3ab15f4c23f74a2e1 |
|
BLAKE2b-256 | 1c22503bf38e31b7d0bc87f9069a461d02b5f2938f87f0ec4ce7300147f1edf2 |
Hashes for PyNaCl-1.3.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57ef38a65056e7800859e5ba9e6091053cd06e1038983016effaffe0efcd594a |
|
MD5 | 62658961bbc273bddc1b62a9d3510013 |
|
BLAKE2b-256 | 26bd6e61346d761b3a6698ccd972e1b319af6f603b68518154b3834ce1892c12 |
Hashes for PyNaCl-1.3.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37aa336a317209f1bb099ad177fef0da45be36a2aa664507c5d72015f956c310 |
|
MD5 | 95a5cf42712c75f9a56d13b8b065683e |
|
BLAKE2b-256 | 30809d2a937a7ccf72b78528e59d8d6adf7e95269c261df3a51e70782722b048 |
Hashes for PyNaCl-1.3.0-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c780712b206317a746ace34c209b8c29dbfd841dfbc02aa27f2084dd3db77ae |
|
MD5 | 078231bf5ffaf46ea3dd1e7d4efcaf80 |
|
BLAKE2b-256 | bd4ab0a11801e242f197e1024003dedfacdd11afda8d3e2ddb5f5817b672dcb0 |
Hashes for PyNaCl-1.3.0-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d3ce02c0784b7cbcc771a2da6ea51f87e8716004512493a2b69016326301c3b |
|
MD5 | 5738a90672a606e5908006a709167e57 |
|
BLAKE2b-256 | bc17b596dd4180cd8275932fa20db144391e80bfd3eafbd121612f53ff1072e1 |
Hashes for PyNaCl-1.3.0-cp34-abi3-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aabb0c5232910a20eec8563503c153a8e78bbf5459490c49ab31f6adf3f3a415 |
|
MD5 | 074fb13a222e2a65e0def4919b087376 |
|
BLAKE2b-256 | 27152cd0a203f318c2240b42cd9dd13c931ddd61067809fee3479f44f086103e |
Hashes for PyNaCl-1.3.0-cp34-abi3-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bd61e9b44c543016ce1f6aef48606280e45f892a928ca7068fba30021e9b786 |
|
MD5 | a671295c9915ec06c55dcddf2bc23ec2 |
|
BLAKE2b-256 | 72efa4bd597e5afa1755b5e3a98fc3f5eb399b40c17860f1eadc1502a6e2ce7f |
Hashes for PyNaCl-1.3.0-cp34-abi3-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4943decfc5b905748f0756fdd99d4f9498d7064815c4cf3643820c9028b711d1 |
|
MD5 | d7ad9460931bbbf133c9c6d7d6cfdba8 |
|
BLAKE2b-256 | cdc94d6deea9d900345b1243cc3e6265110697fae5e594689cfa1ba34e0ef4a8 |
Hashes for PyNaCl-1.3.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d0a8171a68edf51add1e73d2159c4bc19fc0718e79dec51166e940856c2f28e |
|
MD5 | e4f6bf35e52a57c43f6088ca1247ab53 |
|
BLAKE2b-256 | b325e605574f24948a8a53b497744e93f061eb1dbe7c44b6465fc1c172d591aa |
Hashes for PyNaCl-1.3.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2da3c13307eac601f3de04887624939aca8ee3c9488a0bb0eca4fb9401fc6b1 |
|
MD5 | 97377be9592dfbf95b7f8b1ae24df09f |
|
BLAKE2b-256 | a9d638dbb94cde7381b6650d510331b7bff98dd3aed750482134e54ac37294ad |
Hashes for PyNaCl-1.3.0-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f67814c38162f4deb31f68d590771a29d5ae3b1bd64b75cf232308e5c74777e0 |
|
MD5 | 6986740050ebd54af8524c6748a9eeae |
|
BLAKE2b-256 | 87b6dafe0c559ff240290d44ca5b015ee651dc4cbcf54325c4cd2d3df61e3693 |
Hashes for PyNaCl-1.3.0-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a14e499c0f5955dcc3991f785f3f8e2130ed504fa3a7f44009ff458ad6bdd17f |
|
MD5 | 585f7bb52a53ca9769cafc84f93aa12b |
|
BLAKE2b-256 | 877e68397739fe622f340cff2f4b336491578848fdce15063acae4728ab5c3e3 |
Hashes for PyNaCl-1.3.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05c26f93964373fc0abe332676cb6735f0ecad27711035b9472751faa8521255 |
|
MD5 | 4e02b2400837b8d29f4203222870e905 |
|
BLAKE2b-256 | 4ae6e6c36a758c3556f92124d39e16ca2afe7408a61d0ffb00c636081f044088 |
Hashes for PyNaCl-1.3.0-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30f36a9c70450c7878053fa1344aca0145fd47d845270b43a7ee9192a051bf39 |
|
MD5 | 7208602728b0c2dab40271d6c1ffbc81 |
|
BLAKE2b-256 | 597d9a073e7dad9c22f5622b725de572a69c4adcf525c2c01925ba6664b8f450 |
Hashes for PyNaCl-1.3.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2424c8b9f41aa65bbdbd7a64e73a7450ebb4aa9ddedc6a081e7afcc4c97f7621 |
|
MD5 | 2ab0256a1c8f3ab37e61488b5488a522 |
|
BLAKE2b-256 | 51832db5b919bf9848fe25d301225a16faabc378419e7eaf00da0b7d200fe801 |