Download the PHP package secudoc/php-liboqs without Composer

On this page you can find all versions of the php package secudoc/php-liboqs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-liboqs

OQS Wrapper Extension

A minimal PHP extension wrapping liboqs KEM and signature APIs into a namespaced API suitable for the SecuDoc stack. The runtime namespace, configure flag, and module name are OQS (extension: oqs.so).

Note on naming: NIST standardized Kyber as ML-KEM (FIPS 203). liboqs exposes both names (Kyber{512,768,1024} and ML-KEM-{512,768,1024}) depending on build options. This extension accepts whatever your liboqs provides.

Once PHP natively supports PQC, this wrapper will likely be deprecated.


API

KEM

OQS\KEM exposes post-quantum key encapsulation:

All algorithm identifiers surfaced by liboqs are also available as class constants, e.g. OQS\KEM::ALG_KYBER768 and/or OQS\KEM::ALG_ML_KEM_768 (depending on your liboqs build).

Binary outputs: All keys, ciphertexts, and shared secrets are raw binary strings. Base64-encode if you need printable or JSON-safe values.

Secret handling: temporary native buffers are wiped with OQS_MEM_cleanse, but returned PHP strings remain managed by the Zend engine and are not guaranteed to be securely erased later. Treat secret keys and shared secrets as sensitive application data.

Signatures

OQS\Signature wraps stateless PQ signatures:

Signature identifiers are also class constants, e.g. OQS\Signature::ALG_DILITHIUM_3.

Global namespace constants (e.g. OQS\VERSION_TEXT) mirror liboqs build info.


Quick start (usage)


Installing liboqs

Before building this PHP extension, you need the liboqs C library and headers installed on your system.
You can either build it from source or install it via a package manager if available.

Build from source (recommended)

This installs liboqs.so to /usr/local/lib and headers to /usr/local/include/oqs.

Verify installation

Then proceed with the build steps below.


Requirements

Check your liboqs version:


Build & install

Using pie (recommended)

Retrieve the pie.phar from https://github.com/php/pie and install the extension as follows:

Make sure you have liboqs already installed.

Build it from scratch using pkg-config

Using an explicit liboqs prefix

If liboqs isn’t in pkg-config, pass the prefix that contains include/oqs and lib/:


Troubleshooting


Notes

Disclaimer

This extension is provided as-is without any warranty. It is intended for experimentation, prototyping, and research purposes only. Do not use this software in production environments that require certified or audited cryptographic implementations. The liboqs library itself is not a FIPS-validated module, and the PHP wrapper has not been security reviewed. Use entirely at your own risk.


All versions of php-liboqs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3 || ^8.4 || ^8.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package secudoc/php-liboqs contains the following files

Loading the files please wait ...