Skip to content

Commit ba9dc7a

Browse files
committed
Add ML-DSA-87 DPE profile
Additionally, add a P384-SHA512 profile. This is to provide a classical profile whose measurement format is compatible with ML-DSA-87. Signed-off-by: Jordan Hand <[email protected]>
1 parent ac8a708 commit ba9dc7a

File tree

2 files changed

+133
-6
lines changed

2 files changed

+133
-6
lines changed

specifications/dpe-irot-profile/bibliography.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
references:
2+
- id: "fips204"
3+
title: "FIPS 204: Module-Lattice-Based Digital Signature Standard"
4+
publisher: "NIST"
5+
issued:
6+
year: 2024
7+
month: 8
28
- id: "ietf-rfc2986"
39
title: "PKCS #10: Certification Request Syntax Specification"
410
publisher: "IETF"

specifications/dpe-irot-profile/spec.ocp

Lines changed: 127 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ This document defines multiple variants of the DPE iRoT profile:
103103
* `DPE_PROFILE_IROT_P384_SHA384`
104104
* `DPE_PROFILE_IROT_MIN_P256_SHA256`
105105
* `DPE_PROFILE_IROT_MIN_P384_SHA384`
106+
* `DPE_PROFILE_IROT_MLDSA_87_SHA384`
107+
108+
Names follow the format:
109+
110+
`DPE_PROFILE_IROT{_OPTIONAL_VARIANT}_{SIGNING_ALGORITHM}_{MEASUREMENT_DIGEST_ALGORITHM}`
111+
112+
Currently, the only supported optional variant is "MIN", which supports a smaller subset of the DPE commands.
106113

107114
The profile name will be embedded as ASCII within the version field of the TCBInfo(s), enabling a verifier to confirm that the evidence originates from this profile.
108115

@@ -447,6 +454,13 @@ cryptographic algorithms:
447454
* ECDSA P-384
448455
* SHA2-384
449456

457+
Profile `DPE_PROFILE_IROT_MLDSA87_SHA384` requires support for the following
458+
cryptographic algorithms:
459+
460+
* ML-DSA-87
461+
* SHAKE256
462+
* SHA2-384
463+
450464

451465
This profile defines the following derivation schemes for use in Profile
452466
Attributes.
@@ -532,18 +546,31 @@ follows:
532546
* Outputs
533547
* 48-byte key
534548

535-
### ocp.key-format.p256.raw
549+
### ocp.derive.kdf-asymmetric-mldsa87
536550

537-
The concatenation of the 32-byte X value and 32-byte Y value of the ECDSA public key.
551+
The asymmetric key derivation scheme “ocp.derive.kdf-asymmetric-mldsa87” is defined as
552+
follows:
538553

539-
Both the X and Y value SHALL be big-endian and left-padded with zeros.
554+
* The asymmetric key type is ML-DSA-87
555+
* Signature scheme is ML-DSA
556+
* This derivation scheme SHALL use a cryptographically secure KDF or DRBG.
557+
* Inputs
558+
* CDI
559+
* `LABEL`
560+
* ASCII Bytes "MLDSA"
561+
* Outputs
562+
* 48-byte key
540563

541564
### ocp.key-format.p384.raw
542565

543566
The concatenation of the 48-byte X value and 48-byte Y value of the ECDSA public key.
544567

545568
Both the X and Y value SHALL be big-endian and left-padded with zeros.
546569

570+
### ocp.key-format.mldsa87.raw
571+
572+
A raw ML-DSA-87 key, encoded as using the pkEncode function in FIPS 204
573+
547574
## Sign Format
548575

549576
### ocp.tbs-format.digest-sha256
@@ -562,6 +589,15 @@ The format “ocp.tbs-format.digest-sha384” is defined as
562589
additional processing. The size of the value SHALL be a SHA2-384 digest of
563590
size 48 bytes.
564591

592+
### ocp.tbs-format.mldsa87-external-mu
593+
594+
The format “ocp.tbs-format.mldsa87-external-mu” is defined as
595+
596+
The mu parameter as described in FIPS 204.
597+
598+
* tr = SHAKE256(public_key, 64)
599+
* mu = SHAKE256(tr || message, 64)
600+
565601
### ocp.signature-format.p256.raw
566602

567603
The concatenation of the 32-byte R value and 32-byte S value of the ECDSA signature.
@@ -574,6 +610,10 @@ The concatenation of the 48-byte R value and 48-byte S value of the ECDSA signat
574610

575611
Both the R and S value SHALL be big-endian and left-padded with zeros.
576612

613+
### ocp.signature-format.mldsa87.raw
614+
615+
TODO
616+
577617
## Recursive Derivation
578618

