Skip to content

Conversation

jhand2
Copy link

@jhand2 jhand2 commented Aug 29, 2025

Additionally, add a P384-SHA512 profile. This is to provide a classical profile whose measurement format is compatible with ML-DSA-87.

@@ -1468,9 +1621,24 @@ Table: `SIGN_INPUT_ARGS` struct
| 0x08 | `U32` | 31:0 | `PROFILE` | One of `DPE_PROFILE_IROT_SHA256_P256`.
| 0x0C | `BYTES` | 127:0 | `CONTEXT_HANDLE` | A numeric handle referring to a DPE context.
| 0x1C | `HASH` | | `LABEL` | Digest measurement label used in key derivation.
| 0x1C + H | `BITFIELD` | 31:0 | `RESERVED` | Reserved
| 0x1C + H | `BITFIELD` | 31 | `FULL_MESSAGE` | If set, `TO_BE_SIGNED` contains the full message. This flag is only supported where explicitly specified in `to-be-signed-format`.
Copy link
Author

Choose a reason for hiding this comment

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

I'm not yet convinced this is the best way to do this, but I kinda like it because it doesn't break back compat with older profile revisions.

`H` | Hash Size | 64
`P` | Public Key Size | 2592
`S` | Signature Size | 4697
`C` | Certificate Size | TODO
Copy link
Author

Choose a reason for hiding this comment

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

Still open

@@ -1178,6 +1263,63 @@ The format “ocp.csr.irot-leaf.p384” is defined as follows:
| supports-symmetric-sign | False |
+-------------------------------+------------------------------------------------------------------+

### ocp.profile.irot.p384-sha512
Copy link
Author

Choose a reason for hiding this comment

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

Consider breaking this profile into a separate PR

@jhand2 jhand2 marked this pull request as ready for review August 29, 2025 22:43
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]>

Names follow the format:

`DPE_PROFILE_IROT{_OPTIONAL_VARIANT}_{SIGNING_ALGORITHM}_{MEASUREMENT_DIGEST_ALGORITHM}`

Choose a reason for hiding this comment

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

Suggested change
`DPE_PROFILE_IROT{_OPTIONAL_VARIANT}_{SIGNING_ALGORITHM}_{MEASUREMENT_DIGEST_ALGORITHM}`
`DPE_PROFILE_IROT_{OPTIONAL_VARIANT}_{SIGNING_ALGORITHM}_{MEASUREMENT_DIGEST_ALGORITHM}`

What does "OPTIONAL" mean in this context?

* Inputs
* CDI
* `LABEL`
* ASCII Bytes "ECC"

Choose a reason for hiding this comment

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

Should the ASCII bytes be "ML-DSA"?

* `LABEL`
* ASCII Bytes "ECC"
* Outputs
* 48-byte key

Choose a reason for hiding this comment

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

Should this be a 64 byte key?

Comment on lines +598 to +602
The format “ocp.tbs-format.digest-sha384” is defined as

* A digest which will be signed directly using the signing scheme with no
additional processing. The size of the value SHALL be a SHA2-384 digest of
size 48 bytes.

Choose a reason for hiding this comment

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

Should this be SHA-512, not SHA-384?

+-------------------------------+------------------------------------------------------------------+
| ========================================= Signatures =========================================== |
+-------------------------------+------------------------------------------------------------------+
| to-be-signed-format | If Sign FULL_MESSAGE flag is set, ocp.format.mldsa87-external-mu.|

Choose a reason for hiding this comment

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

nit: Maybe specify Sign Command?

* Inputs
* CDI
* `LABEL`
* ASCII Bytes "ECC"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* ASCII Bytes "ECC"
* ASCII Bytes "MLDSA"

* `LABEL`
* ASCII Bytes "ECC"
* Outputs
* 48-byte key
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* 48-byte key
* 4896-byte key

@@ -562,6 +593,29 @@ The format “ocp.tbs-format.digest-sha384” is defined as
additional processing. The size of the value SHALL be a SHA2-384 digest of
size 48 bytes.

### ocp.tbs-format.digest-sha512

The format “ocp.tbs-format.digest-sha384” is defined as
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The format “ocp.tbs-format.digest-sha384” is defined as
The format “ocp.tbs-format.digest-sha512” is defined as

Comment on lines +601 to +602
additional processing. The size of the value SHALL be a SHA2-384 digest of
size 48 bytes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
additional processing. The size of the value SHALL be a SHA2-384 digest of
size 48 bytes.
additional processing. The size of the value SHALL be a SHA2-512 digest of
size 64 bytes.

+-------------------------------+------------------------------------------------------------------+
| name | ocp.profile.irot.ml-dsa-87 |
+-------------------------------+------------------------------------------------------------------+
| inherits | ocp.profile.irot.p256 |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| inherits | ocp.profile.irot.p256 |
| inherits | ocp.profile.irot.p384-sha512 |

Copy link
Contributor

Choose a reason for hiding this comment

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

If we set this we can drop the input format section too

| 0x1C + H | `BITFIELD` | 31 | `FULL_MESSAGE` | If set, `TO_BE_SIGNED` contains the full message. This flag is only supported where explicitly specified in `to-be-signed-format`.
| | | 30:0 | `RESERVED` | Reserved
| 0x20 + H | `U32` | 31:0 | `TO_BE_SIGNED_SIZE` | Number of bytes populated in `TO_BE_SIGNED`
| 0x20 + H | `BYTES` | 8191:0 | `TO_BE_SIGNED` | Message to be signed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| 0x20 + H | `BYTES` | 8191:0 | `TO_BE_SIGNED` | Message to be signed.
| 0x24 + H | `BYTES` | 8191:0 | `TO_BE_SIGNED` | Message to be signed.

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.

3 participants