Skip to content

Commit 918b100

Browse files
authored
Add ML-DSA-87 DPE profile (#66)
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 <jhand@google.com>
1 parent 292e23b commit 918b100

File tree

2 files changed

+151
-6
lines changed

2 files changed

+151
-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: 145 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ This document defines multiple variants of the DPE iRoT profile:
105105
* `DPE_PROFILE_IROT_P384_SHA384`
106106
* `DPE_PROFILE_IROT_MIN_P256_SHA256`
107107
* `DPE_PROFILE_IROT_MIN_P384_SHA384`
108+
* `DPE_PROFILE_IROT_MLDSA_87_SHA384`
109+
110+
Names follow the format:
111+
112+
`DPE_PROFILE_IROT{_OPTIONAL_VARIANT}_{SIGNING_ALGORITHM}_{MEASUREMENT_DIGEST_ALGORITHM}`
113+
114+
Currently, the only supported optional variant is "MIN", which supports a smaller subset of the DPE commands.
108115

109116
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.
110117

@@ -449,6 +456,13 @@ cryptographic algorithms:
449456
* ECDSA P-384
450457
* SHA2-384
451458

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

453467
This profile defines the following derivation schemes for use in Profile
454468
Attributes.
@@ -485,6 +499,18 @@ The CDI derivation scheme “ocp.derive.kdf-cdi-384” is defined as follows:
485499
* Outputs
486500
* 48-byte key
487501

502+
### ocp.derive.kdf-cdi-512
503+
504+
The CDI derivation scheme “ocp.derive.kdf-cdi-512” is defined as follows:
505+
506+
* This derivation scheme SHALL use a cryptographically secure KDF or DRBG.
507+
* Inputs
508+
* CDI
509+
* `MEASUREMENT_DATA`
510+
* ASCII Bytes "DPE"
511+
* Outputs
512+
* 64-byte key
513+
488514
## CDI Export
489515

490516
### ocp.export-cdi.raw-256
@@ -499,6 +525,12 @@ The CDI export scheme "ocp.export-cdi.raw" is a raw 384-bit secret
499525

500526
To generate exported keypair, use asymmetric-derivation for the relevant profile.
501527

528+
### ocp.export-cdi.raw-512
529+
530+
The CDI export scheme "ocp.export-cdi.raw" is a raw 512-bit secret
531+
532+
To generate exported keypair, use asymmetric-derivation for the relevant profile.
533+
502534
## Key Derivation
503535

504536
* `LABEL`: LABEL parameter passed to Sign and CertifyKey
@@ -534,18 +566,31 @@ follows:
534566
* Outputs
535567
* 48-byte key
536568

537-
### ocp.key-format.p256.raw
569+
### ocp.derive.kdf-asymmetric-mldsa87
538570

539-
The concatenation of the 32-byte X value and 32-byte Y value of the ECDSA public key.
571+
The asymmetric key derivation scheme “ocp.derive.kdf-asymmetric-mldsa87” is defined as
572+
follows:
540573

541-
Both the X and Y value SHALL be big-endian and left-padded with zeros.
574+
* The asymmetric key type is ML-DSA-87
575+
* Signature scheme is ML-DSA
576+
* This derivation scheme SHALL use a cryptographically secure KDF or DRBG.
577+
* Inputs
578+
* CDI
579+
* `LABEL`
580+
* ASCII Bytes "MLDSA"
581+
* Outputs
582+
* 64-byte key
542583

543584
### ocp.key-format.p384.raw
544585

545586
The concatenation of the 48-byte X value and 48-byte Y value of the ECDSA public key.
546587

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

590+
### ocp.key-format.mldsa87.raw
591+
592+
A raw ML-DSA-87 key, encoded as using the pkEncode function in FIPS 204
593+
549594
## Sign Format
550595

551596
### ocp.tbs-format.digest-sha256
@@ -564,6 +609,15 @@ The format “ocp.tbs-format.digest-sha384” is defined as
564609
additional processing. The size of the value SHALL be a SHA2-384 digest of
565610
size 48 bytes.
566611

612+
### ocp.tbs-format.mldsa87-external-mu
613+
614+
The format “ocp.tbs-format.mldsa87-external-mu” is defined as
615+
616+
The mu parameter as described in FIPS 204.
617+
618+
* tr = SHAKE256(public_key, 64)
619+
* mu = SHAKE256(tr || message, 64)
620+
567621
### ocp.signature-format.p256.raw
568622

569623
The concatenation of the 32-byte R value and 32-byte S value of the ECDSA signature.
@@ -576,6 +630,10 @@ The concatenation of the 48-byte R value and 48-byte S value of the ECDSA signat
576630

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

633+
### ocp.signature-format.mldsa87.raw
634+
635+
TODO
636+
579637
## Recursive Derivation
580638

581639
### ocp.recursive-derivation.extend-tci
@@ -745,7 +803,7 @@ following requirements:
745803
* version: The version of the CSR specification - the version SHALL be 0
746804
* subject: The subject name of the CSR
747805
* subjectPKInfo: This field SHALL contain the subject public key and the
748-
OID for the EC public key algorithm used by the DPE profile
806+
OID for the public key algorithm used by the DPE profile
749807
* attributes: An "Extension Request" attribute as defined in RFC 2985
750808
[@{ietf-rfc2985}] SHALL adhere to the following requirements
751809
* The BasicConstraints extension SHALL be included
@@ -788,6 +846,16 @@ The format “ocp.certificate.irot-eca.p384” is defined as follows:
788846
* For the Signature field, DPE SHALL use the ECDSA-with-SHA384 OID with NIST curve
789847
P-384.
790848

849+
### ocp.certificate.irot-eca.mldsa87
850+
851+
The format “ocp.certificate.irot-eca.mldsa87” is defined as follows:
852+
853+
* SHALL follow all "Requirements for ECA Certificates" in @sec:eca-cert-requirements
854+
* For FWID hashAlg fields provided by DeriveContext, DPE SHALL use the
855+
SHA2-512 OID.
856+
* For the SubjectPublicKeyInfo field, DPE SHALL use the ML-DSA-87 OID.
857+
* For the Signature field, DPE SHALL use the ML-DSA-87 OID.
858+
791859
### ocp.certificate.irot-leaf.p256
792860

793861
The format ocp.certificate.irot-leaf.p256” is defined as follows:
@@ -812,6 +880,16 @@ The format “ocp.certificate.irot.p384” is defined as follows:
812880
* For the Signature field, DPE SHALL use the ECDSA-with-SHA384 OID with NIST curve
813881
P-384.
814882

883+
### ocp.certificate.irot-leaf.mldsa87
884+
885+
The format “ocp.certificate.irot-eca.mldsa87” is defined as follows:
886+
887+
* SHALL follow all "Requirements for ECA Certificates" in @sec:eca-cert-requirements
888+
* For FWID hashAlg fields provided by DeriveContext, DPE SHALL use the
889+
SHA2-512 OID.
890+
* For the SubjectPublicKeyInfo field, DPE SHALL use the ML-DSA-87 OID.
891+
* For the Signature field, DPE SHALL use the ML-DSA-87 OID.
892+
815893
### ocp.csr.irot-leaf.p256
816894

817895
The format “ocp.csr.irot-leaf.p256” is defined as follows:
@@ -836,6 +914,17 @@ The format “ocp.csr.irot-leaf.p384” is defined as follows:
836914
* For the Signature of both the CMS message and the CertificationRequest, DPE SHALL
837915
use the ECDSA-with-SHA384 OID with NIST curve P-384.
838916

917+
### ocp.csr.irot-leaf.mldsa87
918+
919+
The format “ocp.csr.irot-eca.mldsa87” is defined as follows:
920+
921+
* SHALL follow all "Requirements for CSRs" in @sec:csr-requirements
922+
* For FWID hashAlg fields provided by DeriveContext, DPE SHALL use the
923+
SHA2-512 OID.
924+
* For the SubjectPublicKeyInfo field, DPE SHALL use the ML-DSA-87 OID.
925+
* For the Signature of both the CMS message and the CertificationRequest, DPE SHALL
926+
use the ML-DSA-87 OID.
927+
839928
## Profile Attributes
840929

841930
### ocp.profile.irot.p256
@@ -1180,6 +1269,46 @@ The format “ocp.csr.irot-leaf.p384” is defined as follows:
11801269
| supports-symmetric-sign | False |
11811270
+-------------------------------+------------------------------------------------------------------+
11821271

1272+
### ocp.profile.irot.mldsa87
1273+
1274+
+-------------------------------+------------------------------------------------------------------+
1275+
| **Attribute** | **Value** |
1276+
+===============================+==================================================================+
1277+
| =========================================== General ============================================ |
1278+
+-------------------------------+------------------------------------------------------------------+
1279+
| name | ocp.profile.irot.ml-dsa-87 |
1280+
+-------------------------------+------------------------------------------------------------------+
1281+
| inherits | ocp.profile.irot.p256 |
1282+
+-------------------------------+------------------------------------------------------------------+
1283+
| ============================================ Input ============================================= |
1284+
+-------------------------------+------------------------------------------------------------------+
1285+
| input-format | ocp.format.digest-sha384 |
1286+
+-------------------------------+------------------------------------------------------------------+
1287+
| ========================================= Derivation =========================================== |
1288+
+-------------------------------+------------------------------------------------------------------+
1289+
| dice-derivation | ocp.derive.kdf-cdi-512 |
1290+
+-------------------------------+------------------------------------------------------------------+
1291+
| asymmetric-derivation | ocp.derive.kdf-asymmetric-mldsa87 |
1292+
+-------------------------------+------------------------------------------------------------------+
1293+
| ======================================== Certificates ========================================== |
1294+
+-------------------------------+------------------------------------------------------------------+
1295+
| leaf-certificate-format | ocp.certificate.irot-leaf.mldsa87 |
1296+
+-------------------------------+------------------------------------------------------------------+
1297+
| eca-certificate-format | ocp.certificate.irot-eca.mldsa87 |
1298+
+-------------------------------+------------------------------------------------------------------+
1299+
| ========================================= Signatures =========================================== |
1300+
+-------------------------------+------------------------------------------------------------------+
1301+
| to-be-signed-format | ocp.format.mldsa87-external-mu. |
1302+
+-------------------------------+------------------------------------------------------------------+
1303+
| public-key-format | ocp.key-format.mldsa87.raw |
1304+
+-------------------------------+------------------------------------------------------------------+
1305+
| signature-format | ocp.signature-format.mldsa87.raw |
1306+
+-------------------------------+------------------------------------------------------------------+
1307+
| =========================================== Export ============================================= |
1308+
+-------------------------------+------------------------------------------------------------------+
1309+
| export-cdi-format | ocp.export-cdi.raw-512 |
1310+
+-------------------------------+------------------------------------------------------------------+
1311+
11831312
## ABI Structure Definitions {#sec:abi-structure-definitions}
11841313

11851314
All structures are fixed size for a given profile. In some cases, command/response structures differ
@@ -1239,6 +1368,7 @@ Table: Profile Constants
12391368
`DPE_PROFILE_IROT_MIN_P384_SHA384` | 0x2
12401369
`DPE_PROFILE_IROT_P256_SHA256` | 0x3
12411370
`DPE_PROFILE_IROT_P384_SHA384` | 0x4
1371+
`DPE_PROFILE_IROT_MLDSA87_SHA384` | 0x5
12421372

12431373
Table: Certificate Formats
12441374

@@ -1299,6 +1429,15 @@ Table: Profile-dependant ABI constants for `DPE_PROFILE_IROT_P384_SHA384`
12991429
`S` | Signature Size | 96
13001430
`C` | Certificate Size | 6144
13011431

1432+
Table: Profile-dependant ABI constants for `DPE_PROFILE_IROT_MLDSA87_SHA384`
1433+
1434+
**Name** | **Description** | **Value**
1435+
------------ | --------------------- | --------
1436+
`H` | Hash Size | 64
1437+
`P` | Public Key Size | 2592
1438+
`S` | Signature Size | 4697
1439+
`C` | Certificate Size | TODO
1440+
13021441
### Types
13031442

13041443
Table: ABI Types
@@ -1467,7 +1606,7 @@ Table: `SIGN_INPUT_ARGS` struct
14671606
| ------- | ------------- | ------- | -------------------- | -------------------------------------------------------
14681607
| 0x00 | `U32` | 31:0 | `MAGIC` | Magic number `DPE_COMMAND_MAGIC`.
14691608
| 0x04 | `U32` | 31:0 | `COMMAND_ID` | `DPE_COMMAND_SIGN`.
1470-
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_IROT_SHA256_P256`.
1609+
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_*`.
14711610
| 0x0C | `BYTES` | 127:0 | `CONTEXT_HANDLE` | A numeric handle referring to a DPE context.
14721611
| 0x1C | `HASH` | | `LABEL` | Digest measurement label used in key derivation.
14731612
| 0x1C + H | `BITFIELD` | 31:0 | `RESERVED` | Reserved
@@ -1479,7 +1618,7 @@ Table: `SIGN_OUTPUT_ARGS` struct
14791618
| ------- | ---------- | ------- | ---------------------- | -------------------------------------------------
14801619
| 0x00 | `U32` | 31:0 | `MAGIC` | Magic number `DPE_RESPONSE_MAGIC`.
14811620
| 0x04 | `U32` | 31:0 | `STATUS` | One of `DPE_STATUS_*`.
1482-
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_IROT_SHA256_P256`.
1621+
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_*`.
14831622
| 0x0C | `BYTES` | 127:0 | `NEW_CONTEXT_HANDLE` | Numeric handle referring to the updated context.
14841623
| 0x1C | `SIGNATURE` | | `SIGNATURE` | Signature over `TO_BE_SIGNED`
14851624

0 commit comments

Comments
 (0)