Access Official Technical PDF

Share Summary:LinkedInEmail

Symmetric device authentication gives an industrial controller or embedded host a way to check whether a connected device possesses an agreed secret key. In a Microchip ATECC508A demonstration, a host challenges a remote device and verifies its response using a message authentication code (MAC). The example is useful for engineers and system integrators evaluating secure device identification in embedded designs.

The demonstration uses a Curiosity PIC32MZ EF Development Board as the host and two Secure click boards, each containing an ATECC508A cryptographic module. One module is configured for the host role and the other for the remote-device role. The devices communicate with the PIC32MZ through separate I2C interfaces, while a USB serial connection provides an interactive console for configuration and operation.

How symmetric device authentication works

In symmetric authentication, the host and remote device share the same secret key. The host first obtains the remote device’s serial number, then sends a random value to serve as a challenge. The remote device combines that challenge with the shared key and its unique serial number to calculate a MAC, which it returns to the host.

The host performs the corresponding calculation using its copy of the shared key, the challenge and the remote device’s serial number. It compares its calculated MAC with the value returned by the remote device. A match indicates that the remote device could produce the expected response using the shared key; a mismatch means the response cannot be verified.

The serial number makes the calculation specific to the device being checked, while the random challenge means the response is tied to that authentication exchange. The demonstration therefore illustrates a verification process—not simply a comparison of device identifiers.

Hardware and software setup

The reference application is built for the Curiosity PIC32MZ EF Development Board, using the PIC32MZ2048EFM100 microcontroller. A Secure click board is mounted at socket J5 for the host-side ATECC508A and a second at J10 for the remote-side device. The project configures I2C1 and I2C2 at 100 kHz for communication with the respective modules.

MPLAB X IDE and the MPLAB XC32 compiler are used to open, build and program the application. The source describes a project developed with MPLAB X IDE v4.05, XC32 v1.44 and MPLAB Harmony v2.05, so these are reference versions for that example rather than a recommendation for a current development environment. Harmony is optional in the documented setup.

For the user interface, the board connects to a computer over USB and presents a serial terminal menu. The example uses Tera Term, though another suitable terminal program can be used. The board’s USB connection and jumper settings must be configured as described for the demonstration, and a driver may need to be installed on a computer encountering the device for the first time.

Configure the ATECC508A devices carefully

The console offers configuration and authentication modes. Configuration mode writes configuration data and keys to a blank ATECC508A, first for the host module and then for the remote module. The application locks the configuration and data zones after writing them.

This is a critical commissioning step: the documented locking operation is one-time and irreversible. Engineers should confirm that the intended configuration and key data are being applied before proceeding. If a module has already been configured, the application reports that status rather than treating it as a new device.

The example programs four identical keys into the host and remote devices. During the normal authentication path, the remote uses Key 0 to generate the MAC, and the host uses Key 0 to verify it. Because both sides use the same key and inputs, the MAC values match.

Interpreting pass and fail results

In the successful test, the board indicates authentication with a green LED. The failure case is created by changing the demonstration code so that the remote computes its MAC with Key 0 while the host verifies it with Key 1. Since the keys differ, the host’s calculated MAC does not match the returned MAC, and the board indicates failure with a red LED.

This controlled mismatch is valuable during integration because it demonstrates that the result depends on both sides using consistent secret material and the expected calculation. In a deployed design, key provisioning and configuration must therefore be managed deliberately; a mismatch is not an authentication success, even if communication between the devices is otherwise functioning.

Practical implications for automation design

The ATECC508A example provides a hands-on way to understand how a hardware security module can support challenge-response authentication between embedded devices. It brings together several elements that matter in system design:

  • Defined roles: The host initiates the challenge and checks the response; the remote device calculates and returns the MAC.
  • Shared key management: Both modules need compatible secret-key configuration for verification to succeed.
  • Unique device context: The remote serial number is included in the calculation alongside the random challenge.
  • Careful commissioning: Locking the configuration and data zones is irreversible in this demonstration.

For engineers assessing device authentication in an automation system, the key takeaway is that successful verification depends on the complete exchange: challenge, device identity, shared key and matching MAC calculation. The demonstration makes those dependencies visible through its configuration workflow and pass/fail indicators, providing a concrete foundation for evaluating authentication behavior in an embedded design.

Access Official Technical PDF

About The Author