Skip to main content

Python module that encapsulates wolfSSL's crypto engine API.

Project description

wolfCrypt Python, a.k.a. wolfcrypt is a Python module that encapsulates wolfSSL’s wolfCrypt API.

wolfCrypt is a lightweight, portable, C-language-based crypto library targeted at IoT, embedded, and RTOS environments primarily because of its size, speed, and feature set. It works seamlessly in desktop, enterprise, and cloud environments as well. It is the crypto engine behind wolfSSl’s embedded ssl library.



Install the following on Windows:

Then from the command line install tox and CFFI using:

pip install tox cffi

You can then build the source distribution packages using:

python sdist


The file covers most things you will need to do to build and install from source. As pre-requisites you will need to install either from your OS repository or pip. You’ll also need the Python development package for your Python version:

  • cffi

  • tox

  • pytest

To build a source package run python sdist, to build a wheel package run python bdist_wheel. To test the build run tox. The tox tests rely on Python 3.9 being installed, if you do not have this version we recommend using pyenv to install it.


We provide Python wheels (prebuilt binaries) for OSX 64 bits and Linux 64 bits:

$ pip install wolfcrypt

To build wolfcrypt-py against a local installation of the native C wolfSSL library, use the USE_LOCAL_WOLFSSL variable. This variable should be

wolfcrypt-py can be built against a local version of the native wolfSSL library by using pip with the USE_LOCAL_WOLFSSL variable. USE_LOCAL_WOLFSSL should be set equal to the installation path for the wolfSSL library:

$ USE_LOCAL_WOLFSSL=/path/to/wolfssl/install pip install .

If building wolfcrypt-py against a local wolfSSL library, wolfcrypt-py will attempt to do native feature detection to enable/disable wolfcrypt-py features based on how native wolfSSL has been compiled. It uses the <wolfssl/options.h> header to do feature detection.


>>> from wolfcrypt.hashes import Sha256
>>> Sha256('wolfcrypt').hexdigest()

Project details

Download files

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

Source Distribution

wolfcrypt-5.3.0.post0.tar.gz (70.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page