<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ouroboros/src/lib/tests/auth_test.c, branch master</title>
<subtitle>Ouroboros main repository</subtitle>
<id>http://www.ouroboros.rocks/cgit/ouroboros/atom?h=master</id>
<link rel='self' href='http://www.ouroboros.rocks/cgit/ouroboros/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/'/>
<updated>2026-02-18T06:54:56+00:00</updated>
<entry>
<title>build: Update copyright to 2026</title>
<updated>2026-02-18T06:54:56+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-02-15T09:21:02+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=0d72b59c2964208ea34ce2322978344d7ff1a223'/>
<id>urn:sha1:0d72b59c2964208ea34ce2322978344d7ff1a223</id>
<content type='text'>
Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Add SLH-DSA tests and per-algorithm PQC gating</title>
<updated>2026-02-18T06:53:35+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-02-17T21:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=040bdfb18684d809cb5edacf9867d3378b7e093b'/>
<id>urn:sha1:040bdfb18684d809cb5edacf9867d3378b7e093b</id>
<content type='text'>
This replaces the single HAVE_OPENSSL_PQC/DISABLE_PQC with
per-algorithm CMake variables (ML-KEM, ML-DSA, SLH-DSA), gated by the
OpenSSL versions: ML-KEM and ML-DSA require &gt;= 3.4, SLH-DSA &gt;= 3.5.

SLH-DSA was already working, but now added explicit authentication
tests for it with a full certificate chain (root CA, intermediate CA,
server) to show full support.

Rename PQC test files and cert headers to use algorithm-specific names
(ml_kem, ml_dsa, slh_dsa) and move cert headers to
include/test/certs/.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Fix authentication test</title>
<updated>2026-01-26T06:47:15+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-01-23T11:46:57+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=2745cce83b1f011b7b69fc2f5dbf50a90ffde0ad'/>
<id>urn:sha1:2745cce83b1f011b7b69fc2f5dbf50a90ffde0ad</id>
<content type='text'>
The hardcoded certificates were re-introduced in ea52d5275, breaking
the build.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Fix getting text certificates</title>
<updated>2026-01-23T07:24:42+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-01-18T15:48:37+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=ea52d52754d58edac81bfb10fc4c59fcc8b59935'/>
<id>urn:sha1:ea52d52754d58edac81bfb10fc4c59fcc8b59935</id>
<content type='text'>
The openssl_crt_str function was using BIO_get_mem_data() but this is
not guaranteed to be NULL-terminated, causing buffer overruns.  This
was the root cause of ASan tests with certificates running for
minutes and eventually getting killed on the CI/CD pipeline:

      Start  1: lib/auth_test
 1/26 Test  #1: lib/auth_test ......................***Skipped 312.75 sec
      Start 16: irmd/oap/oap_test
16/26 Test #16: irmd/oap/oap_test ..................***Skipped 345.87 sec

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Add post-quantum cryptography support</title>
<updated>2026-01-19T07:29:29+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-01-07T15:44:34+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=60b04305d70614580b4f883c0a147507edef3779'/>
<id>urn:sha1:60b04305d70614580b4f883c0a147507edef3779</id>
<content type='text'>
This adds initial support for runtime-configurable encryption and
post-quantum Key Encapsulation Mechanisms (KEMs) and authentication
(ML-DSA).

Supported key exchange algorithms:

  ECDH: prime256v1, secp384r1, secp521r1, X25519, X448
  Finite Field DH: ffdhe2048, ffdhe3072, ffdhe4096
  ML-KEM (FIPS 203): ML-KEM-512, ML-KEM-768, ML-KEM-1024
  Hybrid KEMs: X25519MLKEM768, X448MLKEM1024

Supported ciphers:
  AEAD: aes-128-gcm, aes-192-gcm, aes-256-gcm, chacha20-poly1305
  CTR: aes-128-ctr, aes-192-ctr, aes-256-ctr

Supported HKDFs:
  sha256, sha384, sha512, sha3-256, sha3-384, sha3-512,
  blake2b512, blake2s256

Supported Digests for DSA:
  sha256, sha384, sha512, sha3-256, sha3-384, sha3-512,
  blake2b512, blake2s256

PQC support requires OpenSSL 3.4.0+ and is detected automatically via
CMake. A DISABLE_PQC option allows building without PQC even when
available.

KEMs differ from traditional DH in that they require asymmetric roles:
one party encapsulates to the other's public key. This creates a
coordination problem during simultaneous reconnection attempts. The
kem_mode configuration parameter resolves this by pre-assigning roles:

  kem_mode=server  # Server encapsulates (1-RTT, full forward secrecy)
  kem_mode=client  # Client encapsulates (0-RTT, cached server key)

