I hope you are well. I am working at C-DAC Bangalore, and I need guidance on using an ST-SAFE(STPM4RasPI) secure element / TPM module with a Python-based MQTT mTLS client on a Raspberry Pi.
A short summary of our setup and goal:
MQTT broker is already configured for mutual TLS (mTLS).
Client device: Raspberry Pi .
Goal: build a Python-based MQTT client that uses the private key stored inside the ST TPM/STSAFE module during the TLS handshake (so the private key never leaves the secure element).
Specifically, we would like to know:
Supported approaches / APIs: Which approaches or libraries do you recommend to make a Python TLS client use the TPM-held private key? (For example: ST library/SDK, or other middleware.)
Python ecosystem support: Are there recommended Python libraries or examples for MQTT clients (e.g., paho-mqtt or other clients) that can be configured to use a TPM-backed key for TLS?
We would greatly appreciate sample code snippets or a short how-to showing a Python MQTT client using a TPM-backed key during TLS.