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

CMS artifacts need to be updated to use the standard algoritms #153

Open
johngray-dev opened this issue Nov 2, 2024 · 7 comments
Open

Comments

@johngray-dev
Copy link
Collaborator

Currently the CMS artifacts are using the IPD version of the algorithms, they should be updated to use the standard algorithm version.

@carl-wallace
Copy link
Collaborator

carl-wallace commented Nov 2, 2024 via email

@codespree
Copy link

codespree commented Nov 3, 2024

@dghgit @carl-wallace if you plan to update CMS artifacts, could you help me verify mine?

cms_initial_test_artifacts.zip

Also, if you could post yours here, I could try to verify yours.

@dghgit
Copy link
Contributor

dghgit commented Nov 3, 2024

I get the string "IETF Hackathon" so I think they're working for me.

One issue I ran into is the private key encoding is missing the wrapping octet string - the contents of the privateKey field should be an encoding of an OCTET STRING, I've just noticed https://datatracker.ietf.org/doc/draft-ietf-lamps-cms-kyber/ is missing that, but I think it's an error, the wrapping OCTET STRING has always been included in the past for private keys, including with Edwards Curves, and dropping it at this point is going to make it extremely difficult to use a CHOICE in place of the OCTET STRING.

I've emailed Mike to mention the issue in the draft.

@codespree
Copy link

@dghgit I added a test case using the vectors in the draft:
codespree/quantcrypt@eb54459

As per the draft, I can use the public and private keys successfully.

Also, yesterday, I brought the implementation up to speed with draft-ietf-lamps-pq-composite-kem-05 via this commit:
codespree/quantcrypt@015415d

I am not entirely sure if my implementation uses the right triples. If you find any mistake let me know.

The triples are here:
https://github.com/codespree/quantcrypt/blob/f88195ed1e71c313069c8f2c311c98ea11255f77/src/cms/enveloped_data_builder.rs#L706

@carl-wallace
Copy link
Collaborator

@codespree I was able to decrypt the MLKEM768 and MLKEM1024 artifacts from your zip. I have not yet updated composite support (and may not get to that this week). Attached is an updated set of artifacts I just generated. If you could give these a try I'd appreciate it.
artifacts_cms_v2.zip

@dghgit
Copy link
Contributor

dghgit commented Nov 3, 2024

Hi Carl, if the mystery text is "abc" I'd say these are a print!

@codespree
Copy link

@carl-wallace @ZPDSSAI has validated your artifacts. All's good.

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

No branches or pull requests

4 participants