mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Restore the PCTs to ECC and DH.
This commit is contained in:
committed by
Daniel Pouzzner
parent
1065d2accf
commit
5d7c6dda72
@ -1357,6 +1357,8 @@ static int wc_DhGenerateKeyPair_Sync(DhKey* key, WC_RNG* rng,
|
||||
ret = GeneratePublicDh(key, priv, *privSz, pub, pubSz);
|
||||
if (ret == 0)
|
||||
ret = _ffc_validate_public_key(key, pub, *pubSz, NULL, 0, 0);
|
||||
if (ret == 0)
|
||||
ret = _ffc_pairwise_consistency_test(key, pub, *pubSz, priv, *privSz);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -4829,6 +4829,11 @@ int wc_ecc_make_key_ex2(WC_RNG* rng, int keysize, ecc_key* key, int curve_id,
|
||||
if (err == MP_OKAY) {
|
||||
err = _ecc_validate_public_key(key, 0, 0);
|
||||
}
|
||||
#if defined(WOLFSSL_VALIDATE_ECC_KEYGEN) || defined(WOLFSSL_VALIDATE_ECC_IMPORT)
|
||||
if (err == MP_OKAY) {
|
||||
err = _ecc_pairwise_consistency_test(key);
|
||||
}
|
||||
#endif
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user