579619
### ocp.recursive-derivation.extend-tci
@@ -743,7 +783,7 @@ following requirements:
743783
* version: The version of the CSR specification - the version SHALL be 0
744784
* subject: The subject name of the CSR
745785
* subjectPKInfo: This field SHALL contain the subject public key and the
746-
OID for the EC public key algorithm used by the DPE profile
786+
OID for the public key algorithm used by the DPE profile
747787
* attributes: An "Extension Request" attribute as defined in RFC 2985
748788
[@{ietf-rfc2985}] SHALL adhere to the following requirements
749789
* The BasicConstraints extension SHALL be included
@@ -786,6 +826,16 @@ The format “ocp.certificate.irot-eca.p384” is defined as follows:
786826
* For the Signature field, DPE SHALL use the ECDSA-with-SHA384 OID with NIST curve
787827
P-384.
788828

829+
### ocp.certificate.irot-eca.mldsa87
830+
831+
The format “ocp.certificate.irot-eca.mldsa87” is defined as follows:
832+
833+
* SHALL follow all "Requirements for ECA Certificates" in @sec:eca-cert-requirements
834+
* For FWID hashAlg fields provided by DeriveContext, DPE SHALL use the
835+
SHA2-512 OID.
836+
* For the SubjectPublicKeyInfo field, DPE SHALL use the ML-DSA-87 OID.
837+
* For the Signature field, DPE SHALL use the ML-DSA-87 OID.
838+
789839
### ocp.certificate.irot-leaf.p256
790840

791841
The format ocp.certificate.irot-leaf.p256” is defined as follows:
@@ -810,6 +860,16 @@ The format “ocp.certificate.irot.p384” is defined as follows:
810860
* For the Signature field, DPE SHALL use the ECDSA-with-SHA384 OID with NIST curve
811861
P-384.
812862

863+
### ocp.certificate.irot-leaf.mldsa87
864+
865+
The format “ocp.certificate.irot-eca.mldsa87” is defined as follows:
866+
867+
* SHALL follow all "Requirements for ECA Certificates" in @sec:eca-cert-requirements
868+
* For FWID hashAlg fields provided by DeriveContext, DPE SHALL use the
869+
SHA2-512 OID.
870+
* For the SubjectPublicKeyInfo field, DPE SHALL use the ML-DSA-87 OID.
871+
* For the Signature field, DPE SHALL use the ML-DSA-87 OID.
872+
813873
### ocp.csr.irot-leaf.p256
814874

815875
The format “ocp.csr.irot-leaf.p256” is defined as follows:
@@ -834,6 +894,17 @@ The format “ocp.csr.irot-leaf.p384” is defined as follows:
834894
* For the Signature of both the CMS message and the CertificationRequest, DPE SHALL
835895
use the ECDSA-with-SHA384 OID with NIST curve P-384.
836896

897+
### ocp.csr.irot-leaf.mldsa87
898+
899+
The format “ocp.csr.irot-eca.mldsa87” is defined as follows:
900+
901+
* SHALL follow all "Requirements for CSRs" in @sec:csr-requirements
902+
* For FWID hashAlg fields provided by DeriveContext, DPE SHALL use the
903+
SHA2-512 OID.
904+
* For the SubjectPublicKeyInfo field, DPE SHALL use the ML-DSA-87 OID.
905+
* For the Signature of both the CMS message and the CertificationRequest, DPE SHALL
906+
use the ML-DSA-87 OID.
907+
837908
## Profile Attributes
838909

839910
### ocp.profile.irot.p256
@@ -1178,6 +1249,46 @@ The format “ocp.csr.irot-leaf.p384” is defined as follows:
11781249
| supports-symmetric-sign | False |
11791250
+-------------------------------+------------------------------------------------------------------+
11801251

