Skip to contentSkip to conversation

Change in openvpn[master]: Added PQE to WolfSSL

Openvpn-devel comododragon (Code Review) 1 participant 3 messages Jun 16, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1750084016000.Id4293137a577f93ea9f2178ece7ef86c4e1429c8@...2715...

#1 lore raw

Attention is currently required from: flichtenheld, plaisthos.

Hello plaisthos, flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1044?usp=email

to review the following change.

Change subject: Added PQE to WolfSSL
......................................................................

Added PQE to WolfSSL

Change-Id: Id4293137a577f93ea9f2178ece7ef86c4e1429c8
---
M README.wolfssl
M src/openvpn/ssl_openssl.c
A src/openvpn/wolfssl_compat.h

3 files changed, 92 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/44/1044/1

README.wolfssl +37 -0
index a5dfe31..27b9087 100644
@@ -28,3 +28,40 @@
  * 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 these PQE, you'll want to configure it like this:
+
+```bash
+./configure --enable-openvpn --enable-kyber --enable-mlkem --enable-curve25519
+```
+
+WolfSSL supports the following Quantum Safe algorithms by specifying them using the `tls-groups`
+option in a config.
+
+```
+ML_KEM_512
+ML_KEM_768
+ML_KEM_1024
+P256_ML_KEM_512
+P384_ML_KEM_768
+P256_ML_KEM_768
+P521_ML_KEM_1024
+P384_ML_KEM_1024
+X25519_ML_KEM_512
+X448_ML_KEM_768
+X25519_ML_KEM_768
+
+KYBER_LEVEL1
+KYBER_LEVEL3
+KYBER_LEVEL5
+
+P256_KYBER_LEVEL1
+P384_KYBER_LEVEL3
+P256_KYBER_LEVEL3
+P521_KYBER_LEVEL5
+
+X25519_KYBER_LEVEL1
+X448_KYBER_LEVEL3
+X25519_KYBER_LEVEL3
+```
src/openvpn/ssl_openssl.c +7 -0
index 2fc77d8..5dbacf0 100644
@@ -76,6 +76,8 @@
 #include <openssl/applink.c>
 #endif
 
+#include "wolfssl_compat.h"
+
 OSSL_LIB_CTX *tls_libctx; /* Global */
 
 static void unload_xkey_provider(void);
@@ -588,7 +590,12 @@
         {
             token = "prime256v1";
         }
+
+#ifdef ENABLE_CRYPTO_WOLFSSL
+        int nid = wolfssl_OBJ_sn2nid(token);
+#else
         int nid = OBJ_sn2nid(token);
+#endif
 
         if (nid == 0)
         {
src/openvpn/wolfssl_compat.h new file +48 -0

48 lines not on this page · raw message

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1044?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id4293137a577f93ea9f2178ece7ef86c4e1429c8
Gerrit-Change-Number: 1044
Gerrit-PatchSet: 1
Gerrit-Owner: comododragon <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

comododragon has abandoned this change. ( http://gerrit.openvpn.net/c/openvpn/+/1044?usp=email )

Change subject: Added PQE to WolfSSL
......................................................................

Abandoned

a
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1044?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id4293137a577f93ea9f2178ece7ef86c4e1429c8
Gerrit-Change-Number: 1044
Gerrit-PatchSet: 1
Gerrit-Owner: comododragon <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: abandon

#3 lore raw
In reply to a message not in the archive

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1044?usp=email )

Change subject: Added PQE to WolfSSL
......................................................................

Patch Set 1:

(1 comment)

Patchset:

PS1:
I feel this is the wrong approach. We are trying to avoid the NID dance. And it seems that wolfSSL already has a function

int wolfSSL_CTX_set1_groups_list(WOLFSSL_CTX *ctx, const char *list)

that has the same (better) functionality of its SSL_CTX_set1_groups_list OpenSSL equivalent. So rather than doing this NID dance, I would prefer that we use the proper function instead.

Maybe wolfSSL upstream can also be convinced to map this to SSL_CTX_set1_groups_list as well.

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1044?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id4293137a577f93ea9f2178ece7ef86c4e1429c8
Gerrit-Change-Number: 1044
Gerrit-PatchSet: 1
Gerrit-Owner: comododragon <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Comment-Date: Mon, 16 Jun 2025 16:03:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment