-
Notifications
You must be signed in to change notification settings - Fork 103
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
When verifying entries in the OBJ database, check OIDs rather than names #629
base: main
Are you sure you want to change the base?
Conversation
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
Thanks for the proposal @levitte -- but this was the first thing I tried. The real problem is the naming throughout the code and the different forms it needs to take when used in different contexts. This PR as-is allows the provider to register -- but not to work (try running "scripts/runtest.sh"). I clearly never understood the intricacies or which problems names with "-" introduce and in which places this needs to be dealt with -- and it is necessary to do this as there is the desire to use both the standards text naming ("ML-DSA-44") and the current naming "mldsa44" (which still doesn't work with this PR as the algorithm registration is wrong in every spot it occurs, e.g. oqs-provider/oqsprov/oqsprov_capabilities.c Lines 707 to 711 in afc1de2
oqs-provider/oqsprov/oqsprov.c Lines 941 to 949 in afc1de2
So again, I'd be grateful if you could take a look at #625 and provide feedback (or better suggestions) there. |
Yeah, I'm noticing more things lacking. |
I do not think this is worth spending efforts. If it could come "for free" - then sure, why not. Otherwise - there are standard names, and it should be easy enough to change "mldsa44" to "ML-DSA-44" in the code or shellscript. |
Yeah I see now... you've hinged other stuff on the OBJ database, such as: oqs-provider/oqsprov/oqs_encode_key2any.c Line 1393 in afc1de2
That's essentially a mistake, exactly because there's too much risk of competition. And quite frankly, this example shouldn't really need to rely on the OBJ database at all, considering that you (should) have all the necessery data within the provider itself. |
That's what this array means to hold. And I agree, the sn2nid function indeed would be better replaced by a lookup to the internal |
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 #623