Skip to content

Implements AES, ECDH, and ECDSA cryptographic operations using MbedTLS and OPTIGA Trust for secure communication.

Notifications You must be signed in to change notification settings

Deeksha-R-Kunder/Infineon

Repository files navigation

Infineon IoT Device Security

Crypto – MbedTLS & OPTIGA Trust

This repository contains example implementations of common cryptographic algorithms using MbedTLS (software-based) and OPTIGA Trust (hardware-based) security solutions.

The purpose is to demonstrate how to perform encryption, decryption, key exchange, and digital signatures using both software libraries and secure hardware modules.


📂 File Overview

AES (Symmetric Encryption)

  • aes_cbc.c
    AES-CBC encryption/decryption using MbedTLS.
  • aes_cbc_optiga.c
    AES-CBC encryption/decryption using OPTIGA Trust hardware.
  • aes_ecb.c
    AES-ECB encryption/decryption using MbedTLS.
  • aes_ecb_optiga.c
    AES-ECB encryption/decryption using OPTIGA Trust hardware.

ECDH (Elliptic Curve Diffie-Hellman – Key Exchange)

  • ecdh_mbedtls.c
    ECDH key exchange using MbedTLS.
  • ecdh_optiga.c
    ECDH key exchange using OPTIGA Trust hardware.

ECDSA (Elliptic Curve Digital Signature Algorithm)

  • ecdsa_mbedtls.c
    ECDSA signing and verification using MbedTLS.
  • ecdsa_optiga.c
    ECDSA signing and verification using OPTIGA Trust hardware.

🔑 Key Differences Between Implementations

Algorithm Mode MbedTLS (Software) OPTIGA (Hardware)
AES CBC Yes (aes_cbc.c) Yes (aes_cbc_optiga.c)
AES ECB Yes (aes_ecb.c) Yes (aes_ecb_optiga.c)
ECDH Yes (ecdh_mbedtls.c) Yes (ecdh_optiga.c)
ECDSA Yes (ecdsa_mbedtls.c) Yes (ecdsa_optiga.c)

⚙️ Requirements

  • Hardware

    • Infineon OPTIGA Trust M / Trust X module (for OPTIGA examples)
    • Compatible microcontroller board (e.g., PSoC 6)
  • Software

    • MbedTLS library
    • OPTIGA Trust host library
    • C compiler and build environment (GCC, ARM GCC, etc.)
    • Board SDK (e.g., ModusToolbox for PSoC)

🚀 How to Build & Run

  1. Clone this repository:

    git clone https://github.com/Deeksha-R-Kunder/Infineon.git
    cd Infineon-IoT
    
  2. Open the project in your IDE (e.g., ModusToolbox or Eclipse).

  3. Select the .c file you want to test (e.g., ecdh_optiga.c).

  4. Compile and flash to your board.

  5. Open a serial terminal and observe the output.


📚 References

MbedTLS Documentation: https://mbed-tls.readthedocs.io/projects/api/en/v3.5.2/

Infineon OPTIGA Trust: https://infineon.github.io/optiga-trust-m/


🛡️ Disclaimer

These examples are for educational purposes only. For production systems, always follow security best practices, use secure key storage, and validate library versions.

About

Implements AES, ECDH, and ECDSA cryptographic operations using MbedTLS and OPTIGA Trust for secure communication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages