2016-05-03 00:41:54 -03:00
|
|
|
|
|
|
|
|
|
2016-04-28 13:20:10 -03:00
|
|
|
wolfcrypt: the wolfSSL Crypto Engine
|
|
|
|
|
====================================
|
|
|
|
|
|
2016-05-09 18:46:01 -03:00
|
|
|
**wolfCrypt Python**, a.k.a. ``wolfcrypt`` is a Python library that encapsulates
|
|
|
|
|
**wolfSSL's wolfCrypt API**.
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-09 18:46:01 -03:00
|
|
|
**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
|
2016-05-20 03:55:57 -03:00
|
|
|
environments as well. It is the crypto engine behind wolfSSl's embedded ssl
|
|
|
|
|
library.
|
2016-04-28 13:20:10 -03:00
|
|
|
|
|
|
|
|
|
2016-05-09 18:46:01 -03:00
|
|
|
Installation
|
|
|
|
|
------------
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
In order to use ``wolfcrypt``, first you'll need to install ``wolfssl`` C
|
|
|
|
|
embedded ssl library.
|
2016-05-09 18:46:01 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
Installing ``wolfssl`` :
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
**Mac OSX**
|
2016-05-09 18:46:01 -03:00
|
|
|
|
|
|
|
|
.. code-block:: console
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
brew install wolfssl
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
or
|
2016-05-15 15:03:07 -03:00
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
git clone https://github.com/wolfssl/wolfssl.git
|
|
|
|
|
cd wolfssl/
|
|
|
|
|
./autogen.sh
|
2016-05-23 20:33:11 -03:00
|
|
|
./configure --enable-sha512
|
2016-05-20 03:55:57 -03:00
|
|
|
make
|
|
|
|
|
sudo make install
|
2016-05-16 20:13:26 -03:00
|
|
|
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
**Ubuntu**
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-09 18:46:01 -03:00
|
|
|
.. code-block:: console
|
|
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y git autoconf libtool
|
2016-05-16 21:55:31 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
git clone https://github.com/wolfssl/wolfssl.git
|
|
|
|
|
cd wolfssl/
|
|
|
|
|
./autogen.sh
|
2016-05-23 20:33:11 -03:00
|
|
|
./configure --enable-sha512
|
2016-05-20 03:55:57 -03:00
|
|
|
make
|
|
|
|
|
sudo make install
|
2016-05-09 18:46:01 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
sudo ldconfig
|
2016-05-16 21:55:31 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
**CentOS**
|
2016-05-09 18:46:01 -03:00
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
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
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
git clone git@github.com:wolfssl/wolfssl.git
|
|
|
|
|
cd wolfssl
|
|
|
|
|
./autogen.sh
|
2016-05-23 20:33:11 -03:00
|
|
|
./configure --enable-sha512
|
2016-05-20 03:55:57 -03:00
|
|
|
make
|
|
|
|
|
sudo make install
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
echo /usr/local/lib > wolfssl.conf
|
|
|
|
|
sudo mv wolfssl.conf /etc/ld.so.conf
|
|
|
|
|
sudo ldconfig
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-17 14:15:17 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
Installing ``wolfcrypt`` :
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-05-17 14:15:17 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
**Mac OSX**
|
2016-05-17 14:15:17 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
.. code-block:: console
|
2016-05-17 14:15:17 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
sudo -H pip install wolfcrypt
|
2016-05-09 18:46:01 -03:00
|
|
|
|
2016-05-17 14:15:17 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
**Ubuntu**
|
2016-05-09 18:46:01 -03:00
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
sudo apt-get install -y python-dev python-pip libffi-dev
|
|
|
|
|
sudo -H pip install wolfcrypt
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-09 18:46:01 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
**CentOS**
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-09 18:46:01 -03:00
|
|
|
.. code-block:: console
|
2016-04-28 13:20:10 -03:00
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
sudo yum install -y python-devel python-pip libffi-devel
|
|
|
|
|
sudo -H pip install wolfcrypt
|
2016-05-09 18:46:01 -03:00
|
|
|
|
|
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
Testing ``wolfcrypt`` :
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
2016-05-09 18:46:01 -03:00
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
2016-05-20 03:55:57 -03:00
|
|
|
python -c "from wolfcrypt.hashes import Sha; print Sha().hexdigest()"
|
|
|
|
|
|
|
|
|
|
expected output: **da39a3ee5e6b4b0d3255bfef95601890afd80709**
|