![]() |
CryptoAuthLib
v3.3.2
Microchip CryptoAuthentication Library
|
This library implements the APIs required to communicate with Microchip Security device. The family of devices supported currently are:
The best place to start is with the Microchip Trust Platform
Online API documentation is at https://microchiptech.github.io/cryptoauthlib/
Latest software and examples can be found at:
Prerequisite hardware to run CryptoAuthLib examples:
Alternatively a Microchip MCU and Adapter Board:
For most development, using socketed top-boards is preferable until your configuration is well tested, then you can commit it to a CryptoAuth Xplained Pro Extension, for example. Keep in mind that once you lock a device, it will not be changeable.
In order to properly configured the library there must be a header file in your project named atca_config.h at minimum this needs to contain defines for the hal and device types being used. Most integrations have an configuration mechanism for generating this file. See the atca_config.h.in template which is configured by CMake for Linux, MacOS, & Windows projects.
An example of the configuration:
There are two major compiler defines that affect the operation of the library.
See Release Notes
CryptoAuthLib will run on a variety of platforms from small micro-controllers to desktop host systems. The current list of hardware abstraction layer support includes:
Rich OS Hosts:
Microcontrollers:
If you have specific microcontrollers or Rich OS platforms you need support for, please contact us through the Microchip portal with your request.
Cryptoauthlib API documentation is at https://microchiptech.github.io/cryptoauthlib/
The library is structured to support portability to:
All platform dependencies are contained within the HAL (hardware abstraction layer).
There is a set of integration tests found in the test directory which will at least partially demonstrate the use of the objects. Some tests may depend upon a certain device being configured in a certain way and may not work for all devices or specific configurations of the device.
The test/cmd-processor.c file contains a main() function for running the tests. It implements a command-line interface. Typing help will bring up the list of commands available.
One first selects a device type, with one of the following commands:
From there the following unit test sweets are available:
Tests available depend on the lock level of the device. The unit tests won't lock the config or data zones automatically to allow retesting at desired lock levels. Therefore, some commands will need to be repeated after locking to exercise all available tests.
Starting from a blank device, the sequence of commands to exercise all unit tests is:
The best place to start is with the Microchip Trust Platform
Also application examples are included as part of the Harmony 3 framework and can be copied from the Harmony Content Manager or found with the Harmony 3 Framework Cryptoauthlib_apps
The Linux HID HAL files use the Linux udev development software package.
To install the udev development package under Ubuntu Linux, please type the following command at the terminal window:
This adds the udev development development software package to the Ubuntu Linux installation.
The Linux HID HAL files also require a udev rule to be added to change the permissions of the USB HID Devices. Please add a new udev rule for the Microchip CryptoAuth USB devices.
Edit the mchp-cryptoauth.rules file and add the following line to the file: