-
Notifications
You must be signed in to change notification settings - Fork 102
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
Current "main" fails to work with OpenSSL-3.5.0-dev #623
Comments
Thanks for the report @mouse07410 - this is expected, though as per #617 and #621. fyi, my preference for resolving that is after standardized PQC has landed in |
Thank you - somehow I missed that the OpenSSL default implementation is already merged. But this brings two questions: A. Is there any relation between this provider implementation and the code in OpenSSL that implements PQ algorithms? |
The code is not yet merged to main, but the names and OIDs (the former different from what oqsprovider had been using) did get merged already, causing these problems.
None whatsoever (background at openssl/project#431).
OpenSSL (now) makes available standard PQ algorithms, while oqsprovider makes available algorithms "in standardization" (new algorithm proposals, different hybridization schemes) -- all with the goal to allow "research and experimentation" (aka, allowing to check their value "in the real world"). And until the time someone makes available an externally loadable provider with the
If one is only interested in standardized PQC that's a very good question and the reason for #610. |
Thank you very much for a great clear explanation! Re. #610 - I concur that there's no real benefit in Yes, it looks like for OpenSSL versions < 3.5, My remaining question - is there a way to get PQ algorithms working with the current OpenSSL-3.5.0-dev? Or my only (practical) option is to wait until the rest of the PQ code is merged there into the |
Anything else would mean quite a bit probably "lost work" for me (assuming no one else helps). What's your rationale for using |
Making sure my stuff is likely to keep working when 3.5.x gets released, occasionally experiments.
Next couple of days? None whatsoever. Next week or two - tolerable as well, no problem . Somewhat longer - more concerns. |
Keeping fingers crossed that everything settles in that time frame -- or I'm finding motivation to give this a try before. I'll hopefully be able to contain your concerns, but just fyi, I'm not employed or remunerated in any shape or form for any of this (and our weather is splendid in the coming days, so I'll probably prefer traveling the Great Outdoors right now), i.e., please allow some leeway -- or send a PR yourself if you find the time. The core problem is probably just a few lines of code that I did wrong a few years ago :-} |
As heads-up to @mouse07410 : This looks like it'll take more than a few days. The easiest approach to resolve this (and the one I prefer for several different reasons by now) seems to be to remove support for ML-DSA and ML-KEM from the default build: Would that help you as a "quick fix"? |
Alas, no. Because ML-KEM-1024 and ML-DSA-87 are the algorithms that I need. The current situation is bad, because there is no working ML-DSA and ML-KEM for OpenSSL-3.5.0-dev. OpenSSL (very unwisely, IMHO) decided to "occupy" PQ OIDs, thus preventing other providers like A reasonable approach for OpenSSL would be to merge either both (PQ provider support and registering OIDs) or neither. Alas, OpenSSL maintainers did not follow it. @levitte what's your take here? |
It is not unwise to register standard OIDs in the base code - this is in fact our normal practise. We need to handle them in many contexts. The ML-KEM and ML-DSA code are in feature branches I don't think oqs_provider changes before that Developers are encouraged to check the feature branches out as provide feedback. You can use the ML-KEM feature branch and have interoperable |
Registering is not unwise - but its timing is. Nobody sane (that I know of) would register something he's not ready to support yet - especially when that something is currently supported by somebody else.
What do you expect an external provider to do if it notices that an algorithm is already registered? Regardless of the answer to the above - the main problem here and now is that those "major algorithms" are registered but not provided.
And I say that it was a very poor decision to register an algorithm you don't support (yet). Common sense suggests that you register when you're ready to support, not before.
Communicating a "non-smart" decision does not make it any better.
My use case requires both ML-KEM and ML-DSA.
Here's my feedback. Back out the registration part (commit d31fce1972f), split it into pieces according to algorithms they support, and incorporate into ML-KEM, ML-DSA, etc. branches correspondingly. So that when, e.g., you eventually merge ML-KEM branch, it will include both registration and the actual algorithm support. Summary: the only reasonable approach in this case at this time is to move the registration to the corresponding feature branches that provide the algorithms to be registered. |
This is a problem because the OBJ database is limited. This issue could have happened if another external provider had started registering its own (conflicting) names for the same OIDs. Since the very start of designing providers, I saw this problem coming, and argued that we shouldn't have providers depend on the central OBJ database, and that its use should be avoided as much as possible. Unfortunately, OpenSSL doesn't have quite all the replacement parts. However! The most dependable identity being the OID rather than the name, and that the conflict is on the names, it would seem that if the oqs provider would use the OIDs (in canonical numeric string form, which is available) rather the names to look up entries in the OBJ database, I think it would be rather simple to make things work with minimal effort. |
(there's a reason why the |
Other providers, or even the OpenSSL libraries, may register conflicting names at any time, for the same OIDs. This is unfortunate, but not an essential problem. Since the OQS provider has its own registry with both OIDs and names, and really just want to know the central NIDs, the OQS provider might as well do lookups by OID, since that's the most central ID. Fixes open-quantum-safe#623
Understood. Though my venting is because the OpenSSL maintainers' decision "knowingly" broke running code, which was unnecessary.
And right you were. :-(
Thank you for the suggestion! @baentsch are you willing to try? Because it seems that eventually this would have to be done, no matter what. |
To summarize the problem here:
RemedyOpenSSL needs to delay "claiming support" until it is ready to merge the actual implementation. Reason: even if the provider "recognized" that somebody else laid a claim on those, and did not register, e.g., ML-KEM - a user who needs ML-KEM, will not get it. Comments? |
I don't quite agree: OpenSSL registered standarized IDs and I see this as a temporary problem and one that will be fixed in due course: For now, Thus, IMO this is more a problem of my "laziness" (not being willing to work for free more often than seems necessary) and/or proof of the lack of a community supporting |
OK, no argument here. But please, would you mind explaining how And how should a user invoke ML-KEM in this case (assuming
Yes, I'm sure of that. E.g., when
No problem, and no apologies are necessary. But I'd like to see the answer to my question at the head of this post: how should an external provider behave when some of his algorithms are claimed by somebody else? |
I'd say, as before (using it's "convenient name", e.g., mlkem768 -- but additionally then, the "standardized name" ML-KEM-768) -- please see/comment on the design proposal.
That seems like a very sensible question to be asked and answered in the openssl discussion board for "posterity" (and/or maybe trigger a documentation update for provider authors). My opinion is that in general a provider should provide at the very least a warning message, but not cease to operate (with/for other algorithms). Anything else is up to the provider's intentions: For But thinking this through, this triggers an entirely new question in my mind: Might the provider be enticed to use another provider's functionality, e.g., to provide additional features (other experimental hybrid and composites come to mind in this context)? Created #631 to track/discuss. |
No - OpenSSL does not claim to support implementations of the PQ algorithms. OpenSSL is simply aware of the object identifiers - that is all. In the feature branches we have implementations which will be merged pre-alpha release (assuming they pass the review criteria for inclusion). The oqs_provider can be changed to allow for the object identifier table being aware of the object mappings or it can remove its clashing entries. Either approach works. Or the oqs_provider can work off any of the earlier releases of OpenSSL. Once the feature branches make it back into the main tree, there will be multiple implementations (if you have the default or fips providers and the oqs_provider) and you can select which provider is used in property query strings (by indicating a preference for a particular provider). The concept of multiple implementations existing for an algorithm is part of the core concept supported by the provider interface. Thanks, |
Describe the bug
To Reproduce
Steps to reproduce the behavior:
oqsprovider.dylib
to${HOME}/openssl-3/lib/ossl-modules/
and observe that OpenSSL can't register this provider.Expected behavior
All tests pass, OpenSSL working fine with OQS provider - as it used to until last week or so.
Environment (please complete the following information):
main
)main
)main
)Please run the following commands to obtain the version information:
openssl version
openssl list -providers
Additional context
Building script:
The text was updated successfully, but these errors were encountered: