On-Device Certificate Generation#

On-device certificate generation creates each endpoint's private keys on the device. The host receives only the CSRs and public provisioning data. Amazon's signing tool signs the CSRs using the provisioned HSM, and the resulting certificate chains are returned to the device. Private keys do not leave the device.

This is the production certificate-generation method. See Production Provisioning Principles for the larger factory flow and Secure Vault Integration for the Silicon Labs hardware integration.

Provisioning sequence#

The PDP application runs on the device and the provisioning script runs on a host connected to it. The host script coordinates these operations:

  1. Initialize the on-device certificate-generation context.

  2. Request an SMSN using the Amazon-provided device type and ApID and the unique device serial number.

  3. Request CSRs for the ED25519 and P-256 curves. The device generates the associated private keys and protects them using Secure Vault.

  4. Submit both CSRs, the ApID, and the Amazon-provided signing parameters to the Sidewalk signing tool, which uses the factory HSM.

  5. Send the returned certificate chains to the device.

  6. Send the application server public key to the device.

  7. Ask the device to verify and store the manufacturing data.

The host retains the public outputs and control logs for the cloud provisioning steps described in Amazon's manufacturing documentation.

Run the provisioning script#

The script and its current options are in tools/scripts/public/pdp in the Amazon Sidewalk extension. Build the Production Device Provisioner application and use the product application image, device part number, and Amazon-issued HSM and product-profile values required by that script. Run the provisioning operation once per device and provide a unique device serial number for each unit.

The script interface uses a JSON configuration file similar to this:

{
  "part": "<EFR32 part number>",
  "sid_init_img": "<optional final application image>",
  "pdp_img": "<path to PDP .s37 image>",
  "dev_type": "<Amazon device type>",
  "apid": "<Amazon provided advertised product ID>",
  "app_srv_pub_key": "<application server public key>",
  "sst_prod_tag": "<Amazon production tag>",
  "sst_hsm_conn_addr": "<YubiHSM Connector address>",
  "sst_hsm_pin": "<Amazon-issued HSM PIN>"
}

For script versions that accept these options, the invocation has this form:

python3 provision_silabs.py \
  --dsn <unique-device-serial-number> \
  --prod-config <production-config.json> \
  --pdp-mode on_dev_cert_gen

Use the exact argument names and configuration schema shipped with your extension release. Keep HSM credentials out of source control and restrict access to production configuration files.

After provisioning, the host-side output contains public device information and control logs for the standard Amazon cloud upload and device-record creation steps.

Run the registration factory workflow#

The certificate-generation sequence above describes device provisioning. If you wish to provision and register your device at the factory, use the ROW method. With ROW, Amazon's manufacturing tool performs the certificate provisioning, creates the cloud device record, and completes registration. Follow Registration Over Wire for tool configuration, command examples, PDP image handling, and the final application flash.