DPE ML-DSA: hybrid feature, crypto trait, 32 contexts, dual profile c…#3612
Draft
parvathib wants to merge 1 commit intocaliptra-2.0from
Draft
DPE ML-DSA: hybrid feature, crypto trait, 32 contexts, dual profile c…#3612parvathib wants to merge 1 commit intocaliptra-2.0from
parvathib wants to merge 1 commit intocaliptra-2.0from
Conversation
…ommands Squashed backport of: - [dpe] Enable hybrid DPE feature (#3243) - [dpe] Add ML-DSA DPE Crypto trait (#3315) - [dpe] Add support for 64 DPE contexts (#3246) - [dpe] Add ML-DSA DPE command (#3326) - [dpe] Test ML-DSA CertifyKey (#3357) - [dpe] Test using external mu with ML-DSA profile (#3371) - [dpe] reduce nesting of InvokeDpeCmd::execute (#3386) - [dpe] Add optional ML-DSA response over DMA (#3391) - [dpe] Add HW model support for large DPE responses (#3403) - [dpe] Support both DPE profiles in more tests (#3407) - [dpe] Add a test for worst case scenario certs and CSRs (#3417) - [dpe] Fail early for response sizing (#3415) - [dpe] Add ML-DSA support to CertifyKeyExtended (#3426) - [dpe] Test ML-DSA profile with golang verification (#3454) - [dpe] Add comment that initialization is profile agnostic (#3460) DPE rev: a26db5b — last rev bumped by PRs in this list (#3371). Not updated to caliptra-dpe main (cfc9a71) because DPE commit 337f7e4 (Update CFI #531) renamed caliptra-cfi packages from caliptra-cfi-*-git to caliptra-cfi-*, which conflicts with caliptra-2.0 CFI. Updating 2.0 CFI to match would be a ROM change. Using 32 DPE contexts (not 64 from #3246) because 64 contexts requires DPE_SIZE=10KB which changes PersistentData layout and breaks the frozen ROM hash. 32 contexts keeps DPE_SIZE=5KB. caliptra-2.0 adaptations: - DpeMldsaCrypto uses MldsaReg (2.0 has dedicated ML-DSA HW register; main uses AbrReg shared Adams Bridge register for ML-DSA and ML-KEM) - SignData::Mu returns CryptoError::NotImplemented (no external-mu on 2.0) - Removed ML-KEM commands (no ML-KEM HW on 2.0) - Removed main-only commands (ocp_lock, shake256) - Flat PersistentData paths (2.0 uses single struct, not rom/fw split) - Kept 2.0 caliptra-cfi-*-git package names to avoid ROM recompilation - RUNTIME_SIZE=176KB (main uses 210KB; 2.0 has fewer runtime features) Known issue: firmware stack overflow (~8KB over 140KB budget) during initialize_dpe. The hybrid DPE Response enum is ~25KB (MAX_CERT_SIZE = 22KB) and is allocated on the stack by CommandExecution::execute(). Needs stack space or DCCM space resolution.
c95cade to
50b1a34
Compare
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.
…ommands
Squashed backport of:
hybridDPE feature #3243)InvokeDpeCmd::execute#3386)CertifyKeyExtended#3426)DPE rev: a26db5b — last rev bumped by PRs in this list (#3371). Not updated to caliptra-dpe main (cfc9a71) because DPE commit 337f7e4 (Update CFI #531) renamed caliptra-cfi packages from caliptra-cfi--git to caliptra-cfi-, which conflicts with caliptra-2.0 CFI. Updating 2.0 CFI to match would be a ROM change.
Using 32 DPE contexts (not 64 from #3246) because 64 contexts requires DPE_SIZE=10KB which changes PersistentData layout and breaks the frozen ROM hash. 32 contexts keeps DPE_SIZE=5KB.
caliptra-2.0 adaptations:
Known issue: firmware stack overflow (~8KB over 140KB budget) during initialize_dpe. The hybrid DPE Response enum is ~25KB (MAX_CERT_SIZE = 22KB) and is allocated on the stack by CommandExecution::execute(). Needs stack space or DCCM space resolution.