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

Update CROSS to version 2.0 #2078

Merged
merged 6 commits into from
Feb 20, 2025
Merged

Update CROSS to version 2.0 #2078

merged 6 commits into from
Feb 20, 2025

Conversation

rtjk
Copy link
Contributor

@rtjk rtjk commented Feb 16, 2025

This pull request updates CROSS from version 1.2 to version 2.0.

CROSS has advanced to the second round of NIST's call for additional signatures, and for the occasion, we have improved a few things. Here are the most relevant changes for liboqs (for a full list, please refer to the changelog submitted to NIST):

-Fixed trivial SUF-CMA forgeries (see #1995) by checking the zero-padding bytes during verification.
-Changed the seed-tree structure, fixing #1958 in the process.
-Resolved the endianness ambiguity in the CSPRNG (see #1961) by explicitly setting the bytes one at a time (we chose this solution over the one in #1983).

The insights we gained from OQS (especially from the liboqs test harness and oqs-demos) were instrumental in some of the improvements in CROSS 2.0. A huge thank you to the OQS maintainers for their great work!

Fixes #1958

Fixes #1995

  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
  • Does this PR change the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in fully supported downstream projects dependent on these, i.e., oqs-provider will also need to be ready for review and merge by the time this is merged.)

rtjk added 2 commits February 16, 2025 14:53
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
@rtjk rtjk marked this pull request as ready for review February 16, 2025 15:20
@rtjk
Copy link
Contributor Author

rtjk commented Feb 17, 2025

Regarding the fuzzing tests from #1955, which led to #1958: am I correct in understanding that they are enabled only for Dilithium2 and only in basic.yml, without being included in any other platform test?

Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
@baentsch
Copy link
Member

Regarding the fuzzing tests from #1955, which led to #1958: am I correct in understanding that they are enabled only for Dilithium2 and only in basic.yml, without being included in any other platform test?

As far as I understand, "No" and "Yes" in that order: This should ascertain that all OQS SIG algs get fuzzed, but indeed fuzzing only occurs in basic.yml. And whether or not 30secs are enough to perform "enough" fuzzing, I can't comment on. @SWilson4 and @nathaniel-brough most likely have more to say.

@rtjk
Copy link
Contributor Author

rtjk commented Feb 17, 2025

As far as I understand, "No" and "Yes" in that order

Doesn't that test enable only Dilithium2, though?

@baentsch
Copy link
Member

As far as I understand, "No" and "Yes" in that order

Doesn't that test enable only Dilithium2, though?

It indeed seems that way -- I guess that's because of the short time allotted for a PR CI. If you do a full build and fuzz test run, all SIG algs should be subject to the test, though. But upon checking the extended weekly test, I indeed don't find extended fuzz testing there as I'd expected. Intentional or oversight @SWilson4 ?

Copy link
Member

@baentsch baentsch left a comment

Choose a reason for hiding this comment

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

Thanks for the update @rtjk (and the friendly words!). Integration LGTM.

Copy link
Member

@bhess bhess left a comment

Choose a reason for hiding this comment

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

Thanks for the quick update, @rtjk! Please see the single comment. It appears that the extended tests (full KAT and constant-time tests) haven't run yet. You can trigger them by adding "[extended tests]" to the commit message.

rtjk added 3 commits February 18, 2025 12:02
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
Signed-off-by: rtjk <47841774+rtjk@users.noreply.github.com>
@SWilson4
Copy link
Member

As far as I understand, "No" and "Yes" in that order

Doesn't that test enable only Dilithium2, though?

It indeed seems that way -- I guess that's because of the short time allotted for a PR CI. If you do a full build and fuzz test run, all SIG algs should be subject to the test, though. But upon checking the extended weekly test, I indeed don't find extended fuzz testing there as I'd expected. Intentional or oversight @SWilson4 ?

I believe that extensive fuzzing of liboqs happens as part of Google's oss-fuzz project, and that was the motivation for adding the fuzzing tests. We (should) get an email to security@openquantumsafe.org if a fuzzing test fails. The check in our CI is just to ensure we don't break the fuzzing build.

@SWilson4
Copy link
Member

SWilson4 commented Feb 19, 2025

@nathaniel-brough Please fact-check the above comment for me!

@nathaniel-brough
Copy link
Contributor

@SWilson4 yeah that's right. There is a small amount of fuzzing done on every pull request to ensure the build doesn't break.

Then every night google/oss-fuzz will build the fuzzers and run them on a distributed cluster for a few hours a day.

Every sig algorithm is enabled during the oss-fuzz build.

@dstebila dstebila added this to the 0.13.0 milestone Feb 19, 2025
@baentsch baentsch merged commit 7791704 into open-quantum-safe:main Feb 20, 2025
78 checks passed
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.

CROSS broken sigs validate Verification error in CROSS-RDSDPG-128-small
6 participants