wolfSSL / wolfssh

wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
https://www.wolfssl.com
381 stars 88 forks source link

Post-Quantum: Liboqs v0.7.0 #733

Open cenote-dev opened 3 months ago

cenote-dev commented 3 months ago

The documentation mentions compatibility with liboqs v0.7.0. However, this version is from Aug, 2021. I wonder wondering if wolfSSH supported recent versions of liboqs?

Releases:

Further, I bring this up as I encountereted the following compiling v0.7.0

[  7%] Built target classic_mceliece_348864_vec
Scanning dependencies of target classic_mceliece_348864_avx
[  7%] Building C object src/kem/classic_mceliece/CMakeFiles/classic_mceliece_348864_avx.dir/pqclean_mceliece348864_avx/aes256ctr.c.o
[  7%] Building C object src/kem/classic_mceliece/CMakeFiles/classic_mceliece_348864_avx.dir/pqclean_mceliece348864_avx/benes.c.o
[  7%] Building C object src/kem/classic_mceliece/CMakeFiles/classic_mceliece_348864_avx.dir/pqclean_mceliece348864_avx/bm.c.o
/[...]//liboqs-0.7.0/src/kem/classic_mceliece/pqclean_mceliece348864_avx/bm.c:132:45: error: argument 1 of type ‘uint64_t[12]’ {aka ‘long unsigned int[12]’} with mismatched bound [-Werror=array-parameter=]
  132 | void PQCLEAN_MCELIECE348864_AVX_bm(uint64_t out[ GFBITS ], vec128 in[ GFBITS ]) {
      |                                    ~~~~~~~~~^~~~~~~~~~~~~
In file included from /[...]/liboqs-0.7.0/src/kem/classic_mceliece/pqclean_mceliece348864_avx/bm.c:6:
/[...]/liboqs-0.7.0/src/kem/classic_mceliece/pqclean_mceliece348864_avx/bm.h:11:36: note: previously declared as ‘uint64_t *’ {aka ‘long unsigned int *’}
   11 | void PQCLEAN_MCELIECE348864_AVX_bm(uint64_t * /*out*/, vec128 * /*in*/);
      |                                    ^~~~~~~~~~
/[...]/liboqs-0.7.0/src/kem/classic_mceliece/pqclean_mceliece348864_avx/bm.c:132:67: error: argument 2 of type ‘vec128[12]’ {aka ‘__m128i[12]’} with mismatched bound [-Werror=array-parameter=]
  132 | oid PQCLEAN_MCELIECE348864_AVX_bm(uint64_t out[ GFBITS ], vec128 in[ GFBITS ]) {
      |                                                           ~~~~~~~^~~~~~~~~~~~

In file included from /[...]/liboqs-0.7.0/src/kem/classic_mceliece/pqclean_mceliece348864_avx/bm.c:6:
/[...]/liboqs-0.7.0/src/kem/classic_mceliece/pqclean_mceliece348864_avx/bm.h:11:56: note: previously declared as ‘vec128 *’ {aka ‘__m128i *’}
   11 | void PQCLEAN_MCELIECE348864_AVX_bm(uint64_t * /*out*/, vec128 * /*in*/);
      |                                                        ^~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-language-extension-token’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[2]: *** [src/kem/classic_mceliece/CMakeFiles/classic_mceliece_348864_avx.dir/build.make:104: src/kem/classic_mceliece/CMakeFiles/classic_mceliece_348864_avx.dir/pqclean_mceliece348864_avx/bm.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1260: src/kem/classic_mceliece/CMakeFiles/classic_mceliece_348864_avx.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
ejohnstown commented 2 months ago

We recently put ML-KEM support directly into wolfCrypt with our own implementation. For the next release of wolfSSH, we are removing liboqs support since we implement the post-quantum algorithms ourselves. This change has already been merged into our repository.

I have tested wolfSSH against liboqs v0.10.0, but not any other versions.