Skip to content

[third_party] Import embedpqc ML-DSA 87 implementation in third party - #30955

Merged
timothytrippel merged 2 commits into
lowRISC:earlgrey_1.0.0from
xorptr:perso_mldsa_ft_provisioning_add_mldsa87
Aug 25, 2026
Merged

[third_party] Import embedpqc ML-DSA 87 implementation in third party#30955
timothytrippel merged 2 commits into
lowRISC:earlgrey_1.0.0from
xorptr:perso_mldsa_ft_provisioning_add_mldsa87

Conversation

@xorptr

@xorptr xorptr commented Aug 7, 2026

Copy link
Copy Markdown

This PR imports ML-DSA 87 tiny implementation from embedpqc into third party. Current plan is to use this library to generate ML-DSA 87 public keys from UDS during ft_personalize.

This PR also updates ML-DSA simulator tests to check that the runtime stack use during the tests is lower than or same as the stack space assigned for ML-DSA operations in the firmware.

Tested locally by running //sw/device/tests/embedpqc:mldsa87_tiny_test_sim_qemu_rom_with_fake_keys and //sw/device/tests/embedpqc:mldsa44_tiny_test_sim_qemu_rom_with_fake_keys targets

Changes on top of PR #30954

@xorptr
xorptr requested review from a team as code owners August 7, 2026 04:53
@xorptr
xorptr requested review from jwnrt and pamaury and removed request for a team August 7, 2026 04:53
@xorptr
xorptr force-pushed the perso_mldsa_ft_provisioning_add_mldsa87 branch from a0f53b1 to 6a3daea Compare August 7, 2026 06:19
@sasdf sasdf closed this Aug 13, 2026
@sasdf sasdf reopened this Aug 13, 2026
@sasdf
sasdf requested review from cfrantz, nasahlpa and siemen11 August 13, 2026 04:57
@nasahlpa

Copy link
Copy Markdown
Contributor

@xorptr can you please sign off commit [dice] Refactor: Move DICE cert generation functions in a separate library such that CI can run through?


#include "sw/device/tests/embedpqc/mldsa_testvectors.h"

#include <stdint.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a question on the testvectors, since #30872 we have all wycheproof vectors available, so we can expand our testing to the full suite. Might not be related to you @xorptr, but does anyone maybe plan to expand to the full suite? @sasdf, @cfrantz

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, it's on the plan. This one is still useful which gives us fast smoke test result.

@siemen11 siemen11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me

@xorptr
xorptr force-pushed the perso_mldsa_ft_provisioning_add_mldsa87 branch from 6a3daea to 4f5e2b4 Compare August 17, 2026 17:51
@xorptr

xorptr commented Aug 17, 2026

Copy link
Copy Markdown
Author

@xorptr can you please sign off commit [dice] Refactor: Move DICE cert generation functions in a separate library such that CI can run through?

Did a rebase on commits in PR #30954

@xorptr
xorptr force-pushed the perso_mldsa_ft_provisioning_add_mldsa87 branch from 4f5e2b4 to a444f40 Compare August 17, 2026 18:42
@sasdf sasdf added the CI:Rerun Rerun failed CI jobs label Aug 17, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Aug 17, 2026
@xorptr
xorptr force-pushed the perso_mldsa_ft_provisioning_add_mldsa87 branch 2 times, most recently from 6a3daea to 8ff8d7c Compare August 18, 2026 18:18
xorptr added 2 commits August 24, 2026 15:14
This commit imports ML-DSA 87 tiny implementation from embedpqc into
third party. Current plan is to use this library to generate ML-DSA 87
public keys from UDS during ft_personalize.

Tested locally by running
`//sw/device/tests/embedpqc:mldsa87_tiny_test_sim_qemu_rom_with_fake_keys`
target

Signed-off-by: Lovepreet Singh <lpsingh@google.com>
…s during testing

- Create a new constant that represents stack space allocated to run
  DICE ML-DSA operations during attestation

- When running tests for embedpqc ML-DSA implementations, compare the
  runtime stack usage against stack space allocated for ML-DSA
  operations. While this may not be better than a full static analysis,
  this adds a (perhaps) slightly useful layer of protection against
  stack overflow during DICE ML-DSA operations

Tested by running
`//sw/device/tests/embedpqc:mldsa44_tiny_test_sim_qemu_rom_with_fake_keys`
and
`//sw/device/tests/embedpqc:mldsa87_tiny_test_sim_qemu_rom_with_fake_keys`
targets locally

Signed-off-by: Lovepreet Singh <lpsingh@google.com>
@xorptr
xorptr force-pushed the perso_mldsa_ft_provisioning_add_mldsa87 branch 2 times, most recently from 6a3daea to 343bba2 Compare August 24, 2026 22:20
@xorptr

xorptr commented Aug 24, 2026

Copy link
Copy Markdown
Author

Rebased on latest earlgrey_1.0.0 commit (5ecdacf5c512d300f360146fd79d28e2b5005ac4)

@sasdf sasdf added the CI:Rerun Rerun failed CI jobs label Aug 25, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Aug 25, 2026
@timothytrippel
timothytrippel merged commit aea6d61 into lowRISC:earlgrey_1.0.0 Aug 25, 2026
69 of 70 checks passed
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.

6 participants