OPTIGA™ Trust M Host Library for Python

The optigatrust Python module is a ctypes based Python wrapper for the OPTIGA™ Trust M security solution.

Introduction

This Python module is based on the OPTIGA™ Trust M Host Library for C. The host library is pre-compiled for different communication interfaces and operating systems and integrated via ctypes.

For an overview on the features of the OPTIGA™ Trust M security solutions, please also visit the OPTIGA™ Trust M Overview Repository.

Currently, the following combinations of communication interfaces and and operating systems are supported.

Interface/OS

Windows

Linux

I²C

No

Yes

UART

Yes

Yes

libusb

Yes

Yes

Installation

Install the Python module optigatrust directly from Python Package Index (PyPI) as follows.

python -m pip install optigatrust

Testing

The Python module tests can be run as follows.

python -m pip install -r tests/requirements.txt
python -m pytest tests

To run only some tests, pass a regular expression as a parameter to tests.

python -m pytest tests/test_rand.py

Dependencies