The Silicon Owner is defined as a logical entity or entities allowed to sign code for execution, as well as to sign ownership management commands^1. OpenTitan supports the following device life cycle states to manage the ownership state of the device:
The following steps describe the ownership transfer process in detail.
LOCKED_OWNERSHIP
to an UNLOCKED_OWNERSHIP
state, and the current owner will now be referred to as the “previous owner”.ROM_EXT
stage), the device will check the signature on the payload against the endorser's public key.ROM_EXT
will set up the new owner as the current owner by randomly generating a new Silicon Owner “root secret” (which is used to derive the Silicon Owner identity key for attestation) and writing the new owner's public keys to one of the two slots described in Key Provisioning.UNLOCKED_OWNERSHIP
until the new owner’s code successfully boots. This is a protection in case there is a problem with the new owner's keys or they have been tampered with in transit.LOCKED_OWNERSHIP
state. It will now boot any code signed by the new owner, and generate attestation certificates associated with the new owner's identity.By design, ownership transfer has a lot of flexibility. To help explain the process, here are a few concrete examples of how ownership transfer could work in practice. This is just for illustration, and is by no means an exhaustive list.
Scenario 1: Immediately after manufacturing the device, the Silicon Creator assigns ownership to a known first Silicon Owner who has commissioned the device and prepared an ownership transfer payload in advance.
Scenario 2: A Silicon Owner wants to sell their device to someone else. The buyer sends the seller an ownership transfer payload with their public keys. The seller signs the payload and sends the buyer a) their signature and b) the physical device in an UNLOCKED_OWNERSHIP
state. The buyer can now complete the ownership transfer procedure to become the new owner.
Scenario 3: A Silicon Owner wants to send their device back to the Silicon Creator for resale. They send it back in an UNLOCKED_OWNERSHIP
state. (This unlocking step is vital, although the Silicon Creator can endorse a new owner, they cannot unlock ownership for a device that is in a LOCKED_OWNERSHIP
state.) The Silicon Creator can later endorse the ownership transfer payload of whoever buys the device, without further involvement from the previous owner.
The following keys are provisioned as part of this flow.
The UNLOCK
and NEXT_OWNER
keys are required to ensure ownership state transitions are only triggered by authenticated and authorized commands. Authorization is implemented via key identification (UNLOCK
versus NEXT_OWNER
).
Transition into LOCKED_OWNERSHIP
stage results in a new device Owner Identity, used in attestation and post-ownership-transfer application provisioning flows.
There are three modes of ownership transfer supported:
Boot stages:
ROM
: Metal ROM, sometimes known as Boot ROM.ROM_EXT
: ROM Extension. Stored in flash and signed by the Silicon Creator.BL0
: Bootloader. Signed by the Silicon Owner.KERNEL
: Signed by the Silicon Owner.As part of the Ownership Transfer flow, the Silicon Owner keys are endorsed either by the Silicon Creator or by the Current Owner of the device. This is done to ensure that only authenticated and authorized entities are able to take ownership of the device.
Key endorsement is implemented as a signed manifest. The rest of the document refers to this as the Key Endorsement Manifest, or manifest for simplicity. The following fields must be supported by the manifest implementation:
Signature covering the manifest.
Signature algorithm. For this version of the specification it is always set to ECDSA-sha256
.
Public key to verify the signature with. The number of bytes depends on the signature_algorithm
field. Depending on the ownership transfer model, the public key must match one of the following requirements:
Endorsing Entity | Public Key Requirement |
---|---|
Silicon Creator | The public key must be stored in the ROM_EXT and integrity protected by the ROM_EXT signature. |
Previous Owner | The public key must be stored in the previous owner slot and labeled as the NEXT_OWNER in the policy field. See owner_keys for more details. |
List of public keys endorsed by the manifest. See Owner Keys for more details.
The following parameters are required in the secure boot manifest implementation, but are left as optional in the key endorsement manifest. The Silicon Creator or previous Silicon Owner may want to implement these parameters to restrict the deployment of the endorsed keys.
Note: If implemented, the restrictions imposed by these fields cannot be revoked by ownership transfer once provisioned. This is to simplify the implementation of an open samples policy.
Minimum list of fuses that must match the device configuration before committing the endorsed keys to flash. The hash of the list of targeted fuse values is hashed with the endorsement manifest before signing.
Note: The device identifier fuses can be added to the otp_settings
to restrict the keys to be used with a single device. This mode of operation is referred to as node-locked secure boot configuration.
The following figure shows the sequence of operations to commit the new set of keys once the key endorsement manifest has been verified.
Definitions:
slot
: Owner slot. This implementation assumes that there are only 2 owner slots, so the only valid values are 0 and 1.id
: The owner assignment identifier. It is implemented as a monotonically increasing counter. The new owner id is equivalent to N + 1 for a previous owner id of N.pub_keys
: List of keys associated with the owner slot. Includes key policy information.digest
: Integrity of the owner slot record calculated as MAC(Kn, slot|id|pub_keys)
. The key (Kn
) requirements are described later in more detail.Detailed description:
Step 1 (S1) Initial State
The current owner is stored in slot 0 and the device is in unlocked ownership state. A key stored in the current owner slot (0) is used to validate the key endorsement manifest for the next owner.
Step 2 (S2) Intermediate State
The new owner keys are written into the available owner slot - in this case slot one. The pub_keys
and digest
parameters are written before the id
. Once the id
is written into flash, the new owner slot entry is considered to be valid.
The id
parameter must be strictly greater than the previous owner id
.
Step 3 (S3) Final State
An additional integrity check over the new owner slot is performed before completing provisioning of the new owner keys. Upon successful verification, the new owner is marked as the current owner by deleting the id
of the previous owner. The pub_keys
of the previous owner may be deleted as well as part of this step.
Integrity keys are used to implement integrity checks for each owner slot. The integrity key has the following requirements:
ROM_EXT
boot configuration.ROM
/ROM_EXT
.These requirements can be achieved by a combination of physical security and cryptographic guarantees. The following example demonstrates how to derive the Integrity Key from a symmetric key stored in OTP and only available to ROM
/ROM_EXT
software.
This approach relies on a symmetric secret (K
) managed by the ROM
/ROM_EXT
software. It is intended to mitigate boot time issues associated with consuming K
directly from the key manager.
Parameters:
K
: Device integrity secret provisioned at manufacturing time. Only visible to ROM and ROM_EXT software. Stored in OTP.slot
: Owner slot. This implementation assumes that there are only 2 owner slots, so the only valid values are 0 and 1. This parameter is used to make sure the key cannot be reused to verify the other slot.n
: The owner assignment identifier. It is implemented as a monotonically increasing counter. It is used here to bind the key to the owner identifier.prev_owner_digest
: (Under consideration) Digest of the previous owner (e.g. id = n - 1
). Used to bind the key to the custody chain (chain of owners).Function: MAC
is an OpenTitan approved MAC function.
Kn = MAC(K, "OwnerSlot" | slot | n | prev_owner_digest)
The slot and n values are used to fulfill the IK_REQ1 requirement. The availability of K
is enforced by software to fulfill IK_REQ2 and IK_REQ3. prev_owner_digest
is under consideration to bind the key to the custody chain (chain of ownership).
Key Manager Availability
The ROM_EXT
is required to disable the key manager before handing over execution to the next boot stage when the device is in device UNLOCKED_OWNERSHIP
ownership state.
Manufacturing Requirements
Determine if the prev_owner_digest
field must be initialized with non-zero value at manufacturing time.
A host can send unlock ownership and ownership transfer commands to OpenTitan via any physical interface supported by the ROM_EXT
. The details of the command transport layer protocol, as well as the list of supported physical devices are left to the reference software implementation.
However, there must be at least one mechanism available to perform ownership transfer at manufacturing time using an implementation compatible with ATE[^2] infrastructure.
This flow implements transition from LOCKED_OWNERSHIP
to UNLOCKED_OWNERSHIP
states. It is used by the Silicon Owner to relinquish ownership of the device and enable ownership transfer functionality. The device must be in UNLOCKED_OWNERSHIP
state before it can be assigned to a new owner.
The unlock operation is implemented as a signed command sent from the Kernel/Application layer to the ROM_EXT
. The signature is required to allow the current owner to only allow authenticated and authorized users access to the unlock ownership flow.
The following fields must be supported by the command:
Signature covering the command structure. The signature is verified using the UNLOCK
key stored in the active owner slot.
Ownership-unlock nonce value, which is generated at the time the current owner first took ownership of the device.
Additional flags passed to the ROM_EXT
to configure unlock flow settings:
WIPE_FLASH
: Erase owner flash contents on successful unlock operation.Example
The following sequence diagram shows a reference implementation of the unlock flow. Error handling is omitted for simplicity.
Detailed description:
Step 1 (S1) Get unlock nonce and device id: The Host queries the device identifier and unlock nonce from the device.
Steps 2-4 (S2, S3, S4) Request unlock command signature: The Host requests the Device Registry service to sign the unlock ownership command for the device id with provided nonce. The Device Registry requests a cloud key manager service to sign the command with a key associated with the device identifier. The signature must be verifiable with the UNLOCK
key stored in the active owner slot.
Step 5 (S5) Request device unlock: The Host sends the unlock ownership command to the Device. The command is first handled by the Kernel/APP layer.
Step 6 (S6) Pre-unlock steps: The Kernel/APP layer may verify the unlock command and execute any pre-unlock steps, including erasing owner level secrets.
Step 7 (S7) Request device unlock: The Kernel copies the unlock command to a boot services memory region shared with the ROM_EXT
, and performs a reset to trigger the unlock operation on the next boot.
Step 8 (S8) Unlock steps: The ROM_EXT
verifies the unlock command and updates the device state to UNLOCKED_OWNERSHIP
state. The Device proceeds with the boot flow and reports the unlock result to the kernel via shared memory.
Step 9 (S9) Unlock result: The unlock result is first propagated to the Device Kernel/APP layer. The Kernel may opt to execute any post-unlock steps before propagating the result to the Host. The Host propagates the unlock result to the Device Registry. The Device Registry may opt to remove the device from its allow-list.
An ownership transfer command sent by a host to OpenTitan, is serviced by the ROM extension (ROM_EXT
) allowing the Silicon Owner to take ownership of the device at silicon manufacture, Contract Manufacturing (CM) stage or in the field.
Entry into the ownership transfer flow is conditional to the device being in UNLOCKED_OWNERSHIP
state. See Unlock Flow for more details on how to transition from LOCKED_OWNERSHIP to UNLOCKED_OWNERSHIP states.
The ownership transfer payload header including the key endorsement manifest is verified by the ROM extension. The header shall fit within available SRAM and be signed by an approved key as described in the Key Provisioning section.
Code, data and info pages available to the Silicon Owner are erased. Erase checks are performed.
The OwnerRootSecret is reset with a value extracted from a DRBG configured with a security strength equivalent to one supported by the key manager.
A 64bit random value is extracted from the DRBG to be used as an unlock nonce. See Unlock Flow for more details.
Owner keys are provisioned into the device as defined in the Key Provisioning section.
Owner software sends a command to the ROM_EXT
to complete ownership transfer, which effectively sets the new owner as the current owner.
Some of the OpenTitan use cases require support for self updates in which OpenTitan is used in host mode to scan an external device interface for update payloads. This section describes Ownership Transfer layered on top of such self update mechanism.
An OpenTitan implementation may support this ownership transfer model at the SKU level.
The Device is initially in LOCKED_OWNERSHIP
state and configured with a stack signed by the current owner. The following steps must be implemented in a fault tolerant way:
In this section, SPI EEPROM is used as the target device. However, the implementation may opt for supporting other targets.
The Device is initially in UNLOCKED_OWNERSHIP
state and configured with a stack (Kernel + APPs) able to scan an external SPI EEPROM and trigger the ownership transfer flow. The following procedure also assumes that the Device storage follows the internal flash layout guidelines.
The process must be implemented in a fault tolerant manner to be able to restart the process to recover from a failed attempt.
Detailed steps:
UNLOCKED_OWNERSHIP
state at Device boot time.NEXT_OWNER
key. The update payload is validated with one of the CODE_SIGN
keys embedded in the key endorsement manifest.ROM_EXT
executes the ownership transfer flow described in the Ownership Transfer section with the following differences:ROM_EXT
attempts to boot the new owner image with the new owner configuration.ROM_EXT
on the next boot. The new owner becomes the current owner.Ownership Transfer can be disabled at the SKU level. In this case secure boot is implemented by storing the Silicon Owner BL0 verification keys in the ROM_EXT
. The ROM_EXT
is thus not required to implement ownership transfer in this configuration.
To simplify the implementation, the flash layout implements fixed offset and size allocations for the ROM_EXT
and the certificate storage regions. This allows the flash erase and write operations to be performed at deterministic address ranges.
The implementation may opt to store the certificates in info regions to save data partition space.
owner_slot_0
and owner_slot_1
are used to store the Silicon Owner keys as described in the Key Provisioning section.
Regular attestation updates as described in the Attestation specification are available when the device has an active owner. Devices in UNLOCKED_OWNERSHIP
state may have restricted attestation capabilities, for example, restricted to only end-to-end attestation.
Manufacturing shall not preclude the implementation of the following default stack configurations:
LOCKED_OWNERSHIP
state with default factory image.UNLOCKED_OWNERSHIP
state with default factory image.LOCKED_OWNERSHIP
state with default factory image and Ownership Transfer disabled.Factory software may be used to configure the ownership slots before injecting the factory image.
[^2]: Automatic Test Equipment used at package level testing.