plugntrust
2.0.0.0
|
Plug&Trust Click is a compact add-on board that contains a ready-to-use IoT secure element solution.
We provide a library for the PlugnTrust Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
This library contains API for PlugnTrust Click driver.
plugntrust_cfg_setup
Config Object Initialization function. plugntrust_init
Initialization function. plugntrust_default_cfg
Click Default Configuration function. plugntrust_apdu_transfer
Write-Read frame data function. plugntrust_select_card_manager
Select card manager. plugntrust_select_applet
Selects Clicks Applet and returns info that device sends back to host. This application is showcasing basic functionality of Plug&Trust
click board. It gets identify data from device, selects card manager and applet. Then checks free memory, reads all objects and deletes not reserved ones. After that showcases a few of functionality: Generating random data, Creating, reading and deleteing binary objects, Creating AES symmetrical key and cipher with it; In the end it is showcasing funcionality in the endless loop.
The demo application is composed of two sections :
At the start it sets comunication interface from default
configuration[I2C]. Reads indetifing data from device, and then selects Card manager and applet. After that it reads free presistant memory, reads all objects and deletes objects that are not reserved by the Applet. Then it generates 2 byte of random data, and gets the version information from the Applet. Thtas followed up with creating binary object and 'MikroE' data is wrriten in it. Then its checked it object is created, and reads data back, in the end its deleted and checked if it still exists. Finally it creates 128AES key (16bytes), and then it encrypts and then decrypts data with that key, and in the end it deletes that key object.
It generates 16bytes of data, writes it in binary object and
then reads it and logs it. Then creates AES key and encrypts that random data with it, and then decrypts it. In the end it deletes both AES key object and binary object thats created at the start of task.
For more informations and explanations refer to documents
from NXP->AN12413 and UM11225.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE github account.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all Mikroelektronika compilers.