Skip to content

[keymgr_dpe] Replace keymgr in EG - PR6 silicon creator driver#30668

Draft
rroth-lowrisc wants to merge 9 commits into
lowRISC:masterfrom
rroth-lowrisc:keymgr_dpe_PR6_silicon_creator
Draft

[keymgr_dpe] Replace keymgr in EG - PR6 silicon creator driver#30668
rroth-lowrisc wants to merge 9 commits into
lowRISC:masterfrom
rroth-lowrisc:keymgr_dpe_PR6_silicon_creator

Conversation

@rroth-lowrisc

Copy link
Copy Markdown

PR6 - Silicon Creator Driver

This PR is the sixth in a series which will replace the keymgr with the kemgr_dpe in earlgrey. The replacement was approved by this RFC.

Merge-Dependencies

Relevant Commits

Last commit

Description

This PR will add a first version of the silicon creator driver for the keymgr_dpe. It adds the basic functionality to interact with the keymgr_dpe. It is not yet included in the bazel build system as several dependencies are missing until the top integration is finished.

Split the otp_keymgr_key interface into its respective components.
Future version of the keymgr(_dpe) may receive the information from
different IP's rather than combined from the otp_ctrl.

To avoid a circular dependencies the DevIdWidth instantiated
in keymgr_dpe_pkg replaces the otp_ctrl_pkg::DeviceIdWidth.

As the keymgr still expects the combined message the earlgrey top
manually combines the key material. This fix will be removed when
the keymgr is replaced by the keymgr_dpe.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
This commit updates the `otp_ctrl` dv to reflect the new interface between
the `keymgr` and the `otp_ctrl`. The secret / seed verification inside the
otp_ctrl scoreboard template are no longer dynamically generated. The reason
is that the previously shared port signal has been split into its respective
components, which does not interacts well with the dynamic generation anymore.

However, adding a secret to the otp now results in a port-list change anyways the
resulting overhead is deemed acceptable.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
This commit removes all otp_ctrl dependency in the keymgr_dpe dv.
This change ensures that the dv architecture accurately reflects
the dependency in the RTL implementation.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
This commit improves the block level dv by:
- Introducing more verbose messages
- Latching the correct DEFAULT_UDS_POLICY
- Prevent ambiguous state after the disable operation
  by restricting any advance call

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
The scoreboard loads the UDS directly from the DUT via interface.
The problem is the keymgr_dpe initializes the slot for the UDS with
randomness. The initally loaded UDS is xored with the randomness
already present in the destination slot as countermeasure for SCA.
The scoreboard however can currently not recreate this randomness
thus the backdoor load.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
Introduction of the third bootstage defined in the opentitan identities-and-root-keys
(https://opentitan.org/book/doc/security/specs/identities_and_root_keys/index.html)
strategy. The `creator_seed` is now consumed by BootStageOwnerInt rather
than by BootStageCreator.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
@rroth-lowrisc

rroth-lowrisc commented Jul 6, 2026

Copy link
Copy Markdown
Author

DO NOT MERGE THIS PR

This PR cannot be merged until the following PR passes the CI:

  • TBD

The introduced keymgr_dpe driver are not yet referenced in any build system until the TOP integration PR. Therefore none of the CI checks really verifies anything in this PR. The only reason for this PR is to break down the review effort into several smaller chunks of work along "logical" lines of code spaces.

This commit allows for a limited parametrization by the top without
having a fully templated IP. The top can define the following:

- Number of bootstages (either two or three)
- Number of ROM digest values
- Number of HW slots instanciated (up to 8 slots)

The block level dv is extended to test two different configurations,
called earlgrey and darjeeling.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
Add three missing features to the dif of the keymgr_dpe.

- The disable function to transition the keymgr_dpe into the disabled state
- The configuration function to set the re-seeding interval of the keymgr_dpe
- Any sideloaded key on the sideload interface can now be cleared by sw

Add an empty `dif_keymgr_dpe_unittest.cc` file to avoid triggering error
during the top integration, tracked in Issue lowRISC#30609.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
This commit introduces a first version of the keymgr_dpe sw in
the silicon creator lib. It covers the basic keymgr_dpe features.

Add source / header file **without** linking them in the
appropriate *BUILD* file as some dependencies do not exist yet!

Add an empty keymgr_dpe_unittest.cc file to avoid triggering error
during the top integration, tracked in Issue lowRISC#30609.

Signed-off-by: Raphael Roth <rroth@lowrisc.org>
@rroth-lowrisc rroth-lowrisc force-pushed the keymgr_dpe_PR6_silicon_creator branch from 5c5f0ab to 6d6bba3 Compare July 7, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant