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

Pull Neon implementation of Falcon from PQClean #1547

Merged
merged 5 commits into from
Sep 13, 2023
Merged

Conversation

SWilson4
Copy link
Member

@SWilson4 SWilson4 commented Sep 11, 2023

Pull the ARM Neon implementation of Falcon from PQClean on behalf of @cothan. See PQClean/PQClean#493, PQClean/PQClean#497

  • 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 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.)

@SWilson4
Copy link
Member Author

@ducnguyen-sb
Copy link
Contributor

@SWilson4 Thank you, it's type confusion between signed and unsigned integer. Should I make a fix in this PR, or is it better to make a PR in pqclean and update here?

@SWilson4
Copy link
Member Author

@SWilson4 Thank you, it's type confusion between signed and unsigned integer. Should I make a fix in this PR, or is it better to make a PR in pqclean and update here?

I would say it's better to fix it in PQClean and then run copy_from_upstream again, but there's been some unrelated activity in PQClean since your initial two commits, and we presumably wouldn't want to pull that in at the same time. So I'm unsure. Thoughts on this @dstebila?

Either way, it's probably best if you can get CI to pass on this branch before making a PR in PQClean, since the CI over there evidently didn't complain about the type confusion. It will save having to iterate through the process again if another build error sneaks in.

@dstebila
Copy link
Member

@SWilson4 Thank you, it's type confusion between signed and unsigned integer. Should I make a fix in this PR, or is it better to make a PR in pqclean and update here?

I would say it's better to fix it in PQClean and then run copy_from_upstream again, but there's been some unrelated activity in PQClean since your initial two commits, and we presumably wouldn't want to pull that in at the same time. So I'm unsure. Thoughts on this @dstebila?

It's not a problem if there are other PQClean updates upstream alongside it, that's sometimes unavoidable based on how our pull-from-upstream process works.

@cothan
Copy link
Contributor

cothan commented Sep 12, 2023

Commit 91065c8 makes CI/CD green.

So I made a PR to fix type confusion in PQClean PQClean/PQClean#506.

@ducnguyen-sb
Copy link
Contributor

The PR PQClean/PQClean#506 is merged recently. I think it's alright to proceed.

@SWilson4
Copy link
Member Author

I ran copy_from_upstream at commit 8e220a87308154d48fdfac40abbb191ac7fce06a of PQClean and everything is passing.

Besides the Neon implementation of Falcon, there are some minor changes to McEliece from PQClean commit afcebe31ae6c636f39ce6852b8ee95c3f6e7670d. A bunch of newlines were deleted, which has made the diff light up like a Christmas tree. Another slight change there is outlined in PQClean/PQClean#503: it makes one of our patches unnecessary.

PQClean/PQClean#501 made another patch unnecessary. I deleted these patches and updated copy_from_upstream accordingly.

I also took the liberty of adding scripts/copy_from_upstream/verify_from_upstream to the .gitignore to prevent me from accidentally committing it after running ./copy_from_upstream -k verify (oops).

@SWilson4 SWilson4 marked this pull request as ready for review September 12, 2023 16:22
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.

Basically LGTM. Code license is clearly documented as Apache2 -- but I didn't find SPDX identifiers in the files. Could those be added going forward, please? This in support of (implementing) #1514 (eventually)?

@cothan
Copy link
Contributor

cothan commented Sep 12, 2023

Thanks @baentsch , sure I will update license of Falcon going forward.
Sorry I didn't know, I was following the Falcon ref License header example.

@baentsch
Copy link
Member

I will update license of Falcon going forward.

Thanks very much! Please let us know as and when landed in PQClean so we can update suitably.

@SWilson4 SWilson4 merged commit f761b06 into main Sep 13, 2023
@SWilson4 SWilson4 deleted the sw-falcon-neon branch September 13, 2023 12:59
@SWilson4 SWilson4 mentioned this pull request Sep 29, 2023
8 tasks
@cothan
Copy link
Contributor

cothan commented Oct 1, 2023

So I made a PR to add SPDX header in PQClean/PQClean#514

@baentsch
Copy link
Member

baentsch commented Oct 4, 2023

So I made a PR to add SPDX header in PQClean/PQClean#514

Much appreciated. But CI isn't exactly happy: How can this be? The diffs are only comments...

@cothan
Copy link
Contributor

cothan commented Oct 4, 2023

I totally agree with you. I think the PR changes in Falcon, so it triggers all implementations in Falcon tested. Turn out, AVX2 used defined macros (as it always is from the start) that makes become red.

@ducnguyen-sb
Copy link
Contributor

It's been a few weeks PQClean/PQClean#514, I think the other approach can be like this comment: PQClean/PQClean#514 (comment)

@baentsch
Copy link
Member

baentsch commented Dec 1, 2023

It's been a few weeks PQClean/PQClean#514, I think the other approach can be like this comment: PQClean/PQClean#514 (comment)

Agreed. But with the Linux Foundation driven sidelining of independent contributors I in turn sidelined caring about #1514: Should the people paid by entities restricting the breadth of licenses look into this, not people interested in progress of open source.

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.

5 participants