How open-quantum-safe/oqs-provider works
Main Components
• Provider Core:
• Core implementation found in the “oqsprov” folder. This is where the provider shared library is implemented. Note the key source files (e.g., oqsprov.c, oqsprov_capabilities.c) that implement the OpenSSL provider interface.
• “oqs-template” directory which appears to be used as a basis for generating provider or algorithm-specific code. It contains scripts (Python and shell) to generate algorithm tables and configuration fragments.
• OpenSSL Integration:
• How the provider is loaded by OpenSSL’s provider interface. Indicate that OpenSSL communicates with the provider to expose the available quantum-safe algorithms.
• Mention the dependency on OpenSSL 3.x and its evolving provider model that allows external providers to be dynamically registered.
• Underlying Cryptography (liboqs):
• A component representing liboqs, which supplies the underlying quantum-safe cryptographic algorithms. The provider depends on liboqs at build time to determine which algorithms to expose.
• Build & Configuration Infrastructure:
• CMake build system (with CMakeLists.txt at the top level as well as in “oqsprov”), which is used to build and install the provider.
• Configuration and pre-build scripts (e.g., CONFIGURE.md instructions) as well as CI/CD configurations from “.circleci”, “.github/workflows”, and build/testing scripts from the “scripts” folder.
• Testing & Examples:
• “examples” folder as representing sample usage of the provider.
Relationships and Data Flow
• Provider with liboqs, showing that the provider translates calls from OpenSSL into calls to liboqs (or uses liboqs internals when available).
• Build system as an external process that compiles the provider and links it against both OpenSSL and liboqs.
• CI/CD pipelines (from GitHub Actions and CircleCI) that trigger builds, format checks, tests, and release steps—pointing toward the build system and test suite.
Architectural Patterns and Design Principles
• Provider/Plugin Pattern:
• That the design follows the OpenSSL provider model, so mark the provider component as a plugin that adheres to the dynamically loadable “provider” pattern.
• Modular Code Generation and Configuration:
• That the “oqs-template” scripts and fragments are used to dynamically generate parts of the provider based on enabled algorithms. This reflects a modular, data-driven approach.
• Continuous Integration/Continuous Delivery (CI/CD):
• Robust CI/CD pipeline setup through various configuration files (e.g., circleci/config.yml, GitHub workflows) ensuring code quality, cross-platform builds, and tests.
Technologies, Frameworks, and Tools
• CMake for build configuration and compilation.
• The OpenSSL provider API (and dynamic loading) as the integration point.
• liboqs as the dependency providing quantum-safe cryptographic routines.
• Shell scripts, Python scripts, and CI configurations to automate testing, formatting, and releases.