@@ -168,12 +168,6 @@ int wc_KyberKey_PrivateKeySize(KyberKey* key, word32* len)
168168 }
169169 }
170170#endif /* HAVE_LIBOQS */
171- #ifdef HAVE_PQM4
172- (void )key ;
173- if (ret == 0 ) {
174- * len = PQM4_PRIVATE_KEY_LENGTH ;
175- }
176- #endif /* HAVE_PQM4 */
177171
178172 return ret ;
179173}
@@ -216,12 +210,6 @@ int wc_KyberKey_PublicKeySize(KyberKey* key, word32* len)
216210 }
217211 }
218212#endif /* HAVE_LIBOQS */
219- #ifdef HAVE_PQM4
220- (void )key ;
221- if (ret == 0 ) {
222- * len = PQM4_PUBLIC_KEY_LENGTH ;
223- }
224- #endif /* HAVE_PQM4 */
225213
226214 return ret ;
227215}
@@ -264,12 +252,6 @@ int wc_KyberKey_CipherTextSize(KyberKey* key, word32* len)
264252 }
265253 }
266254#endif /* HAVE_LIBOQS */
267- #ifdef HAVE_PQM4
268- (void )key ;
269- if (ret == 0 ) {
270- * len = PQM4_CIPHERTEXT_LENGTH ;
271- }
272- #endif /* HAVE_PQM4 */
273255
274256 return ret ;
275257}
@@ -301,7 +283,7 @@ int wc_KyberKey_SharedSecretSize(KyberKey* key, word32* len)
301283/**
302284 * Make a Kyber key object using a random number generator.
303285 *
304- * NOTE: rng is ignored. OQS and PQM4 don 't use our RNG.
286+ * NOTE: rng is ignored. OQS doesn 't use our RNG.
305287 *
306288 * @param [in, out] key Kyber key ovject.
307289 * @param [in] rng Random number generator.
@@ -362,14 +344,6 @@ int wc_KyberKey_MakeKey(KyberKey* key, WC_RNG* rng)
362344 wolfSSL_liboqsRngMutexUnlock ();
363345 OQS_KEM_free (kem );
364346#endif /* HAVE_LIBOQS */
365- #ifdef HAVE_PQM4
366- if (ret == 0 ) {
367- if (crypto_kem_keypair (key -> pub , key -> priv ) != 0 ) {
368- WOLFSSL_MSG ("PQM4 keygen failure" );
369- ret = BAD_FUNC_ARG ;
370- }
371- }
372- #endif /* HAVE_PQM4 */
373347
374348 if (ret != 0 ) {
375349 ForceZero (key , sizeof (* key ));
@@ -394,7 +368,7 @@ int wc_KyberKey_MakeKeyWithRandom(KyberKey* key, const unsigned char* rand,
394368{
395369 (void )rand ;
396370 (void )len ;
397- /* OQS and PQM4 don 't support external randomness. */
371+ /* OQS doesn 't support external randomness. */
398372 return wc_KyberKey_MakeKey (key , NULL );
399373}
400374
@@ -471,14 +445,6 @@ int wc_KyberKey_Encapsulate(KyberKey* key, unsigned char* ct, unsigned char* ss,
471445 wolfSSL_liboqsRngMutexUnlock ();
472446 OQS_KEM_free (kem );
473447#endif /* HAVE_LIBOQS */
474- #ifdef HAVE_PQM4
475- if (ret == 0 ) {
476- if (crypto_kem_enc (ct , ss , key -> pub ) != 0 ) {
477- WOLFSSL_MSG ("PQM4 Encapsulation failure." );
478- ret = BAD_FUNC_ARG ;
479- }
480- }
481- #endif /* HAVE_PQM4 */
482448
483449 return ret ;
484450}
@@ -501,7 +467,7 @@ int wc_KyberKey_EncapsulateWithRandom(KyberKey* key, unsigned char* ct,
501467{
502468 (void )rand ;
503469 (void )len ;
504- /* OQS and PQM4 don 't support external randomness. */
470+ /* OQS doesn 't support external randomness. */
505471 return wc_KyberKey_Encapsulate (key , ct , ss , NULL );
506472}
507473
@@ -577,14 +543,6 @@ int wc_KyberKey_Decapsulate(KyberKey* key, unsigned char* ss,
577543
578544 OQS_KEM_free (kem );
579545#endif /* HAVE_LIBOQS */
580- #ifdef HAVE_PQM4
581- if (ret == 0 ) {
582- if (crypto_kem_dec (ss , ct , key -> priv ) != 0 ) {
583- WOLFSSL_MSG ("PQM4 Decapsulation failure." );
584- ret = BAD_FUNC_ARG ;
585- }
586- }
587- #endif /* HAVE_PQM4 */
588546
589547 return ret ;
590548
0 commit comments