← Back to DAGDA | Support | Source: https://github.com/open-quantum-safe/oqs-provider
Skip to content

About

OpenSSL 3+ provider containing post-quantum algorithms

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

521 stars

Watchers

26 watching

Forks

Repository files navigation

GitHub actions GitHub actions GitHub actions

oqsprovider - Open Quantum Safe provider for OpenSSL (>=v3)

Purpose

This repository contains code to enable quantum-safe cryptography (QSC) in a standard OpenSSL (>v1.1) distribution by way of implementing a single shared library, the OQS provider.

Status

Currently this provider fully enables quantum-safe cryptography for KEM key establishment in TLS1.3 including management of such keys via the OpenSSL provider interface and hybrid KEM schemes. Also, QSC signatures including CMS and CMP functionality are available via the OpenSSL EVP interface. Key persistence is provided via the encode/decode mechanism, X.509 data structures, and PKCS#12 for bundling a private key with its corresponding X.509 certificate. QSC signatures can also be used in TLS1.3.

The standards implemented are documented in the separate file STANDARDS.md.

Algorithms

This implementation makes available the following quantum safe algorithms:

KEM algorithms

  • BIKE:bikel1, p256_bikel1, x25519_bikel1, bikel3, p384_bikel3, x448_bikel3, bikel5, p521_bikel5
  • FrodoKEM:efrodo640aes, p256_efrodo640aes, x25519_efrodo640aes, efrodo640shake, p256_efrodo640shake, x25519_efrodo640shake, efrodo976aes, p384_efrodo976aes, x448_efrodo976aes, efrodo976shake, p384_efrodo976shake, x448_efrodo976shake, efrodo1344aes, p521_efrodo1344aes, efrodo1344shake, p521_efrodo1344shake, frodo640aes, p256_frodo640aes, x25519_frodo640aes, frodo640shake, p256_frodo640shake, x25519_frodo640shake, frodo976aes, p384_frodo976aes, x448_frodo976aes, frodo976shake, p384_frodo976shake, x448_frodo976shake, frodo1344aes, p521_frodo1344aes, frodo1344shake, p521_frodo1344shake
  • HQC:hqc1, p256_hqc1, x25519_hqc1, hqc3, p384_hqc3, x448_hqc3, hqc5, p521_hqc5
  • ML-KEM:mlkem512, SecP256r1MLKEM512, x25519_mlkem512, bp256_mlkem512, mlkem768, p384_mlkem768, x448_mlkem768, bp384_mlkem768, X25519MLKEM768, SecP256r1MLKEM768, mlkem1024, p521_mlkem1024, SecP384r1MLKEM1024, bp512_mlkem1024

