Skip to content

fix(qruov): migrate importer to official integration upstream - #2685

Open
0rlych1kk4 wants to merge 3 commits into
open-quantum-safe:mainfrom
0rlych1kk4:fix/qruov-official-upstream-2637-clean
Open

0rlych1kk4 wants to merge 3 commits into
open-quantum-safe:mainfrom
0rlych1kk4:fix/qruov-official-upstream-2637-clean

Conversation

@0rlych1kk4

@0rlych1kk4 0rlych1kk4 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #2637.

This PR migrates the QR-UOV copy_from_upstream configuration from my previous integration fork to the official QR-UOV liboqs integration repository maintained under the qruov organization.

Official upstream:

The migration introduces qruov-common-aes-wrapper-compat.patch to preserve the existing liboqs common-AES integration and signature-wrapper behavior while sourcing QR-UOV from the official repository.

The existing NetBSD explicit_memset compatibility patch is retained. Generated algorithm documentation and upstream references are updated accordingly.

Changes

  • Update QR-UOV upstream repository, branch, and commit pin.
  • Add a compatibility patch to preserve the existing imported implementation.
  • Retain the existing NetBSD compatibility patch.
  • Update generated QR-UOV documentation and algorithm references.
  • Add a file-specific Git whitespace attribute to preserve valid patch context lines.

Validation

Clean PR branch (based on upstream 7bf154f1):

  • copy_from_upstream.py -k verify: 338/338 checked schemes match, zero differences.
  • Both QR-UOV patches applied successfully.
  • Staged whitespace checks passed.
  • One signed-off commit with seven changed files.

Original migration validation checkout (macOS ARM64, Apple Clang 21.0.0):

  • Importer copy and verification passed.
  • QR-UOV AES and SHAKE signature tests passed with exit status 0.
  • Both QR-UOV known-answer test SHA-256 digests matched the existing liboqs reference values.
  • The compatibility patch reconstructed the original pinned QR-UOV source tree exactly.

The cryptographic tests were performed on the original migration checkout; importer verification was repeated on the clean PR branch.

Cryptographic behavior and API compatibility

  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)?
  • Does this PR change the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API?

Explanation: Neither change is intended. This PR updates the QR-UOV upstream source location while preserving the existing imported implementation and algorithm interfaces. The tested AES and SHAKE KAT values remain unchanged.

Testing and CI

No new feature or algorithm is introduced. Existing importer verification, signature tests, and KAT validation provide regression coverage. No new CI workflow is proposed.

The PR has not yet completed its own GitHub CI checks.

Generative AI disclosure

Generative AI assistance was used for drafting documentation and the PR description. I personally executed the tests, reviewed the changes, and verified the reported results before submission.

Scope

This PR is limited to migrating QR-UOV to the official integration upstream while preserving existing functionality. It does not incorporate the separate stack-workspace changes discussed in #2598.

The compatibility patch is intended to bridge the differences between the current official integration repository and the implementation already imported by liboqs.

Signed-off-by: 0rlych1kk4 <orlychikka@gmail.com>
@coveralls

coveralls commented Nov 7, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 79.949% (+0.007%) from 79.942% — 0rlych1kk4:fix/qruov-official-upstream-2637-clean into open-quantum-safe:main

dstebila
dstebila previously approved these changes Nov 7, 2026
@dstebila

dstebila commented Nov 7, 2026

Copy link
Copy Markdown
Member

Thanks for working with the QR-UOV team to sort out this workflow!

@RodriM11

RodriM11 commented Nov 7, 2026

Copy link
Copy Markdown
Member

I have a question @0rlych1kk4 : there seems to be two repos in the QR-UOV workflow, round3 and round3-liboqs, with both of them holding implementation code. Does that mean that every time an update happens, they will do it at both repos or how will the workflow work like?

@0rlych1kk4

Copy link
Copy Markdown
Contributor Author

I have a question @0rlych1kk4 : there seems to be two repos in the QR-UOV workflow, round3 and round3-liboqs, with both of them holding implementation code. Does that mean that every time an update happens, they will do it at both repos or how will the workflow work like?

Thanks for raising this, @RodriM11 . My understanding from the discussion with the QR-UOV team is that qruov/round3 serves as the NIST Round 3 submission/reference repository, while qruov/round3-liboqs is intended for liboqs-specific integration and maintenance. The intention is not necessarily to duplicate every update across both repositories. Integration-specific changes can be maintained in round3-liboqs, while changes relevant to the reference implementation would need to be coordinated with the QR-UOV team.

I would defer to the QR-UOV maintainers to confirm the long-term synchronization policy between these repositories.
For this PR, the goal is to have liboqs track the official integration repository rather than my personal fork, while preserving the existing imported implementation.

@@ -0,0 +1,1316 @@
diff --git a/integration/liboqs/META_Common.yml b/integration/liboqs/META_Common.yml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this patch added? What's the reason this doesn't move upstream too? Otherwise it's becoming a maintenance burden here...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for raising this. I agree that maintaining a large compatibility patch within liboqs is not ideal.
The patch was introduced to preserve the existing liboqs-imported QR-UOV implementation while switching the importer from my previous fork to the official qruov/round3-liboqs repository. It bridges the differences between the official integration revision and the common-AES and signature-wrapper changes already present in liboqs, without changing the currently imported implementation.

