Random Hardware Unique Key¶
This sample writes random hardware unique keys (HUKs) to the Key Management Unit (KMU), when available, or to the relevant flash memory page, when the KMU is not present.
Overview¶
When using the Hardware unique key library together with the nRF Secure Immutable Bootloader, you must provision a hardware unique key for the bootloader into the relevant KMU slot or flash memory page.
To provision the HUKs, build and run this sample before programming the bootloader and application. It will save the HUKs in the device.
Requirements¶
The sample supports the following development kits:
Hardware platforms |
PCA |
Board name |
Build target |
---|---|---|---|
PCA10095 |
|
||
PCA10090 |
|
||
PCA10056 |
|
Building and Running¶
This sample can be found under samples/keys/random_hw_unique_key
in the nRF Connect SDK folder structure.
See Building and programming a sample application for information about how to build and program the application.
Testing¶
After programming the sample to your development kit, test it by performing the following steps:
Connect to the kit that runs this sample with a terminal emulator (for example, PuTTY). See How to connect with PuTTY for the required settings.
Reset the kit.
Observe that the following output:
Writing random keys to KMU. Success!If an error occurs, the sample will print a message and it will raise a kernel panic.