Skip to main content

mbed TLS (PolarSSL) wrapper

Project description

python-mbedtls is a thin wrapper to ARM’s mbed TLS library.

According to the official mbed TLS website

mbed TLS (formerly known as PolarSSL) makes it trivially easy for developers to include cryptographic and SSL/TLS capabilities in their (embedded) products, facilitating this functionality with a minimal coding footprint.

License

python-mbedtls is licensed under the Apache 2.0 license in order to be fully compatible with mbed TLS. The Apache 2.0 license enables the use of python-mbedtls in both open source and closed source projects.

Installation

The wrapper is currently developed and tested on Debian Jessie and targets Python 3.4. It probably works with earlier Python releases although this was not tested.

mbed TLS

python-mbedtls requires the mbed TLS library that can be installed with:

git clone https://github.com/ARMmbed/mbedtls.git mbedtls.git
cd mbedtls.git
SHARED=1 make no_test
sudo make install

python-mbedtls

Building python-mbedtls requires Cython:

python3 -m pip install cython

then,

git clone https://github.com/Synss/python-mbedtls.git python-mbedtls.git
cd python-mbedtls.git
python3 setup.py build_ext

The unit tests further require nose and pyCrypto:

python3 -m pip install nose pycrypto
nosetests -v tests

Hashing module (md.h)

The hashing module is wrapped, which provides message, file, and HMAC with the following algorithms: MD5, SHA-1, SHA-2, and RIPEMD-160.

Symmetric cipher module (cipher.h)

The symmetric cipher module is wrapped, which provides:

  • Aes encryption/decryption (128, 192, and 256 bits) in ECB, CBC, CFB128, CTR, GCM, or CCM mode;

  • Arc4 encryption/decryption;

  • Blowfish encryption/decryption in ECB, CBC, CFB64, or CTR mode;

  • Camellia encryption/decryption (128, 192, and 256 bits) in ECB, CBC, CFB128, CTR, GCM, or CCM mode;

  • DES encryption/decryption in ECB, or CBC mode;

Notes:

Tagging and padding are not wrapped.

Contribution

python-mbedtls is in an early stage of development and contributions in any form is welcome. Note, however, that bugs against mbed TLS should be reported upstream directly.

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

python-mbedtls-0.2.tar.gz (7.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page