Changes inspired by Feedback from Sean.

Define WOLFSSL_HAVE_KYBER when HAVE_LIBOQS is defined.
Fix some misleading debug output.
Fix benchmarking logic.
This commit is contained in:
Anthony Hu
2022-09-12 13:33:39 -04:00
parent a2635be9e6
commit bcf4dbe697
3 changed files with 11 additions and 6 deletions

View File

@@ -8195,7 +8195,7 @@ static int TLSX_KeyShare_ProcessPqc(WOLFSSL* ssl, KeyShareEntry* keyShareEntry)
ret = wc_KyberKey_Decapsulate(kem, sharedSecret + outlen,
keyShareEntry->ke + keyShareEntry->keLen - ctSz, ctSz);
if (ret != 0) {
WOLFSSL_MSG("Kyber decapsulation failure.");
WOLFSSL_MSG("wc_KyberKey decapsulation failure.");
ret = BAD_FUNC_ARG;
}
}
@@ -9015,7 +9015,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
ret = wc_KyberKey_Encapsulate(kem, ciphertext + ecc_kse->pubKeyLen,
sharedSecret + outlen, ssl->rng);
if (ret != 0) {
WOLFSSL_MSG("OQS Encapsulation failure.");
WOLFSSL_MSG("wc_KyberKey encapsulation failure.");
}
}