Timo Poppinga has started a discussion on the PHP internals list about improving support for OpenSSL provider-based asymmetric algorithms in ext/openssl, with a focus on post-quantum cryptography. The proposal relates to existing php-src issues 22862 and 23421.
Recent OpenSSL versions ship standardized PQC algorithms such as ML-KEM, ML-DSA and SLH-DSA through the EVP/provider APIs. PHP's OpenSSL extension currently exposes asymmetric crypto through a fixed set of OPENSSL_KEYTYPE_* constants and offers no access to generic KEM encapsulation and decapsulation.
Instead of adding constants and APIs per algorithm, the RFC would expose the provider model generically: key generation by OpenSSL algorithm name, provider-backed algorithms without a dedicated keytype constant, generic KEM operations, and signatures via algorithms like ML-DSA and SLH-DSA through existing signing APIs where possible. Future algorithms and third-party providers would then work through the same API.
Poppinga says the implementation effort should be contained since OpenSSL provides the primitives, but flags key handling, provider compatibility, error handling and OpenSSL version support as delicate areas. He does not plan to write the C code himself, citing rusty C skills and the security-sensitive nature of the work, and asks an ext/openssl maintainer to implement or closely review it. He will handle the RFC text, API design, documentation and tests.
Open question for feedback: whether provider-based key support and the KEM API belong in one RFC or two separate proposals.




Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.