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

Allow for HashML-DSA only in the pub key of EE certs and define ctx #62

Merged
merged 8 commits into from
Dec 17, 2024
Merged
13 changes: 9 additions & 4 deletions draft-ietf-lamps-dilithium-certificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ The OIDs are:
~~~

The contents of the parameters component for each algorithm MUST be
absent.
absent. The ctx value used in the ML-DSA signing and verification
{{FIPS204}} of ML-DSA signatures defined in this specification
seanturner marked this conversation as resolved.
Show resolved Hide resolved
seanturner marked this conversation as resolved.
Show resolved Hide resolved
(X.509 certificates, CRLs) is the empty string
seanturner marked this conversation as resolved.
Show resolved Hide resolved

# ML-DSA Signatures in PKIX

Expand Down Expand Up @@ -427,7 +429,10 @@ defined in [FIPS204] section 5.4. This specification uses exclusively
ExternalMu-ML-DSA for pre-hashed use cases, and thus public
keys identified by `id-hash-ml-dsa-44-with-sha512`,
`id-hash-ml-dsa-65-with-sha512`, and `id-hash-ml-dsa-87-with-sha512`
MUST NOT be used in X.509 and related PKIX protocols.
MUST NOT be used in X.509 and related PKIX protocols with the
exception of the Public Key in end-entity X.509 certifacates.
Such public keys could be used beyond PKIX use-cases and thus
could need HashML-DSA.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not married to it. We could remove it.

The point here is that the PK in the leaf cert may be used for Secure Boot or any other use-case we are not aware of. HashML-DSA could be used there. Certs have many uses we are not aware of.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a trailing whitespace at the end of line 435 that the linter is not happy with!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


All functions and notation used in {{fig-externalmu-ml-dsa-external}}
and {{fig-externalmu-ml-dsa-internal}} are defined in [FIPS204].
Expand All @@ -437,9 +442,9 @@ External operations:
~~~
ExternalMu-ML-DSA.Prehash(pk, M, ctx):

if |ctx| > 255 then
if |ctx| > 0 then
return error # return an error indication if the context string is
# too long
# not the empty string
Copy link
Collaborator

Choose a reason for hiding this comment

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

These two lines should not be modified as these comments are still useful in case we want to do "prehashing" in a use case where context string is allowed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

end if

M' = BytesToBits(IntegerToBytes(0, 1) ∥ IntegerToBytes(|ctx|, 1)
Expand Down
Loading