Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dice,cwt] Measure Owner SW domain in CDI 1 mode field #26498

Open
wants to merge 1 commit into
base: earlgrey_1.0.0
Choose a base branch
from

Conversation

sasdf
Copy link
Contributor

@sasdf sasdf commented Mar 4, 2025

Our current DICE chain has no field that can easily distinguish between device booting with prod and dev Owner SW signing keys, since it’s implicitly measured in the code hash. According to Open Profile for DICE, the "mode" field is the canonical way to identify prod/dev/etc, and it should be set to non-Normal if the device is not in a secure state.

@sasdf sasdf force-pushed the mgT30747467 branch 4 times, most recently from 5bee272 to 1bc5436 Compare March 4, 2025 14:20
@sasdf sasdf marked this pull request as ready for review March 4, 2025 16:39
@sasdf sasdf requested a review from a team as a code owner March 4, 2025 16:39
cert_key_id_pair_t *key_ids,
ecdsa_p256_public_key_t *cdi_1_pubkey,
uint8_t *cert, size_t *cert_size) {
OT_DISCARD(key_domain);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why discard? both X.509 and CWT should both set the the appropriate debug flag. For X.509, the cdi_0.hjson needs to be updated to match the uds.hjson (see here: https://cs.opensource.google/opentitan/opentitan/+/master:sw/device/silicon_creator/lib/cert/uds.hjson;drc=cce24966b1629b8f9a2ff22d6f44646f4c4857ca;l=121); the DiceTcbInfo extension has a flags field to put the debug mode; debug is 0 or 1 though, unlike CWT which looks like you use 1 or 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the owner debug flag in X509 CDI_1.
cc @vbendeb @jettr for vis.

@sasdf sasdf force-pushed the mgT30747467 branch 2 times, most recently from e3bca5a to 8eef2d1 Compare March 6, 2025 09:06
Copy link
Contributor

@tommychiu-github tommychiu-github left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Our current DICE chain has no field that can easily distinguish between device
booting with prod and dev Owner SW signing keys, since it’s implicitly measured
in the code hash. According to Open Profile for DICE, the mode field is the
canonical way to identify prod/dev/etc, and it should be set to non-Normal if
the device is not in a secure state.

Change-Id: I307474674ababd3ca27dee696b5baf5f3e426b42
Signed-off-by: Yi-Hsuan Deng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants