Skip to main content

A Python library that encapsulates wolfSSL's wolfCrypt API.

Project description

wolfCrypt Python, a.k.a. wolfcrypt is a Python library 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.

Installation

In order to use wolfcrypt, first you’ll need to install wolfssl C embedded ssl library.

Installing wolfssl :

Mac OSX

brew install wolfssl

or

git clone https://github.com/wolfssl/wolfssl.git
cd wolfssl/
./autogen.sh
./configure --enable-sha512
make
sudo make install

Ubuntu

sudo apt-get update
sudo apt-get install -y git autoconf libtool

git clone https://github.com/wolfssl/wolfssl.git
cd wolfssl/
./autogen.sh
./configure --enable-sha512
make
sudo make install

sudo ldconfig

CentOS

sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm
sudo yum update
sudo yum install -y git autoconf libtool

git clone git@github.com:wolfssl/wolfssl.git
cd wolfssl
./autogen.sh
./configure --enable-sha512
make
sudo make install

echo /usr/local/lib > wolfssl.conf
sudo mv wolfssl.conf /etc/ld.so.conf
sudo ldconfig

Installing wolfcrypt :

Mac OSX

sudo -H pip install wolfcrypt

Ubuntu

sudo apt-get install -y python-dev python-pip libffi-dev
sudo -H pip install wolfcrypt

CentOS

sudo yum install -y python-devel python-pip libffi-devel
sudo -H pip install wolfcrypt

Testing wolfcrypt :

python -c "from wolfcrypt.hashes import Sha; print Sha().hexdigest()"

expected output: da39a3ee5e6b4b0d3255bfef95601890afd80709

Testing wolfcrypt’s source code with tox :

To run the unit tests in the source code, you’ll need tox and a few other requirements. The source code relies at ‘WOLFSSL_DIR/wrapper/python’ where WOLFSSL_DIR is the path of wolfssl’s source code.

  1. Make sure that the testing requirements are installed:

$ sudo -H pip install -r requirements-testing.txt
  1. Run tox:

$ tox
...
_________________________________ summary _________________________________
py27: commands succeeded
SKIPPED: py34: InterpreterNotFound: python3.4
py35: commands succeeded
congratulations :)

Note that some tests might be skipped if you don’t have the proper interpreter.

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-0.1.8.tar.gz (13.1 kB view details)

Uploaded Source

Built Distributions

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

wolfcrypt-0.1.8-cp35-cp35m-macosx_10_11_x86_64.whl (24.8 kB view details)

Uploaded CPython 3.5mmacOS 10.11+ x86-64

wolfcrypt-0.1.8-cp27-none-macosx_10_11_x86_64.whl (24.7 kB view details)

Uploaded CPython 2.7macOS 10.11+ x86-64

File details

Details for the file wolfcrypt-0.1.8.tar.gz.

File metadata

  • Download URL: wolfcrypt-0.1.8.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wolfcrypt-0.1.8.tar.gz
Algorithm Hash digest
SHA256 6a6ad4640cd0d6527142cf1c7a6b42ba487c69234b9700562140a0e4998d1d5e
MD5 f25f9b6931ffb422d147ddd759ff47d9
BLAKE2b-256 409a47a78b969c45b3c42ecf0489df8034dac5956027b1664871798581e3c149

See more details on using hashes here.

File details

Details for the file wolfcrypt-0.1.8-cp35-cp35m-macosx_10_11_x86_64.whl.

File metadata

File hashes

Hashes for wolfcrypt-0.1.8-cp35-cp35m-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 487274116846830f201647111269c9af26b90f362fede9f0f473cd90f25b4400
MD5 5e7bb54019d5a43843fa524bff72105d
BLAKE2b-256 f1e84bf7272d60867939e190d2326f8487e24e65d6877f3950172e7c5403f074

See more details on using hashes here.

File details

Details for the file wolfcrypt-0.1.8-cp27-none-macosx_10_11_x86_64.whl.

File metadata

File hashes

Hashes for wolfcrypt-0.1.8-cp27-none-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 0c4975b40c995fcc6c3e1e1d0176287035cdb6f33abf03dbdcf5bb89ec882fff
MD5 7e5fcaf9ca8dbaddb92f47b9dea6963b
BLAKE2b-256 26ff4765e5779f1adce590dbd753793f13510b598183580a128b8237a9f06185

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 Pingdom Monitoring Sentry Error logging StatusPage Status page