The enc.conf file format supports:

  kex=&lt;algorithm&gt;      # Key exchange algorithm
  cipher=&lt;algorithm&gt;   # Symmetric cipher
  kdf=&lt;KDF&gt;            # Key derivation function
  digest=&lt;digest&gt;      # Digest for DSA
  kem_mode=&lt;mode&gt;      # Server (default) or client
  none                 # Disable encryption

The OAP protocol is extended to negotiate algorithms and exchange KEX
data. All KEX messages are signed using existing authentication
infrastructure for integrity and replay protection.

Tests are split into base and _pqc variants to handle conditional PQC
compilation (kex_test.c/kex_test_pqc.c, oap_test.c/oap_test_pqc.c).

Bumped minimum required OpenSSL version for encryption to 3.0
(required for HKDF API). 1.1.1 is long time EOL.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Fix buffer in auth_test and tpm log</title>
<updated>2025-11-21T07:17:59+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-11-10T08:43:30+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=7dd1cd18373a6c64ecea8caf231e10a00764f705'/>
<id>urn:sha1:7dd1cd18373a6c64ecea8caf231e10a00764f705</id>
<content type='text'>
The string buffer in auth_test was one byte too short. The log line
for the thread id in the tpm thread debug output needs type
conversion. The build fails because of this on OS X.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>irmd: Add flow authentication</title>
<updated>2025-08-18T18:57:23+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-13T07:03:20+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=e35302ca0ab64edd21b9d8e40d3aa74a3a4f4f7e'/>
<id>urn:sha1:e35302ca0ab64edd21b9d8e40d3aa74a3a4f4f7e</id>
<content type='text'>
This adds initial implementation of peer authentication as part of
flow allocation. If credentials are not provided, this will be
accepted and logged as info that the flow is not authenticated.

Certificates and keys are passed as .pem files. The key file should
not be encrypted, else the IRMd will open a prompt for the password.
The default location for these .pem files is in
/etc/ouroboros/security. It is strongly recommended to make this
directory only accessible to root.

├── security
│   ├── cacert
│   │   └── ca.root.o7s.crt.pem
│   ├── client
│   │   ├── &lt;name&gt;
│   │   |   ├── crt.pem
│   │   |   └── key.pem
│   │   └── &lt;name&gt;
|   |       ├──...
|   |
│   ├── server
│   │   ├── &lt;name&gt;
│   │   |   ├── crt.pem
│   │   |   └── key.pem
│   │   └── &lt;name&gt;
|   |       ├── ...
|   |
│   └── untrusted
│       └── sign.root.o7s.crt.pem

Trusted root CA certificates go in the /cacert directory, untrusted
certificates for signature verification go in the /untrusted
directory. The IRMd will load these certificates at boot.  The IRMd
will look for certificates in the /client and /server directories. For
each name a subdirectory can be added and the credentials in that
directory are used to sign the OAP header for flows at flow_alloc() on
the client side and flow_accept() on the server side.

These defaults can be changed at build time using the following
variables (in alphabetical order):
 OUROBOROS_CA_CRT_DIR             /etc/ouroboros/security/cacert
 OUROBOROS_CLI_CRT_DIR            /etc/ouroboros/security/client
 OUROBOROS_SECURITY_DIR           /etc/ouroboros/security
 OUROBOROS_SRV_CRT_DIR            /etc/ouroboros/security/server
 OUROBOROS_UNTRUSTED_DIR          /etc/ouroboros/security/untrusted

The directories for the names can also be configured at IRMd boot
using the configuraton file and at runtime when a name is created
using the "irm name create" CLI tool. The user needs to have
permissions to access the keyfile and certificate when specifying the
paths with the "irm name create" CLI tool.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Fix memory leaks in tests</title>
<updated>2025-08-15T09:47:59+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-12T20:51:00+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=0f26a0d42b4fc9fb06ab3138b36db2bcc69d2cbd'/>
<id>urn:sha1:0f26a0d42b4fc9fb06ab3138b36db2bcc69d2cbd</id>
<content type='text'>
Fixes memory leaks in the tests that had escaped detection.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Fix authentication test for older OpenSSL</title>
<updated>2025-08-11T08:00:44+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-08T18:52:29+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=a618ec0d2df347bb05787b5a6c109674698e5de9'/>
<id>urn:sha1:a618ec0d2df347bb05787b5a6c109674698e5de9</id>
<content type='text'>
Signed the server certificate using SHA3 during last update, which is
bugged on older versions of libssl. Using ecdsa-with-SHA256 again.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Fix authentication test</title>
<updated>2025-08-06T08:34:18+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-03T19:33:17+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=7933d742221fd44cc6eb0c82ff4a1a9795927de6'/>
<id>urn:sha1:7933d742221fd44cc6eb0c82ff4a1a9795927de6</id>
<content type='text'>
The test had a root certificate that expired today. All test
certificates updated, now valid until 2045.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
</feed>