Signature algorithms

  • ML-DSA:mldsa44, p256_mldsa44, rsa3072_mldsa44, mldsa65, p384_mldsa65, mldsa87, p521_mldsa87
  • Falcon:falcon512, p256_falcon512, rsa3072_falcon512, falconpadded512, p256_falconpadded512, rsa3072_falconpadded512, falcon1024, p521_falcon1024, falconpadded1024, p521_falconpadded1024
  • MAYO:mayo1, p256_mayo1, mayo2, p256_mayo2, mayo3, p384_mayo3, mayo5, p521_mayo5
  • CROSS:crossrsdp128balanced, crossrsdp128fast*, crossrsdp128small*, crossrsdp192balanced*, crossrsdp192fast*, crossrsdp192small*, crossrsdp256small**, crossrsdpg128balanced*, crossrsdpg128fast*, crossrsdpg128small*, crossrsdpg192balanced*, crossrsdpg192fast*, crossrsdpg192small*, crossrsdpg256balanced*, crossrsdpg256fast*, crossrsdpg256small*
  • UOV:ov_is**, p256_ov_is**, ov_ip**, p256_ov_ip**, ov_iii**, p384_ov_iii**, ov_v**, p521_ov_v**, ov_is_pkc**, p256_ov_is_pkc**, ov_ip_pkc, p256_ov_ip_pkc, ov_iii_pkc**, p384_ov_iii_pkc**, ov_v_pkc**, p521_ov_v_pkc**, ov_is_pkc_skc**, p256_ov_is_pkc_skc**, ov_ip_pkc_skc, p256_ov_ip_pkc_skc, ov_iii_pkc_skc**, p384_ov_iii_pkc_skc**, ov_v_pkc_skc**, p521_ov_v_pkc_skc**
  • SNOVA:snova1k, p256_snova1k, snova1b, p256_snova1b, snova1s, p256_snova1s, snova3k, p384_snova3k, snova3b, p384_snova3b, snova3s, p384_snova3s, snova5k, p521_snova5k, snova5b, p521_snova5b, snova5s, p521_snova5s, snova1ka*, p256_snova1ka*, snova1ba*, p256_snova1ba*, snova1sa*, p256_snova1sa*, snova3ka*, p384_snova3ka*, snova3ba*, p384_snova3ba*, snova3sa*, p384_snova3sa*, snova5ka*, p521_snova5ka*, snova5ba*, p521_snova5ba*, snova5sa*, p521_snova5sa*
  • SLH-DSA:slhdsasha2128s, slhdsasha2128f, slhdsasha2192s, slhdsasha2192f, slhdsasha2256s, slhdsasha2256f, slhdsashake128s, slhdsashake128f, slhdsashake192s, slhdsashake192f, slhdsashake256s, slhdsashake256f
  • MQOM:mqom3cat1gf16fastct, p256_mqom3cat1gf16fastct, mqom3cat1gf16fastot*, p256_mqom3cat1gf16fastot*, mqom3cat1gf16shortct*, p256_mqom3cat1gf16shortct*, mqom3cat1gf16shortot*, p256_mqom3cat1gf16shortot*, mqom3cat1gf2shorterct*, p256_mqom3cat1gf2shorterct*, mqom3cat1gf2shorterot*, p256_mqom3cat1gf2shorterot*, mqom3cat3gf16fastct, p384_mqom3cat3gf16fastct, mqom3cat3gf16fastot*, p384_mqom3cat3gf16fastot*, mqom3cat3gf16shortct*, p384_mqom3cat3gf16shortct*, mqom3cat3gf16shortot*, p384_mqom3cat3gf16shortot*, mqom3cat3gf2shorterct*, p384_mqom3cat3gf2shorterct*, mqom3cat3gf2shorterot*, p384_mqom3cat3gf2shorterot*, mqom3cat5gf16fastct, p521_mqom3cat5gf16fastct, mqom3cat5gf16fastot*, p521_mqom3cat5gf16fastot*, mqom3cat5gf16shortct*, p521_mqom3cat5gf16shortct*, mqom3cat5gf16shortot*, p521_mqom3cat5gf16shortot*, mqom3cat5gf2shorterct*, p521_mqom3cat5gf2shorterct*, mqom3cat5gf2shorterot*, p521_mqom3cat5gf2shorterot*
  • FAEST:faest128s*, p256_faest128s*, faest128f, p256_faest128f, faest192s*, p384_faest192s*, faest192f, p384_faest192f, faest256s*, p521_faest256s*, faest256f, p521_faest256f, faestem128s*, p256_faestem128s*, faestem128f*, p256_faestem128f*, faestem192s*, p384_faestem192s*, faestem192f*, p384_faestem192f*, faestem256s*, p521_faestem256s*, faestem256f*, p521_faestem256f*
  • SDitH:sdith3l1gf2short*, p256_sdith3l1gf2short*, sdith3l1gf2fast, p256_sdith3l1gf2fast, sdith3l3gf2short*, p384_sdith3l3gf2short*, sdith3l3gf2fast, p384_sdith3l3gf2fast, sdith3l5gf2short*, p521_sdith3l5gf2short*, sdith3l5gf2fast, p521_sdith3l5gf2fast, sdith3l1gf2shortcipherpow*, p256_sdith3l1gf2shortcipherpow*, sdith3l1gf2fastcipherpow*, p256_sdith3l1gf2fastcipherpow*, sdith3l3gf2shortcipherpow*, p384_sdith3l3gf2shortcipherpow*, sdith3l3gf2fastcipherpow*, p384_sdith3l3gf2fastcipherpow*, sdith3l5gf2shortcipherpow*, p521_sdith3l5gf2shortcipherpow*, sdith3l5gf2fastcipherpow*, p521_sdith3l5gf2fastcipherpow*
  • SQIsign:sqisignp3243, p256_sqisignp3243, sqisignp50027, p384_sqisignp50027, sqisignp66417, p521_sqisignp66417
  • QR-UOV:qruov1q127l3shake*, p256_qruov1q127l3shake*, qruov1q127l3aes*, p256_qruov1q127l3aes*, qruov1q31l3shake*, p256_qruov1q31l3shake*, qruov1q31l3aes*, p256_qruov1q31l3aes*, qruov1q31l10shake, p256_qruov1q31l10shake, qruov1q31l10aes*, p256_qruov1q31l10aes*, qruov1q7l10shake*, p256_qruov1q7l10shake*, qruov1q7l10aes*, p256_qruov1q7l10aes*, qruov3q127l3shake*, p384_qruov3q127l3shake*, qruov3q127l3aes*, p384_qruov3q127l3aes*, qruov3q31l3shake*, p384_qruov3q31l3shake*, qruov3q31l3aes*, p384_qruov3q31l3aes*, qruov3q31l10shake, p384_qruov3q31l10shake, qruov3q31l10aes*, p384_qruov3q31l10aes*, qruov3q7l10shake*, p384_qruov3q7l10shake*, qruov3q7l10aes*, p384_qruov3q7l10aes*, qruov5q127l3shake*, p521_qruov5q127l3shake*, qruov5q127l3aes*, p521_qruov5q127l3aes*, qruov5q31l3shake*, p521_qruov5q31l3shake*, qruov5q31l3aes*, p521_qruov5q31l3aes*, qruov5q31l10shake, p521_qruov5q31l10shake, qruov5q31l10aes*, p521_qruov5q31l10aes*, qruov5q7l10shake*, p521_qruov5q7l10shake*, qruov5q7l10aes*, p521_qruov5q7l10aes*, qruov1q127l10shake*, p256_qruov1q127l10shake*, qruov1q127l10aes*, p256_qruov1q127l10aes*, qruov3q127l10shake*, p384_qruov3q127l10shake*, qruov3q127l10aes*, p384_qruov3q127l10aes*, qruov5q127l10shake*, p521_qruov5q127l10shake*, qruov5q127l10aes*, p521_qruov5q127l10aes*