However, I agree with your maintenance concern. Given that round3-liboqs is intended to host liboqs integration changes, I think the better long-term approach is to move the applicable changes upstream and keep only any genuinely liboqs-specific adaptation in the importer.
I'll review how the patch can be reduced and coordinate any necessary upstream changes with the QR-UOV team before updating this PR.

Thank you for pointing this out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you again for highlighting the downstream maintenance concern. I've prepared the applicable common-AES backend and signature-wrapper changes upstream in QR-UOV PR #5:
qruov/round3-liboqs#5

Using this upstream-aligned source, I was able to regenerate liboqs locally without the large compatibility patch. The regenerated implementation also passed ARM64 build, signature verification, and reference KAT checks for the tested AES and SHAKE variants.
The upstream PR is currently a draft while the remaining validation and QR-UOV team review are pending.
Once the changes are accepted upstream and the regenerated import is verified, I'll update this liboqs PR to reference the official revision and remove the compatibility patch if it is no longer needed.

@RodriM11

RodriM11 commented Nov 9, 2026

Copy link
Copy Markdown
Member

My understanding from the discussion with the QR-UOV team is that qruov/round3 serves as the NIST Round 3 submission/reference repository, while qruov/round3-liboqs is intended for liboqs-specific integration and maintenance

But, when looking at that repo, it does not hold only the integration files, it holds all the round 3 files plus the liboqs integration ones. @qruov could you confirm how the integration is conceived on your side? Just to know

@0rlych1kk4

Copy link
Copy Markdown
Contributor Author

My understanding from the discussion with the QR-UOV team is that qruov/round3 serves as the NIST Round 3 submission/reference repository, while qruov/round3-liboqs is intended for liboqs-specific integration and maintenance

But, when looking at that repo, it does not hold only the integration files, it holds all the round 3 files plus the liboqs integration ones. @qruov could you confirm how the integration is conceived on your side? Just to know

Hi @RodriM11, Thank you for raising this question.
I received clarification from Shingo Orihara of the QR-UOV team on November 5 regarding the intended repository structure.
The team's approach is to preserve the NIST Round 3 reference implementation in qruov/round3, generally without modifications, while qruov/round3-liboqs is intended to incorporate changes necessary for liboqs integration.
The latter therefore contains the Round 3 implementation alongside the liboqs-specific integration files, rather than only the integration files.
Shingo also explained that proposed changes beyond those required for liboqs integration would be evaluated by the QR-UOV team before incorporation.
Based on this clarification, I am working toward moving the applicable common-AES and signature-wrapper adaptations into round3-liboqs to reduce the compatibility patch maintained by liboqs.

Thank you.

@RodriM11

Copy link
Copy Markdown
Member

The latter therefore contains the Round 3 implementation alongside the liboqs-specific integration files, rather than only the integration files.

So I understand then that yes, every time an update happens, they will do it at both repos, correct?

@0rlych1kk4

Copy link
Copy Markdown
Contributor Author

The latter therefore contains the Round 3 implementation alongside the liboqs-specific integration files, rather than only the integration files.

So I understand then that yes, every time an update happens, they will do it at both repos, correct?

Hi @RodriM11, Not necessarily. Based on the clarification I received from Shingo Orihara on November 5, the two repositories have different maintenance policies.
qruov/round3 is intended to preserve the NIST Round 3 reference implementation and generally does not accept modifications.
qruov/round3-liboqs contains the Round 3 implementation together with the liboqs-specific integration files, and is intended to incorporate changes necessary for liboqs integration.

My understanding is therefore that updates are not automatically applied to both repositories. Changes specific to liboqs integration can be maintained in round3-liboqs, while other changes are subject to the QR-UOV team's evaluation. I've also opened a draft upstream PR for the common-AES and signature-wrapper alignment:

qruov/round3-liboqs#5

I hope this clarifies the distinction. The QR-UOV team can confirm the detailed synchronization policy if needed.

Signed-off-by: 0rlych1kk4 <orlychikka@gmail.com>
Signed-off-by: 0rlych1kk4 <orlychikka@gmail.com>
@0rlych1kk4
0rlych1kk4 force-pushed the fix/qruov-official-upstream-2637-clean branch from f04190c to fda6a77 Compare November 18, 2026 12:59
@0rlych1kk4

Copy link
Copy Markdown
Contributor Author

Hi @baentsch If you have availability, may I kindly request your technical review of this PR, particularly the QR-UOV official-upstream integration and compatibility changes? The upstream merge conflicts have been resolved, and all CI checks are now complete and passing, including DCO, upstream importer verification, and documentation checks.
I would appreciate any guidance or feedback you may have. Thank you very much for your time and consideration.

This branch has not been deployed

No deployments
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.

QR-UOV: track official upstream instead of personal fork

5 participants