MCUXpresso SDK Documentation

puf_1

puf_1#

Overview#

The PUF Example project is a demonstration program that uses the KSDK software implement secure key storage using PUF software driver.

Usual use consists of these steps:

  1. Start: The Activation Code (AC) generated during the enroll operation and the Startup Data (SD) are used to reconstruct the digital fingerprint. It is done after every power-up and reset.

  2. Generate Key: The controller generates an unique key and combines it with the digital fingerprint to output a key code. Each time a Generate Key operation is executed a new unique key is generated.

  3. Set Key: The digital fingerprint generated during the Enroll/Start operations and the key provided by the Client Design (CD) are used to generate a Key Code (KC). This KC can be stored externally. Perform this operation only once for each key.

  4. Get Key: The digital fingerprint generated during the Start operation and the KC generated during a Set Key operation are used to retrieve a stored key. Perform this operation every time a key is needed.

Supported Boards#

FRDM-MCXW23
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW23 Board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J10.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the PUF demo in the terminal window:

PUF Peripheral Driver Example

Wrapping a new key chosen by the user to PUF index 0 (will only be accessible on dedicated HW bus)
Wrapping a key generated by the PUF itself to PUF index 1 (will be accessible to SW)
Unwrapping/reconstructing the key chosen by the user, that was stored in key slot 0 of the HW bus (i.e. the slot for the AES engine), using key index 0
Unwrapping/reconstructing the generated key using key index 1
Reconstructed intrinsic key = B2 D7 64 D2 E6  F 74 4C 18 57 23 E9 AC 73 D0 80 

PUF Deinitialization.
PUF Initialization.
Flash Initialization.
Retrieving the Activation Code of the user key store.
PUF Start with the retrieved Activation Code.
Unwrapping/reconstructing the generated key again using key index 1
Reconstructed intrinsic key = B2 D7 64 D2 E6  F 74 4C 18 57 23 E9 AC 73 D0 80 
END OF PUF DRIVER EXAMPLE
MCXW23-EVK
Hardware requirements
  • Mini/micro USB cable

  • MCXW23-EVK Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J33.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the PUF demo in the terminal window:

PUF Peripheral Driver Example

Wrapping a new key chosen by the user to PUF index 0 (will only be accessible on dedicated HW bus)
Wrapping a key generated by the PUF itself to PUF index 1 (will be accessible to SW)
Unwrapping/reconstructing the key chosen by the user, that was stored in key slot 0 of the HW bus (i.e. the slot for the AES engine), using key index 0
Unwrapping/reconstructing the generated key using key index 1
Reconstructed intrinsic key = B2 D7 64 D2 E6  F 74 4C 18 57 23 E9 AC 73 D0 80 

PUF Deinitialization.
PUF Initialization.
Flash Initialization.
Retrieving the Activation Code of the user key store.
PUF Start with the retrieved Activation Code.
Unwrapping/reconstructing the generated key again using key index 1
Reconstructed intrinsic key = B2 D7 64 D2 E6  F 74 4C 18 57 23 E9 AC 73 D0 80 
END OF PUF DRIVER EXAMPLE