pub(crate) fn cmd_provision_token(secrets_file_path: &str) -> Result<()>Expand description
Provision a fresh chip in one orchestrated pass.
Sequence:
Infoto capture the chip serial.ProvisionIoKey-> chip generates random 32 bytes, writes slot 8, returns the key.ProvisionInitialPin-> chip writes SHA-256(“0000” || salt) to slot 5.ProvisionInitialPuk-> chip generates 8-digit PUK, writes hash to slot 6, returns the PUK.GenKey --slot 0-> chip generates primary ECC key on chip.- Write the IO key + PUK + serial to
secrets_file(JSON) and print on stdout.
Refuses to overwrite an existing secrets_file: the caller must
move or delete an existing one to re-provision.