wolfSSL / wolfssl

The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
https://www.wolfssl.com
GNU General Public License v2.0
2.36k stars 834 forks source link

Kyber: fixes to configure and wolfSSL_get_curve_name #8183

Closed SparkiDev closed 1 week ago

SparkiDev commented 1 week ago

Description

Remote original-only option for kyber in configure.ac. Default is ML-KEM only. original is Kyber only. ml-lem is ML-KEM. to have both: all,original,ml-kem.

Use WOLFSSL_NO_ML_KEM instead of WOLFSSL_WC_MLKEM which requires the inclusion of kyber headers.

Fixes zd#18923

Testing

For only ML-KEM: ./configure --enable-kyber ./configure --enable-kyber=all,ml-kem For just Kyber: ./configure --enable-kyber=all,original For ML-KEM and Kyber ./configure --enable-kyber=all,original,ml-kem ./configure --enable-kyber=all,ml-kem,original

To see which algorithms are enabled: ./wolfcrypt/benchmark/benchmark -kyber

To test wolfSSL_get_curve_name() change: ./configure --enable-kyber ./examples/server/server -v 4 -l TLS13-AES256-GCM-SHA384 --pqc P256_ML_KEM_512 & ./examples/client/client -v 4 -l TLS13-AES256-GCM-SHA384 --pqc P256_ML_KEM_512

Output contains

SSL curve name is P256_ML_KEM_512

Checklist

SparkiDev commented 1 week ago

retest this please