Repository navigation
feat(xtest): adds hybrid PQ/T KEM round trip testing #427
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
Changes from 13 commits
fdf6884
a931d69
8db1044
5df25be
6b276d3
19bd223
521aac1
5958b3f
ce3c645
b0298b5
4bfdd6e
603bf9f
0543036
0ebeb86
c16822e
5b4deef
7d73b6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,9 @@ | |
| "mechanism-rsa-4096", | ||
| # Support for encrypting with EC curves secp384r1 and secp521r1 managed keys. | ||
| "mechanism-ec-curves-384-521", | ||
| # Support for encrypting with X-Wing hybrid post-quantum/traditional KEM. | ||
| "mechanism-xwing", | ||
| "mechanism-secpmlkem", | ||
| "ns_grants", | ||
| "obligations", | ||
| ] | ||
|
|
@@ -127,8 +130,21 @@ def __init__(self, **kwargs: dict[str, Any]): | |
| if self.semver >= (0, 13, 0): | ||
| self.features.add("mechanism-ec-curves-384-521") | ||
|
|
||
| # X-Wing hybrid PQ/T KEM support (ML-KEM-768 + X25519) | ||
| if self.semver >= (0, 14, 0): | ||
| self.features.add("mechanism-xwing") | ||
| self.features.add("mechanism-secpmlkem") | ||
|
|
||
| print(f"PLATFORM_VERSION '{v}' supports [{', '.join(self.features)}]") | ||
|
|
||
| def require(self, *features: feature_type): | ||
| """Skip the current test if any of the given features are unsupported.""" | ||
| for feature in features: | ||
| if feature not in self.features: | ||
| pytest.skip( | ||
| f"platform service {self.version} doesn't yet support [{feature}]" | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. junit used to call this method |
||
|
|
||
| def skip_if_unsupported(self, *features: feature_type): | ||
| """Skip the current test if any of the given features are unsupported.""" | ||
| missing = [f for f in features if f not in self.features] | ||
|
|
@@ -506,6 +522,18 @@ def all_versions_of(sdk: sdk_type) -> list[SDK]: | |
| return versions | ||
|
|
||
|
|
||
| def parse_sdk_spec(spec: str) -> list[SDK]: | ||
| """Parse an SDK spec like 'go' or 'go:gemini' into a list of SDK objects. | ||
|
|
||
| Bare names (e.g., 'go') return all discovered versions. | ||
| Qualified names (e.g., 'go:gemini') return a single specific version. | ||
| """ | ||
| if ":" in spec: | ||
| sdk_name, version = spec.split(":", 1) | ||
| return [SDK(sdk_name, version)] | ||
| return all_versions_of(spec) | ||
|
|
||
|
|
||
| def skip_if_unsupported(sdk: SDK, *features: feature_type): | ||
| pfs = get_platform_features() | ||
| pfs.skip_if_unsupported(*features) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.