Skip to content

Commit ceb4618

Browse files
authored
Merge pull request #736 from wolfSSL/rm_oqs_kyber
Purge OQS from wolfSSH. Use kyber from wolfssl.
2 parents d57f53b + 20287f5 commit ceb4618

5 files changed

Lines changed: 132 additions & 143 deletions

File tree

README.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -450,33 +450,22 @@ The wolfSSH client and server will automatically negotiate using Curve25519.
450450
POST-QUANTUM
451451
============
452452

453-
wolfSSH now supports the post-quantum algorithm Kyber. It uses the NIST
454-
submission's Level 1 parameter set implemented by liboqs via an integration
455-
with wolfSSH. It is hybridized with ECDHE over the P-256 ECC curve.
453+
wolfSSH now supports the post-quantum algorithm ML-DSA (also known as Kyber).
454+
It uses the KYBER512 parameter set and is hybridized with ECDHE over the P-256
455+
ECC curve.
456456

457-
In order be able to use liboqs, you must have it built and installed on your
458-
system. We support the 0.7.0 release of liboqs. You can download it from the
459-
following link:
457+
In order to use this key exchange you must build and install wolfSSL on your
458+
system. Here is an example of an effective configuration:
460459

461-
https://github.com/open-quantum-safe/liboqs/archive/refs/tags/0.7.0.tar.gz
460+
$ ./configure --enable-wolfssh --enable-experimental --enable-kyber
462461

463-
Once unpacked, this would be sufficient:
462+
After that, simply configure and build wolfssh as usual:
464463

465-
$ cd liboqs-0.7.0
466-
$ mkdir build
467-
$ cd build
468-
$ cmake -DOQS_USE_OPENSSL=0 ..
464+
$ ./configure
469465
$ make all
470-
$ sudo make install
471-
472466

473-
In order to enable support for Kyber Level1 hybridized with ECDHE over the P-256
474-
ECC curve in wolfSSH, use the `--with-liboqs` build option during configuration:
475-
476-
$ ./configure --with-liboqs
477-
478-
The wolfSSH client and server will automatically negotiate using Kyber Level1
479-
hybridized with ECDHE over the P-256 ECC curve if this feature is enabled.
467+
The wolfSSH client and server will automatically negotiate using KYBER512
468+
hybridized with ECDHE over the P-256 ECC curve.
480469

481470
$ ./examples/echoserver/echoserver -f
482471

@@ -508,7 +497,6 @@ NOTE: when prompted, enter the password which is "upthehill".
508497
You can type a line of text and when you press enter, the line will be echoed
509498
back. Use CTRL-C to terminate the connection.
510499

511-
512500
CERTIFICATE SUPPORT
513501
===================
514502

configure.ac

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -60,46 +60,6 @@ AC_CHECK_HEADERS([limits.h sys/select.h sys/time.h sys/ioctl.h pty.h util.h term
6060
AC_CHECK_LIB([network],[socket])
6161
AC_CHECK_LIB([util],[forkpty])
6262

63-
# liboqs
64-
ENABLED_LIBOQS="no"
65-
tryliboqsdir=""
66-
AC_ARG_WITH([liboqs],
67-
[AS_HELP_STRING([--with-liboqs=PATH],[Path to liboqs install (default /usr/local) EXPERIMENTAL!])],
68-
[
69-
AC_MSG_CHECKING([for liboqs])
70-
CPPFLAGS="$CPPFLAGS -DWOLFSSH_HAVE_LIBOQS"
71-
LIBS="$LIBS -loqs"
72-
73-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <oqs/common.h>]], [[ OQS_init(); ]])], [ liboqs_linked=yes ],[ liboqs_linked=no ])
74-
75-
if test "x$liboqs_linked" = "xno" ; then
76-
if test "x$withval" != "xno" ; then
77-
tryliboqsdir=$withval
78-
fi
79-
if test "x$withval" = "xyes" ; then
80-
tryliboqsdir="/usr/local"
81-
fi
82-
83-
LDFLAGS="$AM_LDFLAGS $LDFLAGS -L$tryliboqsdir/lib"
84-
CPPFLAGS="$CPPFLAGS -I$tryliboqsdir/include"
85-
86-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <oqs/common.h>]], [[ OQS_init(); ]])], [ liboqs_linked=yes ],[ liboqs_linked=no ])
87-
88-
if test "x$liboqs_linked" = "xno" ; then
89-
AC_MSG_ERROR([liboqs isn't found.
90-
If it's already installed, specify its path using --with-liboqs=/dir/])
91-
fi
92-
AC_MSG_RESULT([yes])
93-
AM_LDFLAGS="$AM_LDFLAGS -L$tryliboqsdir/lib"
94-
else
95-
AC_MSG_RESULT([yes])
96-
fi
97-
98-
AM_CFLAGS="$AM_CFLAGS -DWOLFSSH_HAVE_LIBOQS"
99-
ENABLED_LIBOQS="yes"
100-
]
101-
)
102-
10363
#wolfssl
10464
AC_MSG_CHECKING([for wolfSSL])
10565
if test "x$prefix" = "xNONE"
@@ -365,4 +325,3 @@ AS_ECHO([" * agent: $ENABLED_AGENT"])
365325
AS_ECHO([" * TCP/IP Forwarding: $ENABLED_FWD"])
366326
AS_ECHO([" * X.509 Certs: $ENABLED_CERTS"])
367327
AS_ECHO([" * Examples: $ENABLED_EXAMPLES"])
368-
AS_ECHO([" * liboqs Integration: $ENABLED_LIBOQS"])

0 commit comments

Comments
 (0)