As the underlying liboqs at build time may be configured to not enable all algorithms, and the underlying openssl installation at runtime may deliver some algorithms already it is advisable to check the possible subset of algorithms actually enabled via the standard commands, i.e., openssl list -signature-algorithms -provider oqsprovider and openssl list -kem-algorithms -provider oqsprovider.

In addition, the above algorithms that ARE NOT denoted with either "*" or "**" ARE enabled for TLS operations. The above algorithms that ARE denoted with "*" ARE NOT enabled for TLS operations; this can be changed by modifying the "enabled" flags and setting the code points to 'auto' in the main algorithm configuration file. The above algorithms that ARE denoted with "**" ARE NOT enabled; this cannot be changed as these algorithms are incompatible with with RFC 8446.

In order to support parallel use of classic and quantum-safe cryptography this provider also provides different hybrid algorithms, combining classic and quantum-safe methods. There are two types of combinations: The Hybrids are listed above with a prefix denoting a classic algorithm, e.g., for elliptic curve: "p256_".

A full list of algorithms, their interoperability code points and OIDs as well as a method to dynamically adapt them, e.g., for interoperability testing are documented in ALGORITHMS.md.

Using with OpenSSL >= 3.5

Starting with version 3.5, OpenSSL natively implements a growing set of standardized PQ algorithms (e.g., ML-KEM, ML-DSA and SLH-DSA) in its default provider. Because these implementations are more advanced and better maintained than the equivalent facilities in oqsprovider, the following rule applies:

A PQ algorithm is not available via oqsprovider on OpenSSL >= 3.5 if OpenSSL's own default provider already implements that exact algorithm.

