Skip to main content

PySPX Build Status Coverage 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.

For Linux, binary wheels are available based on the manylinux1 docker image. On other platforms it may take a few moments to compile the SPHINCS+ code. Currently the sphincsplus reference code requires openssl for its SHA256 function. When compiling from source, be sure to install openssl with development files.

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.3.0.tar.gz (338.6 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.3.0-cp37-cp37m-manylinux1_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.7m

PySPX-0.3.0-cp37-cp37m-manylinux1_i686.whl (4.4 MB view details)

Uploaded CPython 3.7m

PySPX-0.3.0-cp36-cp36m-manylinux1_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.6m

PySPX-0.3.0-cp36-cp36m-manylinux1_i686.whl (4.4 MB view details)

Uploaded CPython 3.6m

PySPX-0.3.0-cp35-cp35m-manylinux1_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.5m

PySPX-0.3.0-cp35-cp35m-manylinux1_i686.whl (4.4 MB view details)

Uploaded CPython 3.5m

PySPX-0.3.0-cp34-cp34m-manylinux1_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.4m

PySPX-0.3.0-cp34-cp34m-manylinux1_i686.whl (4.4 MB view details)

Uploaded CPython 3.4m

PySPX-0.3.0-cp27-cp27mu-manylinux1_x86_64.whl (4.5 MB view details)

Uploaded CPython 2.7mu

PySPX-0.3.0-cp27-cp27mu-manylinux1_i686.whl (4.4 MB view details)

Uploaded CPython 2.7mu

PySPX-0.3.0-cp27-cp27m-manylinux1_x86_64.whl (4.5 MB view details)

Uploaded CPython 2.7m

PySPX-0.3.0-cp27-cp27m-manylinux1_i686.whl (4.4 MB view details)

Uploaded CPython 2.7m

File details

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

File metadata

  • Download URL: PySPX-0.3.0.tar.gz
  • Upload date:
  • Size: 338.6 kB
  • Tags: Source
  • 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.3.0.tar.gz
Algorithm Hash digest
SHA256 4658a4898687e015d30d45271715762f963513281b14e69ac72493a6e99a89bf
MD5 21fcd06cfd0438fa1d04e0b883d072aa
BLAKE2b-256 52a1ee4a7ce87a04f618acd5a6897920c242d730db0e504fb84700ca55050a19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.5 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.3.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1e5261772fe3d9d10f6def2c49b32ab25a9e5d476dc2c17d320424c4ac5b034f
MD5 da0ce4da76927ce2c71b4b64dffe1b8d
BLAKE2b-256 9e8f65633425deb314188f0c38eddd94fd4d4b235ce5ae97c2c5e28c799555b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 4.4 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.3.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 8cf9204a770a8d6acad0c40942c3f3238132bed6475a40c48d0e3e4992349324
MD5 72033ccd468059574e42e722ce78b19b
BLAKE2b-256 ffc1e82c6611e0bb836c0b9e77f79e464b0db4d50b6d020c14f84c75d0de02ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.5 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.3.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 55cc4519af0bee7bad765d9441ce9c3003d1cfe877619710860fc7ef071bc055
MD5 ddf75537294d42fb1ace1a4b7271e8cf
BLAKE2b-256 e61f14bd4afe779a431a56c9295e86c919e6aa572b426e0b390493d9aef9ee96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 4.4 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.3.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b4cb2e11a8adde16842c4874c230df22a9d84598f6b08173fff20e44b56eb52f
MD5 523350674b63d7a3faa0f4dd28d518c4
BLAKE2b-256 8d6e6e2e02066c86c6b5fb3b792a7f7cdd4bf83ed84f22aa179d84c4bcec3fb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.5 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.3.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c2555520da589d1444df808bde1ab39edc380e6a25e5094399d68f5d572788b2
MD5 303be18c694670814fc92066a1220d17
BLAKE2b-256 576727d3de283a7d26031d7185ad060ee91dad87284fde4f11f934a76549e928

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 4.4 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.3.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ef63f0f460474136257d608aa941c03efbb2de037ed6998f5d196d93996eb60c
MD5 50f00a5bb751404a979ffd24a9f3ce2b
BLAKE2b-256 eacef89b3417faed21ce702569984e63a8ff1da8f7901a13a735adf29dd675ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.5 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.3.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a2055fa7228c1f4f9deb5575354ecf9bb89447c5d1d31678b80398c7b546d805
MD5 665cb55b6ac2e4df0cb178258f5aa9b2
BLAKE2b-256 767ce0046d7dc3ca079f768db9ae3b23c6b6ba4d00c5179afca80f451bbc240b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp34-cp34m-manylinux1_i686.whl
  • Upload date:
  • Size: 4.4 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.3.0-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 e53168e98fa15289f4a99959f23e1cefc57c30527f6f88fc35c460bcb423e579
MD5 c6cc7e4308e222e94a9436e9cd973927
BLAKE2b-256 09ff6b50a011df1eadf66332e269ea91c64ec1b413c167b3968fe5d5010a37b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.5 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.3.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c0154ac096f58286424c1b912f03c8b1363bfded265124752d23a7f771897f16
MD5 381321f3c8dbc6230da174246f010766
BLAKE2b-256 d6c49a680f59fa146039ec4caff7e5c5aa70aa3b1dc229657a03d7629c885481

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp27-cp27mu-manylinux1_i686.whl
  • Upload date:
  • Size: 4.4 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.3.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 67c8bd276d4ace2f9af2a73a13e3ad40b9dc681a0aa05ab547c829c76f50c7fd
MD5 ee43aa5c37f868fe76941dc440bfa235
BLAKE2b-256 323a9b51acf6afe350294ee4614693e08f4aa3be91d0b8e569980a83193c44df

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 4.5 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.3.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a866c7db2bb7b4b380b17c97889e1e6f45f1606b2036ae1905b5ce8e8261696a
MD5 b988e0f94b28e398b0a8b45131345c56
BLAKE2b-256 02655e1512f08d6eeee37827150f48785a6e595f8f629438c5b9622bbd5a50b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PySPX-0.3.0-cp27-cp27m-manylinux1_i686.whl
  • Upload date:
  • Size: 4.4 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.3.0-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 17823732bf492133457127018fa423123ad28460ee4dc6f9ecfe4c2532952f0b
MD5 6298ce80558c3fddbd12c3002e888482
BLAKE2b-256 fc4a6fca5b8054cbb190fe06d7069cf63385a3f9e8bcbe7fdc39a8fa0e713f81

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