-
Notifications
You must be signed in to change notification settings - Fork 32
Add ML-DSA-87 DPE profile #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -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`. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
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}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`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" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
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. |
There was a problem hiding this comment.
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.| |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* ASCII Bytes "ECC" | |
* ASCII Bytes "MLDSA" |
* `LABEL` | ||
* ASCII Bytes "ECC" | ||
* Outputs | ||
* 48-byte key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format “ocp.tbs-format.digest-sha384” is defined as | |
The format “ocp.tbs-format.digest-sha512” is defined as |
additional processing. The size of the value SHALL be a SHA2-384 digest of | ||
size 48 bytes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| inherits | ocp.profile.irot.p256 | | |
| inherits | ocp.profile.irot.p384-sha512 | |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 0x20 + H | `BYTES` | 8191:0 | `TO_BE_SIGNED` | Message to be signed. | |
| 0x24 + H | `BYTES` | 8191:0 | `TO_BE_SIGNED` | Message to be signed. |
Additionally, add a P384-SHA512 profile. This is to provide a classical profile whose measurement format is compatible with ML-DSA-87.