Skip to content

Use OQS_SIG_supports_ctx_str for context support detection and fix CI build #111

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

M-AlNoaimi
Copy link

Warning

This depends on the PR over at liboqs as it introduces this feature.

This PR updates the liboqs-python wrapper to use the new C API function OQS_SIG_supports_ctx_str for better detection of context string support in signature algorithms. I took this on after noticing that the build CI was failing due to the unit tests failing to skip specific incompatible steps.

I was successfully able to get the tests working (3.9-3.13), as well as testing it with act, would be good to see if this works on GH's Runners.

The following files have been added:
- oqs/py.typed: Marker file for PEP 561 compliance.
- oqs/__init__.pyi: Stub for the main package entry point.
- oqs/oqs.pyi: Stubs for core OQS functionalities (KeyEncapsulation,
  Signature, related functions, and exceptions).
- oqs/rand.pyi: Stubs for random number generation functions.

Signed-off-by: M-AlNoaimi <26318936+M-AlNoaimi@users.noreply.github.com>
… attributes & Removed init stub to be more flexible (when making edits directly down the line).

Signed-off-by: M-AlNoaimi <26318936+M-AlNoaimi@users.noreply.github.com>
Signed-off-by: M-AlNoaimi <26318936+M-AlNoaimi@users.noreply.github.com>
Copy link
Member

@SWilson4 SWilson4 left a comment

Choose a reason for hiding this comment

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

LGTM, but I'll wait for open-quantum-safe/liboqs#2142 to land before approving.

@M-AlNoaimi
Copy link
Author

Hey @SWilson4 could we run the CI on this PR again to see if it works out since open-quantum-safe/liboqs#2142 is now merged?

@dstebila
Copy link
Member

dstebila commented Jun 3, 2025

Hey @SWilson4 could we run the CI on this PR again to see if it works out since open-quantum-safe/liboqs#2142 is now merged?

I've triggered a re-run of the jobs.

@M-AlNoaimi
Copy link
Author

Hey @SWilson4 could we run the CI on this PR again to see if it works out since open-quantum-safe/liboqs#2142 is now merged?

I've triggered a re-run of the jobs.

It looks like the simplified jobs are still failing due to how liboqs-python determines which version of liboqs to install. This might become a recurring issue if the wrapper doesn't consistently install either the HEAD, or at least a recent HEAD with passing tests (or equivalent).

Should liboqs-python be attempting to match the version it retrieves based on the wrapper's version? @dstebila This would be good in some cases like ensuring things don't break, but it would mean that liboqs would probably need more frequent releases, or taking extra care when there are API changes merged (open-quantum-safe/liboqs#2142)

@dstebila
Copy link
Member

dstebila commented Jun 9, 2025

Should liboqs-python be attempting to match the version it retrieves based on the wrapper's version? @dstebila This would be good in some cases like ensuring things don't break, but it would mean that liboqs would probably need more frequent releases, or taking extra care when there are API changes merged (open-quantum-safe/liboqs#2142)

@vsoftco may have thought about this question.

@M-AlNoaimi
Copy link
Author

@vsoftco may have thought about this question.

Hi, @dstebila / @SWilson4 any update on this PR? It's been quite a while now since v0.14.0 was released, kindly advise 😀

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.

3 participants