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

Xmss test lms #1

Closed
wants to merge 2 commits into from
Closed

Xmss test lms #1

wants to merge 2 commits into from

Conversation

ashman-p
Copy link
Owner

@ashman-p ashman-p commented Apr 4, 2023

Initial commit of Cisco's open source LMS.
This is the initial commit. The following commits should have more weighty code additions.

Fixes open-quantum-safe#1098.

  • [N ] 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.)
  • [ Y ] Does this PR change the the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in oqs-provider, OQS-OpenSSL, OQS-BoringSSL, and OQS-OpenSSH will also need to be ready for review and merge by the time this is merged.)

@ashman-p ashman-p self-assigned this Apr 4, 2023
@@ -0,0 +1,879 @@
# CMAKE generated file: DO NOT EDIT!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it intentional/necessary to add cmake generated files into git?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Nope. A miss. Will remove.

Copy link
Collaborator

@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 taking this on, @ashman-p !

Generally, LGTM. The location of code also makes sense to me: Not integrated into sig as it is no "straight" (NIST) PQ sig alg. Agreed, @dstebila?

What would be good to have right from the start is some CI test: It aids (at least me) understanding how everything fits together (builds/tests). For starters, just one platform/CI system, e.g., Linux.

@@ -0,0 +1,121 @@
AR = /usr/bin/ar
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hardcoded compiler/assembler paths. Doesn't look right.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Agreed but, this makefile will not be used in liboqs. This is as-is, untouched from the LMS repo.
I guess the preferece is to only commit files that will be used? I can also remove the test files and migrate them later to oqs test directories.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess the preferece is to only commit files that will be used?

Most definitely -- there shouldn't be anything in OQS that is useless.

See read.me for documentation how to use it.

This is the ACVP branch - designed to be (optionally) compatible with the
public ACVP server
Copy link
Collaborator

Choose a reason for hiding this comment

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

What server is this? Will we (eventually) (want to) be able to use it for testing?

Copy link
Owner Author

Choose a reason for hiding this comment

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

This is the NIST ACVP test server. NIST is in the process of adding LMS test vectors. An ACVP test harness would be required to handle this type of testing, which Cisco has an open source version. It would have to be integrated for OQS.
This service is more targeted if FIPS algorithm testing is of interest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Test vector testing (known answer tests - KATs) should be part of CI testing as it already is for all other algorithms. If this can be done independently of a server, perfect. Can you add a pointer to this server(s documentation) such as to understand what its benefits would be?

#define OQS_SIG_STFL_alg_lmots_sha256_n32_w3 "LMOTS-SHA256_N32_W4" //0x00000003

/* Algorithm identifier for XMSSMT-SHA2_60/12_256 */
#define OQS_SIG_STFL_alg_lmots_sha256_n32_w4 "LMOTS-SHA256_N32_W8" //0x00000004

/**
* Returns identifiers for available signature schemes in liboqs. Used with OQS_SIG_STFL_new.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suppose comment should read "...for available stateful signature schemes..."? Or should this code fit identically into the current liboqs sig APIs?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Will fix these comments.

@ashman-p
Copy link
Owner Author

ashman-p commented Apr 6, 2023

Thanks Michael,
The current stateful tests test_sig_mem, test_sig_stfl_mem and dump_alg_info are the intended basic tests for me.
They currently run list the algorithms, and fails cleanly for key gen. More to come in subsequent commits.
I plan to close this PR, update per the given comments and reopen the PR on the main fork since i now have write access there (Thanks Douglas).

@baentsch
Copy link
Collaborator

baentsch commented Apr 6, 2023

since i now have write access there

see my comments there. There's no objection at least from my side to anyone doing development in a "silent" (non-PRd) branch of OQS (which the write access permits you to do now).

A PR IMO should only be opened if the work is basically complete to avoid "information overload" to the team subscribed to the project: Would you want to be informed about every development commit of a team member well prior to work completion?

@ashman-p ashman-p closed this Sep 29, 2024
@ashman-p ashman-p deleted the xmss-test-lms branch September 29, 2024 04:27
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.

2 participants