Skip to content
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

Added a P256 variant #97

Merged
merged 18 commits into from
Jan 29, 2025
Merged

Added a P256 variant #97

merged 18 commits into from
Jan 29, 2025

Conversation

ounsworth
Copy link
Contributor

@ounsworth ounsworth commented Jan 5, 2025

To do before merge:

  • Assign a prototyping OIDs for id-MLDSA65-ECDSA-P256 and id-HashMLDSA65-ECDSA-P256-SHA512 from the Entrust OID arc -- update all the places in the draft that need it.
  • Once the OID is assigned, compute the domain separator for it.

@johngray-dev I also fixed some typos in the IANA Considerations section (the non-prehashed OIDs still had a hash function in them), do you agree?

@@ -253,6 +253,21 @@ sa-MLDSA65-Ed25519 SIGNATURE-ALGORITHM ::=
pk-MLDSA65-Ed25519 }


-- TODO: OID to be replaced by IANA
id-MLDSA87-ECDSA-P256 OBJECT IDENTIFIER ::= {
Copy link

@ilaril ilaril Jan 5, 2025

Choose a reason for hiding this comment

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

Should this be ML-DSA-65 instead of ML-DSA-87? The other changes seem to be for ML-DSA-65+ECDSA-P256 combo (e.g., id-HashMLDSA65-ECDSA-P256-SHA512).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops. I must have been tired or drunk when I wrote this. Good catch.

@@ -417,6 +432,24 @@ sa-HashMLDSA65-RSA4096-PKCS15-SHA512 SIGNATURE-ALGORITHM ::=
id-HashMLDSA65-RSA4096-PKCS15-SHA512,
pk-HashMLDSA65-RSA4096-PKCS15-SHA512 }


-- TODO: OID to be replaced by IANA
id-HashMLDSA65-ECDSA-P256-SHA512 OBJECT IDENTIFIER ::= {
Copy link

@ilaril ilaril Jan 5, 2025

Choose a reason for hiding this comment

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

Is it intentional to use SHA-512 with ECDSA P-256 (which usually uses P-256)?

The SHA-512 hash will be truncated to 32 bytes (This is not the same as SHA-512/256).

Regarding speed of SHA-256 versus SHA-512, on 32-bit SHA-256 is faster, and on 64-bit SHA-512 is faster, unless there is hardware SHA-256, in which case SHA-256 is faster.

Copy link
Contributor Author

@ounsworth ounsworth Jan 6, 2025

Choose a reason for hiding this comment

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

This is intentional. The full specification of this cipher suite is:

| id-HashMLDSA65-ECDSA-P256-SHA512            | <CompSig>.XX  | id-ML-DSA-65 | ecdsa-with-SHA256 with secp256r1 | id-sha512 |

So the EC part is ecdsa-with-SHA256 with secp256r1. The SHA512 is a pre-hash common to both components, and since MLDSA65 is a NIST Level 3, this must be at least SHA384. We received feedback that SHA384 is not well supported so we should only use SHA256 and SHA512, so then this has to be SHA512.

Complicated, but that's how we got here. This is intentional.

ounsworth and others added 17 commits January 7, 2025 09:49
It said AlgorithmID while it is actually only the algorithm name.
AlgorithmID would by an ASN.1 structure.

Fixes #81
This applies to all non-PreHash names only.

Closes #102
…-underlying-components-section

Adds rationale for use of SHA512 with MLDSA-44 in CMS section.
Added a "Why Hybrids?" security consideration.
…algorithm-names-in-iana-section

Removes prehash from algorithm names in IANA section.
Fixes header of algorithm column in all tables.
@johngray-dev johngray-dev merged commit d5b36d4 into main Jan 29, 2025
2 checks passed
@johngray-dev johngray-dev deleted the mikeo_p256 branch January 29, 2025 18:20
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