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

Rename Dilithium to ML-DSA #1

Merged
merged 7 commits into from
Jun 5, 2024
Merged

Conversation

wip-abramson
Copy link
Collaborator

@wip-abramson wip-abramson commented May 14, 2024

I have removed all references to dilithium. Using ML-DSA-44 or experimental-mldsa-2024 where appropriate.

I am not sure what this means for the current examples, I assume they would have to change.

I also attempted to add a reference to the FIPS paper, which I think specifies this ML-DSA algorithm. But I definitely didn't do this correctly.

It is a start :)


Preview | Diff

@wip-abramson wip-abramson requested a review from msporny as a code owner May 14, 2024 17:43
Copy link

@andrea-dintino andrea-dintino left a comment

Choose a reason for hiding this comment

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

We used "cryptosuite": "experimental-mldsa44-2024" in the VC. I guess it's desirable to specify which flavor of the algo we're using, as later we may implement different flavors, with format differences... but I'm happy both ways. My comment applies to the whole html, not just related to my 2 comments.

@@ -457,20 +465,20 @@ <h4>DataIntegrityProof</h4>
</p>
<p>
The `cryptosuite` property of the proof MUST be
`experimental-quantum-safe-dilithium-2024`.
`experimental-ml-dsa-2024`.

Choose a reason for hiding this comment

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

we used "experimental-mldsa44-2024" as ml-dsa-44 is the only algo we implemented so far

index.html Outdated
@@ -480,7 +488,7 @@ <h4>DataIntegrityProof</h4>
"myWebsite": "https://hello.world.example/",
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "experimental-quantum-safe-dilithium-2024",
"cryptosuite": "experimental-mldsa-2024",

Choose a reason for hiding this comment

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

Same as above

index.html Outdated
[[VC-DATA-INTEGRITY]] produced using Dilithium cryptographic key material
that is compliant with <span class="issue">cite Dilithium spec</span>.
[[VC-DATA-INTEGRITY]] produced using ML-DSA-44 cryptographic key material
that is compliant with <span class="issue">cite ML-DSA spec - I belive this is FIPS-204</span>.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, it's FIPS-204.

Suggested change
that is compliant with <span class="issue">cite ML-DSA spec - I belive this is FIPS-204</span>.
that is compliant with the [[[FIPS-204]]].

index.html Outdated
expression of a Dilithium public key.
<span class="issue">Specify acceptable Dilithium key sizes</span>
expression of a ML-DSA public key.
<span class="issue">Specify acceptable ML-DSA key sizes</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

ML-DSA-44 public key size is 1312 bytes, private key size is 2528 bytes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great, these values are already there. Removing this issue

</p>

<p>
The Multikey encoding of a Dilithium public key MUST start with the two-byte
The Multikey encoding of a ML-DSA public key MUST start with the two-byte
prefix `0x8724` (the varint expression of `0x1207`) followed by the 1312-byte
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reminder that we /really/ need to register these values here: https://github.com/multiformats/multicodec/blob/master/table.csv#L168

Copy link
Collaborator Author

@wip-abramson wip-abramson May 29, 2024

Choose a reason for hiding this comment

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

I raised an issue to track this: #2

index.html Outdated
signature produced according to using the algorithms specified in section
[[[#algorithms]]], encoded according
to ??? encoded using the base-64-url-nopad header and
to <span class="issue">What is the encoding?</span>??? encoded using the base-64-url-nopad header and
Copy link
Collaborator

Choose a reason for hiding this comment

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

Encoding is whatever is in FIPS-204.

Copy link

@andrea-dintino andrea-dintino May 30, 2024

Choose a reason for hiding this comment

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

Encoding is whatever is in FIPS-204.

I checked FIPS-204 at page 24, and it seems that no encoding is defined. We're using liboqs which takes binaries as input/output.

We're currently using base64 for keys and sigs... should we stick to that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My understanding is we would use the pkEncode function to repsent the keys as bytes following FIPS-204 then encode those bytes in some manner.

I think we should use multibase as thats what the other data integrity specs use. Whether base58-btc or base64 I don't know, I think I prefer base58

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess it is already using multibase actually

index.html Outdated
@@ -898,7 +906,7 @@ <h4>Proof Serialization (experimental-dilithium-quantum-safe-2024)</h4>
|options|.|verificationMethod| value.
</li>
<li>
Let |proofBytes| be the result of applying the Dilithium-2
Let |proofBytes| be the result of applying the ML_DSA_44
Signature Algorithm [???REF???], with |hashData| as the data
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ref is to FIPS-204.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I included the FIPS in the references, but I couldnt figure out how to ref it properly. Or maybe I didn't include it in the list right. Taking another look ...

Copy link
Collaborator

@msporny msporny left a comment

Choose a reason for hiding this comment

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

Approved with a few nits that would be nice to resolve in this PR. If not, we can do it later.

@wip-abramson
Copy link
Collaborator Author

I will try address the comments :)

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated
private key).
</p>
<p>
The encoding of a Dilithium=2 secret key MUST start with the two-byte prefix
The encoding of a <span class="issue">What should this be now we have moved to ML-DSA</span>ML-DSA=44 secret key MUST start with the two-byte prefix
Copy link
Contributor

Choose a reason for hiding this comment

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

Should = be a -?

wip-abramson and others added 3 commits May 30, 2024 11:31
Co-authored-by: David I. Lehn <[email protected]>
Co-authored-by: David I. Lehn <[email protected]>
@wip-abramson
Copy link
Collaborator Author

Okay, I think this is good to go. Can I merge?

@andrea-dintino
Copy link

Okay, I think this is good to go. Can I merge?

Yes from me :-)

@wip-abramson wip-abramson merged commit 9e0d957 into w3c-ccg:main Jun 5, 2024
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.

4 participants