[dice] Refactor: Move DICE cert generation functions in a separate library - #30954
Merged
timothytrippel merged 2 commits intoAug 24, 2026
Merged
Conversation
I am planning on using [`ml-dsa = "0.1.1"`](https://crates.io/crates/ml-dsa) library in host tooling for benchtop provisioning tests (ft provisioning). The current rust toolchain errors out with the following message: ``` error[E0405]: cannot find trait `AsyncFn` in this scope --> external/rules_rust++crate+crate_index__signature-3.0.0/src/verifier.rs:114:37 | 114 | async fn verify_digest_async<F: AsyncFn(&mut D) -> Result<(), Error>>( | ^^^^^^^ not found in this scope | help: consider importing this trait | 3 + use core::ops::AsyncFn; | ``` To address this issue, I am updating the toolchain to nightly version 2025-02-01. `AsyncFn` was [merged on 2025-01-30](rust-lang/rust#135852). By trial and error, I found that the compiler stops running into that error starting with nightly 2025-02-01 I also fixed clippy warnings (raised as errors by `-Dwarnings` that occurred after updating the compiler toolchain I verified the new hashes manually from [rust CDN](https://static.rust-lang.org/dist/2025-02-01/channel-rust-nightly.toml) Signed-off-by: Lovepreet Singh <lpsingh@google.com>
xorptr
requested review from
alees24 and
cfrantz
and removed request for
a team
August 6, 2026 21:22
xorptr
force-pushed
the
perso_mldsa_ft_provisioning_refactor
branch
from
August 7, 2026 04:08
4661489 to
a366e63
Compare
cfrantz
approved these changes
Aug 7, 2026
xorptr
force-pushed
the
perso_mldsa_ft_provisioning_refactor
branch
from
August 7, 2026 17:17
a366e63 to
1131fbe
Compare
…brary I am planning to use functions from `//sw/device/silicon_creator/lib/cert:dice_mldsa` library to derive seed for UDS MLDSA keygen in `sw/device/silicon_creator/manuf/base/ft_personalize.c`. Linking `dice_mldsa` library with `ft_personalize.c` runs into failure since it defines few functions from the already linked `//sw/device/silicon_creator/lib/cert:dice` (like `dice_attest_cdi_0` and `dice_attest_cdi_1`). Since `ft_personalize.c` only needs functions to build and populate DICE certificate for UDS, CDI0, and CDI1, I am refactoring the code to move these function definitions inside a new library target `//sw/device/silicon_creator/lib/cert:dice_cert_build` so that they can be linked along with `//sw/device/silicon_creator/lib/cert:dice_mldsa` when building new `ft_personalize.c` with ML-DSA provisioning support Tested by running `//sw/host/provisioning/orchestrator/tests:e2e_emulation_cw340_test` and `//sw/device/silicon_creator/rom_ext/e2e/attestation:print_certs_test_fpga_cw340_rom_ext` locally Signed-off-by: Lovepreet Singh <lpsingh@google.com>
xorptr
force-pushed
the
perso_mldsa_ft_provisioning_refactor
branch
from
August 17, 2026 18:37
1131fbe to
a7d2d39
Compare
timothytrippel
approved these changes
Aug 24, 2026
timothytrippel
merged commit Aug 24, 2026
5ecdacf
into
lowRISC:earlgrey_1.0.0
66 of 68 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am planning to use functions from
//sw/device/silicon_creator/lib/cert:dice_mldsalibrary to derive seed for UDS MLDSA keygen insw/device/silicon_creator/manuf/base/ft_personalize.c. Linkingdice_mldsalibrary withft_personalize.cruns into failure since it defines few functions from the already linked//sw/device/silicon_creator/lib/cert:dice(likedice_attest_cdi_0anddice_attest_cdi_1). Sinceft_personalize.conly needs functions to build and populate DICE certificate for UDS, CDI0, and CDI1, I am refactoring the code to move these function definitions inside a new library target//sw/device/silicon_creator/lib/cert:dice_cert_buildso that they can be linked along with//sw/device/silicon_creator/lib/cert:dice_mldsawhen building newft_personalize.cwith ML-DSA provisioning supportTested by running
//sw/host/provisioning/orchestrator/tests:e2e_emulation_cw340_testand//sw/device/silicon_creator/rom_ext/e2e/attestation:print_certs_test_fpga_cw340_rom_extlocallyChanges on top of PR #30939