Skip to main content

PySPX Build Status

This repository contains a Python package that provides bindings for SPHINCS+. It provides support for all parameter sets included as part of the SPHINCS+ submission to NIST's Post-Quantum Cryptography Standardization project.

While this package is functionally complete, it may still be subject to small API changes. Currently, the bindings only wrap the reference code. Code optimized for specific platforms (such as machines with AVX2 or AESNI support) is ignored.

Installation

The package is available on PyPI and can be installed by simply calling pip install pyspx. Note that it may take a few moments to compile the SPHINCS+ code for your platform.

API

After installing the package, import a specific instance of SPHINCS+ as follows (e.g. for shake256-128f):

import pyspx.shake256_128f

This exposes the following straight-forward functions. All parameters are assumed to be bytes objects. Similarly, the returned keys and signatures are bytes. The verify function returns a boolean indicating success or failure.

>>> public_key, secret_key = pyspx.shake256_128f.generate_keypair(seed)
>>> signature = pyspx.shake256_128f.sign(message, secret_key)
>>> pyspx.shake256_128f.verify(message, signature, public_key)
True

Additionally, the following attributes expose the expected sizes, as a consequence of the selected parameter set:

>>> pyspx.shake256_128f.crypto_sign_BYTES
29792
>>> pyspx.shake256_128f.crypto_sign_PUBLICKEYBYTES
64
>>> pyspx.shake256_128f.crypto_sign_SECRETKEYBYTES
128
>>> pyspx.shake256_128f.crypto_sign_SEEDBYTES
96

Custom SPHINCS+ parameters

It is fairly easy to compile with additional SPHINCS+ parameters. To do this, clone the repository, initialize the src/sphincsplus submodule, and add a new parameter set to src/sphincsplus/ref/params. Make sure to follow the params-sphincs-[parameters-shorthand].h naming convention. Installing the Python package from this modified source will expose the parameter set using the API described above.

Download files

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

Source Distribution

