The keys command can be used to generate and display cryptographic
keys.
Cryptographic keys are required to sign and validate a
Device Firmware Update (DFU) package. See the
Cryptography library in the SDK
for more information about signing and cryptographic keys.
-
Run nrfutil keys generate to generate a private (signing)
key and store it in a file in PEM format.
-
Run nrfutil keys display to display a private (signing) or
public (verification) key from a PEM file.
You can see available options by entering the following
command:nrfutil keys display --help
For example, enter the following command to generate a private key and store it in
a file named
private.pem:
nrfutil keys generate private.pem
Enter
the following command to display a public key in code format from this key
file:
nrfutil keys display --key pk --format code private.pem