Skip to content

refactor(qruov): deduplicate signature wrappers across implementations - #2643

Open
0rlych1kk4 wants to merge 1 commit into
open-quantum-safe:mainfrom
0rlych1kk4:refactor/qruov-signature-wrapper-dedup
Open

0rlych1kk4 wants to merge 1 commit into
open-quantum-safe:mainfrom
0rlych1kk4:refactor/qruov-signature-wrapper-dedup

Conversation

@0rlych1kk4

Copy link
Copy Markdown
Contributor

Summary

Fixes #2638.

Consolidates the 90 identical QR-UOV signature.c wrappers into a single shared source file while preserving per-implementation compilation and symbol namespacing.

The refactor uses the existing include_only: true common-dependency mechanism in the upstream importer. Each of the 90 implementation targets continues to compile the shared source with its own configuration and compile flags.

No changes were made to the signature wrapper's contents or the cryptographic algorithm.

Changes

  • Reduced 90 identical signature.c files to one shared source at src/sig/qruov/qruov_qruov_common/signature.c.
  • Removed the original per-implementation wrapper paths (Git represents this as 89 deletions and one identical rename).
  • Preserved all 90 implementation-specific CMake source references.
  • Updated the QR-UOV upstream source revision to f296750f4793b8350bd2352ded890e9a811be42a.
  • Regenerated the associated QR-UOV sources and documentation.

The shared wrapper's SHA-256 remains identical to the original copies.

Validation

Platform: macOS ARM64, AppleClang 21.0.0

  • Upstream importer verification: 395/395 schemes matched.
  • Full liboqs CMake/Ninja build: passed.
  • Signature generation and verification: 6/6 tests passed, covering AES and SHAKE variants across the 1q, 3q, and 5q parameter families.
  • Known-answer tests: 30/30 QR-UOV KATs passed against the existing expected hashes in tests/KATs/sig/kats.json.
  • Verified 60 namespaced reference-implementation signing and verification symbols.
  • Git whitespace validation: passed.

No new test was added because this is a source deduplication rather than a new feature. The existing signature tests and registered KAT tests cover the refactored functionality.

The x86-64 optimized and AVX2 implementations were not executed locally; those configurations require CI validation.

Upstream dependency

The corresponding QR-UOV integration metadata change is available at:

0rlych1kk4/round3@f296750

This change is independent of the QR-UOV AES backend consolidation in #2642.

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?

Neither applies. The refactor preserves the existing algorithm implementations, algorithm names, public API and registered KAT values.

Generative AI disclosure

Generative AI assistance was used to draft and refine documentation. All technical changes and validation results were reviewed and verified by the contributor before submission.

Signed-off-by: 0rlych1kk4 <orlychikka@gmail.com>
@0rlych1kk4
0rlych1kk4 force-pushed the refactor/qruov-signature-wrapper-dedup branch from fde2886 to bdae4a9 Compare October 23, 2026 06:43
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 80.955% (-0.08%) from 81.035% — 0rlych1kk4:refactor/qruov-signature-wrapper-dedup into open-quantum-safe:main

@0rlych1kk4

Copy link
Copy Markdown
Contributor Author

The CI is green on the signed-off commit bdae4a937 (73 successful checks, including DCO).

Local validation also completed:

  • Importer verification: 395/395 schemes matched
  • macOS ARM64 build: passed
  • QR-UOV signature tests: 6/6 passed
  • QR-UOV KATs: 30/30 passed

The shared wrapper is byte-identical to the original copies, with implementation-specific compilation preserved.

Ready for review. Thanks.

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: investigate deduplicating variant signature wrappers

2 participants