Skip to content

Commit 2b711f1

Browse files
committed
Readme update
1 parent ae9b4b0 commit 2b711f1

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file.
4-
4+
## [0.3.0] - 2025-10-17
5+
- Added PIE / Packagist support (composer.json)
6+
- Added liboqs installation instructions
57

68
## [0.2.0] - 2025-10-03
79

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Global namespace constants (e.g. `OQS\VERSION_TEXT`) mirror liboqs build info.
5050
use OQS\KEM;
5151

5252
// Pick an algorithm supported by your liboqs build:
53-
$alg = defined('OQS\KEM::ALG_ML_KEM_768') ? OQS\KEM::ALG_ML_KEM_768 : OQS\KEM::ALG_KYBER768;
53+
$alg = defined('OQS\\KEM::ALG_ML_KEM_768') ? OQS\KEM::ALG_ML_KEM_768 : OQS\KEM::ALG_KYBER768;
5454

5555
[$pk, $sk] = KEM::keypair($alg);
5656
[$ct, $ss1] = KEM::encapsulate($alg, $pk);
@@ -64,6 +64,32 @@ echo base64_encode($ct), "\n", base64_encode($ss1), "\n";
6464

6565
---
6666

67+
## Installing liboqs
68+
69+
Before building this PHP extension, you need the **liboqs** C library and headers installed on your system.
70+
You can either build it from source or install it via a package manager if available.
71+
72+
### Build from source (recommended)
73+
```bash
74+
git clone https://github.com/open-quantum-safe/liboqs.git
75+
cd liboqs
76+
mkdir build && cd build
77+
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DOQS_BUILD_ONLY_LIB=ON ..
78+
make -j$(nproc)
79+
sudo make install
80+
```
81+
This installs `liboqs.so` to `/usr/local/lib` and headers to `/usr/local/include/oqs`.
82+
83+
### Verify installation
84+
```bash
85+
pkg-config --modversion liboqs
86+
# should report 0.14.0 or newer
87+
```
88+
89+
Then proceed with the build steps below.
90+
91+
---
92+
6793
## Requirements
6894

6995
- PHP dev tools (`phpize`, `php-config`, headers)
@@ -93,8 +119,6 @@ sudo phpenmod oqs
93119
php -m | grep oqs
94120
```
95121

96-
97-
98122
### Using an explicit liboqs prefix
99123

100124
If liboqs isn’t in pkg-config, pass the prefix that contains `include/oqs` and `lib/`:
@@ -145,4 +169,4 @@ This extension is provided **as-is** without any warranty. It is intended for ex
145169
prototyping, and research purposes only. Do **not** use this software in production environments
146170
that require certified or audited cryptographic implementations. The liboqs library itself is
147171
not a FIPS-validated module, and the PHP wrapper has not been security reviewed. Use entirely
148-
at your own risk.
172+
at your own risk.

0 commit comments

Comments
 (0)