The rule keys on the algorithm as a whole, not on its components. It applies to the standardized pure algorithms (ML-KEM, ML-DSA and SLH-DSA) and to any standardized hybrid algorithm that OpenSSL ships natively (currently the hybrid KEMs X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024). A hybrid remains available through oqsprovider as long as OpenSSL does not implement that specific combination, even when one of its components is standardized: for example, x25519_mlkem512 and p256_mlkem512 stay available even though OpenSSL provides their ML-KEM-512 component. And for the avoidance of doubt, the cryptographic logic for these standardized PQ algorithms in the hybrid case is delivered by liboqs, not by OpenSSL's default provider.

The oqsprovider implementations of these disabled standardized PQ algorithms are therefore only active in OpenSSL versions < 3.5. These versions are no longer supported by the OpenSSL project, and accordingly oqsprovider is no longer tested with them (see Note on OpenSSL versions).

Note

SLH-DSA is available for TLS starting with OpenSSL 4.1, which implements it natively (see this commit). In OpenSSL 3.5 to 4.0, SLH-DSA cannot be used for TLS: OpenSSL disables the oqsprovider implementation but does not offer SLH-DSA for TLS itself.

Using with LibOQS 0.16.0

LibOQS version 0.16.0 includes support for both FrodoKEM variants, as specified in their submission for standardization under ISO. In said specification, the name frodokem now refers to a new variant, labeled salted, while the original specification is renamed to efrodokem, the ephemeral variant. Therefore, users must be aware that the string frodokem* will refer to different FrodoKEM variants depending upon the liboqs version employed.

Building and testing -- Quick start

All component builds and testing described in detail below can be executed by running the scripts scripts/fullbuild.sh and scripts/runtests.sh respectively (tested on Linux Ubuntu and Mint as well as MacOS).

By default, these scripts always build and test against the current OpenSSL master branch.