PySPX-0.2.0.tar.gz (106.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

PySPX-0.2.0-cp37-cp37m-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7m

PySPX-0.2.0-cp37-cp37m-manylinux1_i686.whl (866.0 kB view details)

Uploaded CPython 3.7m

PySPX-0.2.0-cp36-cp36m-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.6m

PySPX-0.2.0-cp36-cp36m-manylinux1_i686.whl (866.0 kB view details)

Uploaded CPython 3.6m

PySPX-0.2.0-cp35-cp35m-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.5m

PySPX-0.2.0-cp35-cp35m-manylinux1_i686.whl (866.0 kB view details)

Uploaded CPython 3.5m

PySPX-0.2.0-cp34-cp34m-manylinux1_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.4m

PySPX-0.2.0-cp34-cp34m-manylinux1_i686.whl (866.0 kB view details)

Uploaded CPython 3.4m

PySPX-0.2.0-cp27-cp27mu-manylinux1_x86_64.whl (1.1 MB view details)

Uploaded CPython 2.7mu

PySPX-0.2.0-cp27-cp27mu-manylinux1_i686.whl (925.5 kB view details)

Uploaded CPython 2.7mu

PySPX-0.2.0-cp27-cp27m-manylinux1_x86_64.whl (1.1 MB view details)

Uploaded CPython 2.7m

PySPX-0.2.0-cp27-cp27m-manylinux1_i686.whl (925.5 kB view details)

Uploaded CPython 2.7m

File details

Details for the file PySPX-0.2.0.tar.gz.

File metadata

  • Download URL: PySPX-0.2.0.tar.gz
  • Upload date:
  • Size: 106.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1d7c79b45463c5105edf3c50cdf458357cccb1e22a00bc7d0fd6fd1ba6e99250
MD5 1736ce84667c02e2d7f8b6e395f094e9
BLAKE2b-256 13b1c1981b1e47ab8a2c761240acd8fc29f8023306be14c68e187e9a8aa0f11b

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ab52fa5183e7ec9530ce58240686f8224936d4ab86effeca865a25ba8d9a0aaa
MD5 d7d4285c96ab858504730fd5b5e6b7b6
BLAKE2b-256 d71d4ef3b30820ce79313ddc376f1b1a24583d9753115cbb8edb1c02bae50b71

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 866.0 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 6a1dd0451ad30adf92a110b6fb4ae5cf692fe89adbec2703938e69adf3d15a55
MD5 c781fa5a1ba921ae585e9c5d00e40361
BLAKE2b-256 da33e2356fdbe787936072b28bf56e6a8352cf5d93cbdb795da85f31f9a6bcbd

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 235792f354edb5f38a53a0436e0f79f25923ea79d746889a18a9282a98f82637
MD5 5696de22ab39357f2d49e87a5348b374
BLAKE2b-256 9d0a7dc166be64b8497106934ab0556ae6326a15bb92c59cebfeef49e392ee56

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 866.0 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 28240c46f7d3bb12aa2bf3c3fd741c616cbd0faee716d5664980e5d6822d8aff
MD5 c24813a832bced25b0f9fc90eaaf38b0
BLAKE2b-256 16131d224965a9538f59bbde7b838e24217906fcef58053f73a5383bc74aec09

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a33b7e17386fab4331513ac05f4642e588afd685704b2296ea20719bd781a279
MD5 39334c8155582ee7bb35177c20302541
BLAKE2b-256 db62865c91b7a7e085635e7b92604620dc11adaaeb32e93fa00dbad8eaa94e53

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 866.0 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a7981077b19a4408c5f12b79ae19bd5685b2a5d127beea6ef2551d157225070f
MD5 a11fba7b1dd1bce846df74cad8baa15e
BLAKE2b-256 e3c0da8bcaf2d3bd366b4596276e0e0c2d53d21b5fe8f19a8c27308fe0da6570

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6bbd7a69879aab66d4163e8c4a5a4c9935dcaee0824120b9feb94ae4933a9a1d
MD5 5de5a1a7bc6810dbc5029e3d9b913b2b
BLAKE2b-256 094eada00048dc79aecc7832e0c6b60605c17a95ef87c68e123fd57ca2979727

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp34-cp34m-manylinux1_i686.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp34-cp34m-manylinux1_i686.whl
  • Upload date:
  • Size: 866.0 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 f10f3ff405d04930f4f4d81fcf827533b844f53783bb2303b89c8e618775806f
MD5 f6432973e78e9c6869fe7b18213fb132
BLAKE2b-256 609ca938e2aeb8d1a3e9e4313aa6b67d92aac2334bd67a4afa6dcf5b58156e53

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 aa86c06f91dbc0149defa2a978f04dede6264e6d1c8f3f7a99f0f4c9e8f66f19
MD5 67f15a1eac74a3a1c7e5cb1e7248e973
BLAKE2b-256 06765693c718414f34b480261befe2f80ca08db37fef1b4627c5a351ed4039c2

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp27-cp27mu-manylinux1_i686.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp27-cp27mu-manylinux1_i686.whl
  • Upload date:
  • Size: 925.5 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 8f47314584f8a0c0d65e1a1ea8fd07a46c9e840e119d19a7481e870df5b38ba4
MD5 f1eff3f8d1e7589db225e10b4ad05b3b
BLAKE2b-256 a4a590fedef0eb98fcf6b3a88d953fe7aaeff52beae85033d1865ca60d07091e

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 de7af5622ce530d4b71b3053bab8a668c1bbe3493c6170f3cc0dbdc8238373ce
MD5 cef36ef2f040acda240c63b620911f1d
BLAKE2b-256 9d75e822c9a480df0e35a83748e5e42cad55af210c083725e7939b97299a5fa3

See more details on using hashes here.

File details

Details for the file PySPX-0.2.0-cp27-cp27m-manylinux1_i686.whl.

File metadata

  • Download URL: PySPX-0.2.0-cp27-cp27m-manylinux1_i686.whl
  • Upload date:
  • Size: 925.5 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for PySPX-0.2.0-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0824e1d30142f4ba456e2bd8aebcc50b07923be584597262a14984e2a1745b78
MD5 bd316c9de6ad18789cd43abba796ce61
BLAKE2b-256 afe9af7fb894fbac27fcd00d7aa99af7aa3eb776eae385e20ca0b991510287e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page