Skip to content

Commit 76080d0

Browse files
authored
Merge pull request #10292 from Frauschi/liblms_libxmss_removal
Remove deprecated liblms and libxmss
2 parents 43e44cb + e1fefcc commit 76080d0

27 files changed

Lines changed: 445 additions & 3032 deletions

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,10 +700,8 @@ add_option(WOLFSSL_LMSSHA256192
700700

701701
if (WOLFSSL_LMS)
702702
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_HAVE_LMS")
703-
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_WC_LMS")
704703

705704
set_wolfssl_definitions("WOLFSSL_HAVE_LMS" RESULT)
706-
set_wolfssl_definitions("WOLFSSL_WC_LMS" RESULT)
707705

708706
if (WOLFSSL_LMSSHA256192)
709707
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_LMS_SHA256_192")

Docker/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ RUN git clone --single-branch https://github.com/open-quantum-safe/liboqs.git &&
3434

3535
RUN mkdir /opt/sources
3636

37-
# install liblms
38-
RUN cd /opt/sources && git clone --single-branch https://github.com/cisco/hash-sigs.git && cd hash-sigs && git checkout b0631b8891295bf2929e68761205337b7c031726 \
39-
&& sed -i 's/USE_OPENSSL 1/USE_OPENSSL 0/g' sha256.h && make -j4 hss_lib_thread.a
40-
4137
# Install pkixssh to /opt/pkixssh for X509 interop testing with wolfSSH
4238
RUN mkdir /var/empty
4339
RUN cd /opt/sources && wget -q -O- https://roumenpetrov.info/secsh/src/pkixssh-15.1.tar.gz | tar xzf - && cd pkixssh-15.1 && ./configure --prefix=/opt/pkixssh/ --exec-prefix=/opt/pkixssh/ && make install

IDE/INTIME-RTOS/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,6 @@ INCL_TARGS := wolfssl/callbacks.h \
287287
wolfssl/wolfcrypt/integer.h \
288288
wolfssl/wolfcrypt/kdf.h \
289289
wolfssl/wolfcrypt/kyber.h \
290-
wolfssl/wolfcrypt/lms.h \
291290
wolfssl/wolfcrypt/logging.h \
292291
wolfssl/wolfcrypt/md2.h \
293292
wolfssl/wolfcrypt/md4.h \
@@ -327,11 +326,12 @@ INCL_TARGS := wolfssl/callbacks.h \
327326
wolfssl/wolfcrypt/visibility.h \
328327
wolfssl/wolfcrypt/wc_encrypt.h \
329328
wolfssl/wolfcrypt/wc_kyber.h \
329+
wolfssl/wolfcrypt/wc_lms.h \
330330
wolfssl/wolfcrypt/wc_pkcs11.h \
331331
wolfssl/wolfcrypt/wc_port.h \
332+
wolfssl/wolfcrypt/wc_xmss.h \
332333
wolfssl/wolfcrypt/wolfevent.h \
333334
wolfssl/wolfcrypt/wolfmath.h \
334-
wolfssl/wolfcrypt/xmss.h \
335335
wolfssl/wolfcrypt/port/nrf51.h \
336336
wolfssl/wolfcrypt/port/af_alg/afalg_hash.h \
337337
wolfssl/wolfcrypt/port/af_alg/wc_afalg.h \

IDE/INTIME-RTOS/wolfssl-lib.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|INtime'">true</ExcludedFromBuild>
8888
</ClCompile>
8989
<ClCompile Include="..\..\wolfcrypt\src\ext_kyber.c" />
90-
<ClCompile Include="..\..\wolfcrypt\src\ext_lms.c" />
91-
<ClCompile Include="..\..\wolfcrypt\src\ext_xmss.c" />
9290
<ClCompile Include="..\..\wolfcrypt\src\falcon.c" />
9391
<ClCompile Include="..\..\wolfcrypt\src\fe_448.c" />
9492
<ClCompile Include="..\..\wolfcrypt\src\fips.c" />

INSTALL

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,7 @@ The wolfssl port in vcpkg is kept up to date by wolfSSL.
296296

297297
We also have vcpkg ports for wolftpm, wolfmqtt and curl.
298298

299-
17. Building with hash-sigs lib for LMS/HSS support [EXPERIMENTAL]
300-
301-
Deprecated. wolfSSL now has its own LMS/HSS implementation in wolfCrypt.
302-
303-
18. Building for Debian, Ubuntu, Linux Mint, and derivatives
299+
17. Building for Debian, Ubuntu, Linux Mint, and derivatives
304300

305301
To generate a .deb package, configure wolfSSL with the desired
306302
configuration. Then run `make deb` to generate a Debian package
@@ -309,16 +305,11 @@ We also have vcpkg ports for wolftpm, wolfmqtt and curl.
309305
resulting packages are placed in the root directory of the
310306
project.
311307

312-
19. Building for RHEL, Fedora, CentOS, SUSE, and openSUSE
308+
18. Building for RHEL, Fedora, CentOS, SUSE, and openSUSE
313309

314310
To generate a .rpm package, configure wolfSSL with the desired
315311
configuration. Then run `make rpm` to generate a .rpm package
316312
with the current configuration. To build the package inside a
317313
Docker container, use `make rpm-docker`. In both cases the
318314
resulting packages are placed in the root directory of the
319315
project.
320-
321-
20. Building with xmss-reference lib for XMSS/XMSS^MT support [EXPERIMENTAL]
322-
323-
Deprecated. wolfSSL now has its own XMMS/XMSS^MT implementation in
324-
wolfCrypt.

configure.ac

Lines changed: 2 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,6 @@ do
18641864
done
18651865

18661866
# XMSS
1867-
ENABLED_WC_XMSS=no
18681867
AC_ARG_ENABLE([xmss],
18691868
[AS_HELP_STRING([--enable-xmss],[Enable stateful XMSS/XMSS^MT signatures (default: disabled)])],
18701869
[ ENABLED_XMSS=$enableval ],
@@ -1890,60 +1889,7 @@ do
18901889
esac
18911890
done
18921891

1893-
# libxmss
1894-
# Get the path to xmss-reference.
1895-
ENABLED_LIBXMSS="no"
1896-
trylibxmssdir=""
1897-
AC_ARG_WITH([libxmss],
1898-
[AS_HELP_STRING([--with-libxmss=PATH],[PATH to xmss-reference root dir. (requires --enable-experimental)!])],
1899-
[
1900-
AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([libxmss requires --enable-experimental.]) ])
1901-
AC_MSG_CHECKING([for libxmss])
1902-
1903-
trylibxmssdir=$withval
1904-
1905-
if test -e $trylibxmssdir; then
1906-
libxmss_linked=yes
1907-
else
1908-
AC_MSG_ERROR([libxmss isn't found.
1909-
If it's already installed, specify its path using --with-libxmss=/dir/])
1910-
fi
1911-
if test "$XMSS_VERIFY_ONLY" = "yes"; then
1912-
if test -e $trylibxmssdir/xmss_verify_lib.a; then
1913-
CPPFLAGS="$AM_CPPFLAGS -DHAVE_LIBXMSS -I$trylibxmssdir"
1914-
LIB_STATIC_ADD="$LIB_STATIC_ADD $trylibxmssdir/xmss_verify_lib.a"
1915-
enable_shared=no
1916-
enable_static=yes
1917-
libxmss_linked=yes
1918-
else
1919-
AC_MSG_ERROR([xmss_verify_lib.a isn't found.
1920-
If it's already installed, specify its path using --with-libxmss=/dir/])
1921-
fi
1922-
elif test -e $trylibxmssdir/xmss_lib.a; then
1923-
CPPFLAGS="$AM_CPPFLAGS -DHAVE_LIBXMSS -I$trylibxmssdir"
1924-
LIB_STATIC_ADD="$LIB_STATIC_ADD $trylibxmssdir/xmss_lib.a"
1925-
enable_shared=no
1926-
enable_static=yes
1927-
libxmss_linked=yes
1928-
else
1929-
AC_MSG_ERROR([libxmss isn't found.
1930-
If it's already installed, specify its path using --with-libxmss=/dir/])
1931-
fi
1932-
1933-
XMSS_ROOT=$trylibxmssdir
1934-
1935-
AC_MSG_RESULT([yes])
1936-
AM_CPPFLAGS="$CPPFLAGS"
1937-
1938-
AM_CFLAGS="$AM_CFLAGS -DHAVE_LIBXMSS -I$trylibxmssdir"
1939-
ENABLED_LIBXMSS="yes"
1940-
AC_SUBST([XMSS_ROOT])
1941-
],
1942-
[XMSS_ROOT=""]
1943-
)
1944-
19451892
# LMS
1946-
ENABLED_WC_LMS=no
19471893
AC_ARG_ENABLE([lms],
19481894
[AS_HELP_STRING([--enable-lms],[Enable stateful LMS/HSS signatures (default: disabled)])],
19491895
[ ENABLED_LMS=$enableval ],
@@ -1978,74 +1924,6 @@ do
19781924
esac
19791925
done
19801926

1981-
# liblms
1982-
# Get the path to the hash-sigs LMS HSS lib.
1983-
ENABLED_LIBLMS="no"
1984-
tryliblmsdir=""
1985-
AC_ARG_WITH([liblms],
1986-
[AS_HELP_STRING([--with-liblms=PATH],[PATH to hash-sigs LMS/HSS install (default /usr/local) (requires --enable-experimental)!])],
1987-
[
1988-
AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([liblms requires --enable-experimental.]) ])
1989-
AC_MSG_CHECKING([for liblms])
1990-
1991-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <hss.h>]], [[ param_set_t lm_type; param_set_t lm_ots_type; hss_get_public_key_len(4, &lm_type, &lm_ots_type); ]])], [ liblms_linked=yes ],[ liblms_linked=no ])
1992-
1993-
if test "x$liblms_linked" = "xno" ; then
1994-
if test "x$withval" != "xno" ; then
1995-
tryliblmsdir=$withval
1996-
fi
1997-
if test "x$withval" = "xyes" ; then
1998-
tryliblmsdir="/usr/local"
1999-
fi
2000-
2001-
# 1. If verify only build, use hss_verify.a
2002-
# 2. If normal build, by default use single-threaded hss_lib.a
2003-
# 3. If 2 not found, then use the multi-threaded hss_lib_thread.a
2004-
if test "$LMS_VERIFY_ONLY" = "yes"; then
2005-
if test -e $tryliblmsdir/hss_verify.a; then
2006-
CPPFLAGS="$AM_CPPFLAGS -DHAVE_LIBLMS -I$tryliblmsdir"
2007-
LIB_STATIC_ADD="$LIB_STATIC_ADD $tryliblmsdir/hss_verify.a"
2008-
enable_shared=no
2009-
enable_static=yes
2010-
liblms_linked=yes
2011-
else
2012-
AC_MSG_ERROR([hss_verify.a isn't found.
2013-
If it's already installed, specify its path using --with-liblms=/dir/])
2014-
fi
2015-
elif test -e $tryliblmsdir/hss_lib.a; then
2016-
CPPFLAGS="$AM_CPPFLAGS -DHAVE_LIBLMS -I$tryliblmsdir"
2017-
LIB_STATIC_ADD="$LIB_STATIC_ADD $tryliblmsdir/hss_lib.a"
2018-
enable_shared=no
2019-
enable_static=yes
2020-
liblms_linked=yes
2021-
elif test -e $tryliblmsdir/hss_lib_thread.a; then
2022-
CPPFLAGS="$AM_CPPFLAGS -DHAVE_LIBLMS -I$tryliblmsdir"
2023-
LIB_STATIC_ADD="$LIB_STATIC_ADD $tryliblmsdir/hss_lib_thread.a"
2024-
enable_shared=no
2025-
enable_static=yes
2026-
liblms_linked=yes
2027-
else
2028-
AC_MSG_ERROR([liblms isn't found.
2029-
If it's already installed, specify its path using --with-liblms=/dir/])
2030-
fi
2031-
2032-
if test "x$liblms_linked" = "xno" ; then
2033-
AC_MSG_ERROR([liblms isn't found.
2034-
If it's already installed, specify its path using --with-liblms=/dir/])
2035-
fi
2036-
2037-
AC_MSG_RESULT([yes])
2038-
AM_CPPFLAGS="$CPPFLAGS"
2039-
AM_LDFLAGS="$LDFLAGS"
2040-
else
2041-
AC_MSG_RESULT([yes])
2042-
fi
2043-
2044-
AM_CFLAGS="$AM_CFLAGS -DHAVE_LIBLMS"
2045-
ENABLED_LIBLMS="yes"
2046-
]
2047-
)
2048-
20491927
# SLH-DSA
20501928
ENABLED_SLHDSA=yes
20511929
AC_ARG_ENABLE([slhdsa],
@@ -7558,28 +7436,12 @@ fi
75587436
if test "$ENABLED_XMSS" != "no"
75597437
then
75607438
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_XMSS"
7561-
7562-
# Use hash-sigs XMSS lib if enabled.
7563-
if test "$ENABLED_LIBXMSS" = "yes"; then
7564-
ENABLED_WC_XMSS=no
7565-
else
7566-
ENABLED_WC_XMSS=yes
7567-
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_XMSS"
7568-
fi
75697439
fi
75707440
75717441
# LMS CFLAG processing (after FIPS section for sandwich pattern)
75727442
if test "$ENABLED_LMS" != "no"
75737443
then
75747444
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_LMS"
7575-
7576-
# Use hash-sigs LMS lib if enabled.
7577-
if test "$ENABLED_LIBLMS" = "yes"; then
7578-
ENABLED_WC_LMS=no
7579-
else
7580-
ENABLED_WC_LMS=yes
7581-
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_LMS"
7582-
fi
75837445
fi
75847446
75857447
# SLH-DSA CFLAG processing (after FIPS section for sandwich pattern)
@@ -12205,8 +12067,8 @@ AM_CONDITIONAL([BUILD_FE448], [test "x$ENABLED_FE448" = "xyes" || test "x$ENABLE
1220512067
AM_CONDITIONAL([BUILD_GE448], [test "x$ENABLED_GE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
1220612068
AM_CONDITIONAL([BUILD_CURVE448],[test "x$ENABLED_CURVE448" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
1220712069
AM_CONDITIONAL([BUILD_CURVE448_SMALL],[test "x$ENABLED_CURVE448_SMALL" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
12208-
AM_CONDITIONAL([BUILD_WC_LMS],[test "x$ENABLED_WC_LMS" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
12209-
AM_CONDITIONAL([BUILD_WC_XMSS],[test "x$ENABLED_WC_XMSS" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
12070+
AM_CONDITIONAL([BUILD_WC_LMS],[test "x$ENABLED_LMS" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
12071+
AM_CONDITIONAL([BUILD_WC_XMSS],[test "x$ENABLED_XMSS" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
1221012072
AM_CONDITIONAL([BUILD_WC_SLHDSA],[test "x$ENABLED_SLHDSA" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
1221112073
AM_CONDITIONAL([BUILD_WC_MLKEM],[test "x$ENABLED_WC_MLKEM" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
1221212074
AM_CONDITIONAL([BUILD_DILITHIUM],[test "x$ENABLED_DILITHIUM" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
@@ -12257,8 +12119,6 @@ AM_CONDITIONAL([BUILD_OCSP_STAPLING_MULTI],[test "x$ENABLED_CERTIFICATE_STATUS_R
1225712119
AM_CONDITIONAL([BUILD_OCSP_STAPLING_V2],[test "x$ENABLED_CERTIFICATE_STATUS_REQUEST_V2" = "xyes"])
1225812120
AM_CONDITIONAL([BUILD_CRL],[test "x$ENABLED_CRL" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
1225912121
AM_CONDITIONAL([BUILD_CRL_MONITOR],[test "x$ENABLED_CRL_MONITOR" = "xyes"])
12260-
AM_CONDITIONAL([BUILD_LIBLMS],[test "x$ENABLED_LIBLMS" = "xyes"])
12261-
AM_CONDITIONAL([BUILD_LIBXMSS],[test "x$ENABLED_LIBXMSS" = "xyes"])
1226212122
AM_CONDITIONAL([BUILD_LIBOQS],[test "x$ENABLED_LIBOQS" = "xyes"])
1226312123
AM_CONDITIONAL([BUILD_WNR],[test "x$ENABLED_WNR" = "xyes"])
1226412124
AM_CONDITIONAL([BUILD_SRP],[test "x$ENABLED_SRP" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
@@ -12760,12 +12620,7 @@ echo " * CURVE448: $ENABLED_CURVE448"
1276012620
echo " * ED448: $ENABLED_ED448"
1276112621
echo " * ED448 streaming: $ENABLED_ED448_STREAM"
1276212622
echo " * LMS: $ENABLED_LMS"
12763-
echo " * LMS wolfSSL impl: $ENABLED_WC_LMS"
1276412623
echo " * XMSS: $ENABLED_XMSS"
12765-
echo " * XMSS wolfSSL impl: $ENABLED_WC_XMSS"
12766-
if test "$ENABLED_LIBXMSS" = "yes"; then
12767-
echo " * XMSS_ROOT: $XMSS_ROOT"
12768-
fi
1276912624
echo " * SLH-DSA $ENABLED_SLHDSA"
1277012625
echo " * MLKEM: $ENABLED_MLKEM"
1277112626
echo " * MLKEM wolfSSL impl: $ENABLED_WC_MLKEM"
@@ -12826,8 +12681,6 @@ echo " * Persistent session cache: $ENABLED_SAVESESSION"
1282612681
echo " * Persistent cert cache: $ENABLED_SAVECERT"
1282712682
echo " * Atomic User Record Layer: $ENABLED_ATOMICUSER"
1282812683
echo " * Public Key Callbacks: $ENABLED_PKCALLBACKS"
12829-
echo " * libxmss: $ENABLED_LIBXMSS"
12830-
echo " * liblms: $ENABLED_LIBLMS"
1283112684
echo " * liboqs: $ENABLED_LIBOQS"
1283212685
echo " * Whitewood netRandom: $ENABLED_WNR"
1283312686
echo " * Server Name Indication: $ENABLED_SNI"

examples/configs/user_settings_pq.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ extern "C" {
105105
/* ------------------------------------------------- */
106106
#if 0 /* LMS signatures */
107107
#define WOLFSSL_HAVE_LMS
108-
#define WOLFSSL_WC_LMS
109108
#ifndef LMS_LEVELS
110109
#define LMS_LEVELS 2
111110
#endif
@@ -122,7 +121,6 @@ extern "C" {
122121
/* ------------------------------------------------- */
123122
#if 0 /* XMSS signatures */
124123
#define WOLFSSL_HAVE_XMSS
125-
#define WOLFSSL_WC_XMSS
126124
#ifndef WOLFSSL_XMSS_MAX_HEIGHT
127125
#define WOLFSSL_XMSS_MAX_HEIGHT 20
128126
#endif

examples/configs/user_settings_wolfboot_keytools.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ extern "C" {
131131

132132
#if 1 /* LMS */
133133
#define WOLFSSL_HAVE_LMS
134-
#define WOLFSSL_WC_LMS
135134
#ifndef LMS_LEVELS
136135
#define LMS_LEVELS 1
137136
#endif
@@ -145,7 +144,6 @@ extern "C" {
145144

146145
#if 1 /* XMSS */
147146
#define WOLFSSL_HAVE_XMSS
148-
#define WOLFSSL_WC_XMSS
149147
#ifndef WOLFSSL_XMSS_MAX_HEIGHT
150148
#define WOLFSSL_XMSS_MAX_HEIGHT 32
151149
#endif

linuxkm/module_exports.c.template

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,21 +158,11 @@
158158
#endif
159159
#endif
160160
#if defined(WOLFSSL_HAVE_XMSS)
161-
#include <wolfssl/wolfcrypt/xmss.h>
162-
#ifdef HAVE_LIBXMSS
163-
#include <wolfssl/wolfcrypt/ext_xmss.h>
164-
#else
165161
#include <wolfssl/wolfcrypt/wc_xmss.h>
166162
#endif
167-
#endif
168163
#if defined(WOLFSSL_HAVE_LMS)
169-
#include <wolfssl/wolfcrypt/lms.h>
170-
#ifdef HAVE_LIBLMS
171-
#include <wolfssl/wolfcrypt/ext_lms.h>
172-
#else
173164
#include <wolfssl/wolfcrypt/wc_lms.h>
174165
#endif
175-
#endif
176166
#ifdef HAVE_DILITHIUM
177167
#include <wolfssl/wolfcrypt/dilithium.h>
178168
#endif

src/include.am

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,14 +1984,6 @@ src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/ext_mlkem.c
19841984
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/liboqs/liboqs.c
19851985
endif
19861986

1987-
if BUILD_LIBLMS
1988-
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/ext_lms.c
1989-
endif
1990-
1991-
if BUILD_LIBXMSS
1992-
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/ext_xmss.c
1993-
endif
1994-
19951987
if BUILD_LIBZ
19961988
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/compress.c
19971989
endif

0 commit comments

Comments
 (0)