These scripts can be configured by setting various variables. Please note that these scripts do not install oqsprovider. This can be facilitated by running cmake --install _build (and following the activation instructions.

Building and testing

The below describes the basic build-test-install cycle using the standard cmake tooling. Platform-specific notes are available for UNIX (incl. MacOS and cygwin) and Windows.

Configuration options

All options to configure oqs-provider at build- or run-time are documented in CONFIGURE.md.

Pre-requisites

To be able to build oqsprovider, OpenSSL and liboqs need to be installed. The OpenSSL version should be one still supported by the OpenSSL project, see Note on OpenSSL versions. It's not important where they are installed, just that they are. If installed in non-standard locations, these must be provided when running cmake via the variables "OPENSSL_ROOT_DIR" and "liboqs_DIR". See CONFIGURE.md for details.

Basic steps

cmake -S . -B _build && cmake --build _build && ctest --test-dir _build && cmake --install _build

Using

Usage of oqsprovider is documented in the separate USAGE.md file.

Note on OpenSSL versions

oqsprovider originally has been designed and written to ensure building and operating on all versions of OpenSSL supporting the provider concept, i.e., all versions >= 3.0.

Independently, OpenSSL is following a support mode and published release schedule that this project also heeds. Accordingly, testing of this project on unsupported OpenSSL versions does not occur any more and we strongly discourage use of oqsprovider on such unsupported OpenSSL versions.

3.5 and greater

These versions include support for an increasing set of standardized PQC algorithms (e.g., ML-KEM, ML-DSA and SLH-DSA). Accordingly, oqsprovider can no longer succeed registering (O)IDs for these algorithms as these already exist. In addition, oqsprovider functionally (e.g., support for several key formats) and non-functionally (e.g., code quality) is not at par with the implementations for these algorithms. Therefore, as described in Using with OpenSSL >= 3.5, any algorithm whose component is standardized and implemented in OpenSSL is disabled at runtime upon detection of it being available in openssl. The same algorithms conceptually should continue to work even using the same oqsprovider binary in OpenSSL installations with a version older than 3.5 though this is no longer asserted by testing.

This limitation might be resolved by implementing #625. given sufficient interest. Contributions very welcome.

All versions

For general OpenSSL implementation limitations, e.g., regarding provider feature usage and support, see here.

A problem basically related to any TLS server installation is the observed limitation to 64 TLS signature algorithms by some TLS server implementations. Therefore, again caution is advised activating more than 64 PQ signature algorithms via the pre-build configuration facility.

General disclaimer

In general, any use of the standardized algorithm families in any openssl version via oqsprovider is strongly discouraged due to the disparities in key material representation and key generation logic that has developed since 2024.

oqsprovider is primarily meant as a vehicle to enable testing of experimental PQ crypto and has no intention of and/or commitment for duplicating the efforts going into the development of production quality PQ crypto in openssl's default provider.

Governance & Contributions

Project governance is documented in GOVERNANCE.md and contribution policy is documented in CONTRIBUTING.md.

Discussions

The policy of this project is that all discussions pertaining to changes in the functional and non-functional aspects of oqsprovider shall take place in github. References to external discussion fora are discouraged to retain the free and open flow of thoughts unencumbered by potentially differing or changing access or data retention policies by github-external chat forums.

Team

Contributors to the oqsprovider include:

  • Michael Baentsch (initial author and maintainer; responsible for all code except as listed per specific contributions below)
  • Christian Paquin (original OpenSSL111 OQS integrator)
  • Richard Levitte (OpenSSL provider wizard and initial cmake setup)
  • Basil Hess (hybrid KEM integration & pqcrystals/mayo OID management)
  • Julian Segeth (some memory management improvements)
  • Alex Zaslavsky (improvements on OpenSSL integration)
  • Will Childs-Klein (improvements on Kyber hybrid OIDs)
  • Thomas Bailleux (many build, CI and usage improvements for different platforms)
  • Felipe Ventura (experimental composite sig integration - feature removed now)
  • Iyán Méndez Veiga (PKCS#12 testing)
  • Alessandro Barenghi (CROSS OIDs)
  • Rodrigo Martín Sánchez-Ledesma (Brainpool hybrids & OSSL_LIB_CTX use in hybrids)

History

Documentation on current and past releases ("code history") is documented in the separate file RELEASE.md.

Acknowledgments

oqsprovider came into existence as a branch of oqs-openssl as part of the OQS project initially led by Douglas Stebila and Michele Mosca at the University of Waterloo but split off to become a separate project catering to the OpenSSL provider concept. With OQS joining PQCA oqsprovider also was folded into that organization.

The oqsprovider project had been supported through the NGI Assure Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 957073.

Financial support for the development of Open Quantum Safe had been provided by Amazon Web Services and the Tutte Institute for Mathematics and Computing.

The OQS project would like to make a special acknowledgement to the companies who had dedicated programmer time to contribute source code to OQS, including Amazon Web Services, evolutionQ, Microsoft Research, Cisco Systems, and IBM Research.

Research projects which developed specific components of OQS have been supported by various research grants, including funding from the Natural Sciences and Engineering Research Council of Canada (NSERC); see here and here for funding acknowledgments.

Disclaimers

Standard software disclaimer

THIS SOFTWARE IS PROVIDED WITH NO WARRANTIES, EXPRESS OR IMPLIED, AND ALL IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING ANY WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.

Standards compliance

This project follows the NIST PQC standardization process and aims to support experimentation with the various PQC algorithms under evaluation and in different stages of standardization by NIST. oqsprovider at this time cannot claim or prove adherence to any standards documents published. For more details, review the file STANDARDS.md carefully. Most notably, hybrid implementations exclusively implemented in oqsprovider are at a pre-standard/draft stage only. Over time the project aims to provide standards compliance and solicits input by way of contributions to achieve this state.

Component disclaimer

oqsprovider for the implementation of all pure PQC functionality is completely dependent on liboqs and accordingly cannot recommend any use beyond experimentation purposes:

WE DO NOT CURRENTLY RECOMMEND RELYING ON THIS SOFTWARE IN A PRODUCTION ENVIRONMENT OR TO PROTECT ANY SENSITIVE DATA. This software is meant to help with research and prototyping. While we make a best-effort approach to avoid security bugs, this library has not received the level of auditing and analysis that would be necessary to rely on it for high security use.

Further details and background available at:

liboqs disclaimer

About

OpenSSL 3+ provider containing post-quantum algorithms

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

521 stars

Watchers

26 watching

Forks

Releases

Packages

Used by

Contributors

Languages