Welcome to infineon/python-optiga-trust

optigatrust python module is a ctypes based wrapper to work with the OPTIGA™ Trust security solutions.

Dependencies

How does it work

This python module comes with a set of shared libraries, which are precompiled for different communication interfaces. The shared libraries are fully based on the official framework. This module doesn’t simply implement bindings for the library, but add many more things on top. See Documentation. In the end the module supports the following combinations

Interface/OS

Windows

Linux

EvalKit

Yes

No

PersoBoard

Yes

Yes

Raw I2C

No

Yes

Required Hardware

  • Any of the following
    • OPTIGA™ Trust M1/M3/Charge EvalKit. See Provisioning mode for details.

    • OPTIGA™ Trust Personalisation Board, or any FTDI USB-HID/I2C Converter board

    • Raspberry Pi + Shield2Go RPi Adapter

  • OPTIGA™ Trust X/M/Charge sample or a Security Shield2Go

Note: If you use any of the embedded Linux as a Host, please don’t forget to enable i2c support in your kernel (RPi3: via raspi-config command), as well as add your user to the gpio group (RPi3: via sudo adduser pi gpio) RaspberryPi3 Connection Example.

Installation

$ pip install optigatrust

Testing

Tests are written using pytest and oscrypto and require these packages to be installed:

$ pip3 install pytest oscrypto
$ git clone --recurse-submodules https://github.com/Infineon/python-optiga-trust
...
$ cd python-optiga-trust
$ cd tests
$ pytest

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

$ pytest test_rand.py