From: "cron2 (Code Review)" Date: Mon, 7 Jul 2025 14:19:35 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., rein.vanbaaren@...1435..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="EEnCN7x3bzM="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Added PQE to WolfSSL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: comododragon , plaisthos , flichtenheld Cc: openvpn-devel --EEnCN7x3bzM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#7) to the change originally created by= comododragon. ( http://gerrit.openvpn.net/c/openvpn/+/1046?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by plaisthos Change subject: Added PQE to WolfSSL ...................................................................... Added PQE to WolfSSL Change-Id: Ie0529c2074964b3be034f01e0ef53090a6edbd35 Signed-off-by: comododragon Acked-by: Arne Schwabe Message-Id: <20250707133447.12404-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 043.html Signed-off-by: Gert Doering --- M README.wolfssl M src/openvpn/ssl_openssl.c 2 files changed, 31 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/46/1046/7 diff --git a/README.wolfssl b/README.wolfssl index a5dfe31..3918d0f 100644 --- a/README.wolfssl +++ b/README.wolfssl @@ -28,3 +28,33 @@ * blowfish support (BF-CBC), you must use something like cipher AES-128-CBC to avoid trying to use BF-CBC * Windows CryptoAPI support + +************************************************************************* +To build WolfSSL with post-quantum KEMs built in, the following command is= used: + +./configure --enable-openvpn --enable-kyber=3Dall --enable-curve25519 + +WolfSSL supports the following post-quantum KEMs and post-quantum hybrid K= EMs which must be specified +using the tls-groups option in an OpenVPN config. Unlike OpenSSL, which in= cludes X25519MLKEM768 +in the default config, WolfSSL requires explicit configuration of tls-grou= ps to include +at least one post-quantum KEM. + +ML_KEM_512 +ML_KEM_768 +ML_KEM_1024 + +P256_ML_KEM_512 +X25519_ML_KEM_512 + +P384_ML_KEM_768 +P256_ML_KEM_768 +X448_ML_KEM_768 +X25519_ML_KEM_768 + +P384_ML_KEM_1024 +P521_ML_KEM_1024 + +The naming conventions of algorithms differ between WolfSSL and OpenSSL. A= n example is that +OpenSSL omits underscores for their naming notation whereas WolfSSL expect= s them. Additionally, +OpenSSL does not accept the P curve notation and instead uses the equivale= nt secp notation. +A specific example is that WolfSSL expects P384_ML_KEM_1024, while OpenSSL= expects secp384r1MLKEM1024. diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 2fc77d8..4c11cd4 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -560,7 +560,7 @@ tls_ctx_set_tls_groups(struct tls_root_ctx *ctx, const char *groups) { ASSERT(ctx); -#if OPENSSL_VERSION_NUMBER < 0x30000000L +#if OPENSSL_VERSION_NUMBER < 0x30000000L && !defined(ENABLE_CRYPTO_WOLFSSL) struct gc_arena gc =3D gc_new(); /* This method could be as easy as * SSL_CTX_set1_groups_list(ctx->ctx, groups) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1046?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie0529c2074964b3be034f01e0ef53090a6edbd35 Gerrit-Change-Number: 1046 Gerrit-PatchSet: 7 Gerrit-Owner: comododragon Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --EEnCN7x3bzM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #7 to the change originally cr= eated by comododragon.

View Change

The following approvals got outd= ated and were removed: Code-Review+2 by plaisthos

Added PQE to WolfSSL

Change-Id: Ie0529c20= 74964b3be034f01e0ef53090a6edbd35
Signed-off-by: comododragon <rein.va= nbaaren@...1435...>
Acked-by: Arne Schwabe <arne-openvpn@...2477...= .>
Message-Id: <20250707133447.12404-1-gert@...1296...>
URL:= https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32043.= html
Signed-off-by: Gert Doering <gert@...1296...>
---
M REA= DME.wolfssl
M src/openvpn/ssl_openssl.c
2 files changed, 31 insertion= s(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openv=
pn refs/changes/46/1046/7
diff --git a/README.wolfssl b/README.wolf=
ssl
index a5dfe31..3918d0f 100644
--- a/REA= DME.wolfssl
+++ b/README.wolfssl
@@ -28,3 += 28,33 @@
* blowfish support (BF-CBC), you must use someth= ing like
cipher AES-128-CBC to avoid trying to use BF-C= BC
* Windows CryptoAPI support
+
+*****************************************************************= ********
+To build Wo= lfSSL with post-quantum KEMs built in, the following command is used:
+
+./configure --enable-openvpn --enable-kyber= =3Dall --enable-curve25519
+
+WolfSSL supp= orts the following post-quantum KEMs and post-quantum hybrid KEMs which mus= t be specified
+using= the tls-groups option in an OpenVPN config. Unlike OpenSSL, which includes= X25519MLKEM768
+in t= he default config, WolfSSL requires explicit configuration of tls-groups to= include
+at least on= e post-quantum KEM.
+=
+ML_KEM_512+ML_KEM_768
+ML_KEM_1024
+
+P256_ML_KEM_512
+X25519_ML_KEM_512
+
+P384_ML_KEM_76= 8
+P256_ML_KEM_768
+X448_ML_KEM_768=
+X25519_ML_KEM_768+
+P384_ML_KEM_1024
+P521_ML_KEM_1024
+
+= OpenSSL omits underscores for their naming notation whereas WolfSSL expects= them. Additionally,
= +OpenSSL does not accept the P curve notation and instead uses the equivale= nt secp notation.
+A = specific example is that WolfSSL expects P384_ML_KEM_1024, while OpenSSL ex= pects secp384r1MLKEM1024.
diff --git a/src/openvpn/ssl_open= ssl.c b/src/openvpn/ssl_openssl.c
index 2fc77d8..4c11cd4 10= 0644
--- a/src/openvpn/ssl_openssl.c
+++ b/= src/openvpn/ssl_openssl.c
@@ -560,7 +560,7 @@
tls_ctx_set_tls_groups(struct tls_root_ctx *ctx, const char *groups)
{
ASSERT(ctx);
-#if OPENSSL_VERSION_NUMBER < 0x30000000L
+#if OPENSSL_VERSION_NU= MBER < 0x30000000L && !defined(ENABLE_CRYPTO_WOLFSSL)
= struct gc_arena gc =3D gc_new();
/* This me= thod could be as easy as
* SSL_CTX_set1_groups_list(= ctx->ctx, groups)

To view, visit change 1046= . To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie0529c2074964b3be034f01e0ef= 53090a6edbd35
Gerrit-Change-Number: 1046
Gerrit-PatchSet: 7
Gerrit-Owner: comododragon <rein.vanbaaren@= ...1435...>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--EEnCN7x3bzM=--