1252+
### ocp.profile.irot.mldsa87
1253+
1254+
+-------------------------------+------------------------------------------------------------------+
1255+
| **Attribute** | **Value** |
1256+
+===============================+==================================================================+
1257+
| =========================================== General ============================================ |
1258+
+-------------------------------+------------------------------------------------------------------+
1259+
| name | ocp.profile.irot.ml-dsa-87 |
1260+
+-------------------------------+------------------------------------------------------------------+
1261+
| inherits | ocp.profile.irot.p256 |
1262+
+-------------------------------+------------------------------------------------------------------+
1263+
| ============================================ Input ============================================= |
1264+
+-------------------------------+------------------------------------------------------------------+
1265+
| input-format | ocp.format.digest-sha384 |
1266+
+-------------------------------+------------------------------------------------------------------+
1267+
| ========================================= Derivation =========================================== |
1268+
+-------------------------------+------------------------------------------------------------------+
1269+
| dice-derivation | ocp.derive.kdf-cdi-512 |
1270+
+-------------------------------+------------------------------------------------------------------+
1271+
| asymmetric-derivation | ocp.derive.kdf-asymmetric-mldsa87 |
1272+
+-------------------------------+------------------------------------------------------------------+
1273+
| ======================================== Certificates ========================================== |
1274+
+-------------------------------+------------------------------------------------------------------+
1275+
| leaf-certificate-format | ocp.certificate.irot-leaf.mldsa87 |
1276+
+-------------------------------+------------------------------------------------------------------+
1277+
| eca-certificate-format | ocp.certificate.irot-eca.mldsa87 |
1278+
+-------------------------------+------------------------------------------------------------------+
1279+
| ========================================= Signatures =========================================== |
1280+
+-------------------------------+------------------------------------------------------------------+
1281+
| to-be-signed-format | ocp.format.mldsa87-external-mu. |
1282+
+-------------------------------+------------------------------------------------------------------+
1283+
| public-key-format | ocp.key-format.mldsa87.raw |
1284+
+-------------------------------+------------------------------------------------------------------+
1285+
| signature-format | ocp.signature-format.mldsa87.raw |
1286+
+-------------------------------+------------------------------------------------------------------+
1287+
| =========================================== Export ============================================= |
1288+
+-------------------------------+------------------------------------------------------------------+
1289+
| export-cdi-format | ocp.export-cdi.raw-512 |
1290+
+-------------------------------+------------------------------------------------------------------+
1291+
11811292
## ABI Structure Definitions {#sec:abi-structure-definitions}
11821293

11831294
All structures are fixed size for a given profile. In some cases, command/response structures differ
@@ -1237,6 +1348,7 @@ Table: Profile Constants
12371348
`DPE_PROFILE_IROT_MIN_P384_SHA384` | 0x2
12381349
`DPE_PROFILE_IROT_P256_SHA256` | 0x3
12391350
`DPE_PROFILE_IROT_P384_SHA384` | 0x4
1351+
`DPE_PROFILE_IROT_MLDSA87_SHA384` | 0x5
12401352

12411353
Table: Certificate Formats
12421354

@@ -1297,6 +1409,15 @@ Table: Profile-dependant ABI constants for `DPE_PROFILE_IROT_P384_SHA384`
12971409
`S` | Signature Size | 96
12981410
`C` | Certificate Size | 6144
12991411

1412+
Table: Profile-dependant ABI constants for `DPE_PROFILE_IROT_MLDSA87_SHA384`
1413+
1414+
**Name** | **Description** | **Value**
1415+
------------ | --------------------- | --------
1416+
`H` | Hash Size | 64
1417+
`P` | Public Key Size | 2592
1418+
`S` | Signature Size | 4697
1419+
`C` | Certificate Size | TODO
1420+
13001421
### Types
13011422

13021423
Table: ABI Types
@@ -1465,7 +1586,7 @@ Table: `SIGN_INPUT_ARGS` struct
14651586
| ------- | ------------- | ------- | -------------------- | -------------------------------------------------------
14661587
| 0x00 | `U32` | 31:0 | `MAGIC` | Magic number `DPE_COMMAND_MAGIC`.
14671588
| 0x04 | `U32` | 31:0 | `COMMAND_ID` | `DPE_COMMAND_SIGN`.
1468-
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_IROT_SHA256_P256`.
1589+
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_*`.
14691590
| 0x0C | `BYTES` | 127:0 | `CONTEXT_HANDLE` | A numeric handle referring to a DPE context.
14701591
| 0x1C | `HASH` | | `LABEL` | Digest measurement label used in key derivation.
14711592
| 0x1C + H | `BITFIELD` | 31:0 | `RESERVED` | Reserved
@@ -1477,7 +1598,7 @@ Table: `SIGN_OUTPUT_ARGS` struct
14771598
| ------- | ---------- | ------- | ---------------------- | -------------------------------------------------
14781599
| 0x00 | `U32` | 31:0 | `MAGIC` | Magic number `DPE_RESPONSE_MAGIC`.
14791600
| 0x04 | `U32` | 31:0 | `STATUS` | One of `DPE_STATUS_*`.
1480-
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_IROT_SHA256_P256`.
1601+
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_*`.
14811602
| 0x0C | `BYTES` | 127:0 | `NEW_CONTEXT_HANDLE` | Numeric handle referring to the updated context.
14821603
| 0x1C | `SIGNATURE` | | `SIGNATURE` | Signature over `TO_BE_SIGNED`
14831604

0 commit comments

Comments
 (0)