summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-02-17 13:00:34 +1000
committerShane Lontis <shane.lontis@oracle.com>2021-02-22 13:31:31 +1000
commit4718326a46ad460fefc5cc240a8599af4b5993c7 (patch)
treebe4beed6f52122d46ebba91baf9fb59ba586f918 /include
parent681618cfc18b4f01f2c07e823308d30f6f47504b (diff)
Add EVP_PKEY_public_check_quick.
Adding the EVP_PKEY_param_check_quick() reminded me that there are also partial checks for public keys as part of SP800-56A for FFC (DH named safe prime groups) and ECC. The code was mainly already there and just needed to be plumbed into the validate methods. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14206)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/dh.h1
-rw-r--r--include/crypto/ec.h1
-rw-r--r--include/openssl/evp.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/dh.h b/include/crypto/dh.h
index 5673bb7ad3..eca2a03056 100644
--- a/include/crypto/dh.h
+++ b/include/crypto/dh.h
@@ -28,6 +28,7 @@ int dh_get_named_group_uid_from_size(int pbits);
const char *dh_gen_type_id2name(int id);
int dh_gen_type_name2id(const char *name);
void dh_cache_named_group(DH *dh);
+int ossl_dh_is_named_safe_prime_group(const DH *dh);
FFC_PARAMS *dh_get0_params(DH *dh);
int dh_get0_nid(const DH *dh);
diff --git a/include/crypto/ec.h b/include/crypto/ec.h
index 682311b26d..347474a37b 100644
--- a/include/crypto/ec.h
+++ b/include/crypto/ec.h
@@ -60,6 +60,7 @@ int ecdh_KDF_X9_63(unsigned char *out, size_t outlen,
const EVP_MD *md, OSSL_LIB_CTX *libctx, const char *propq);
int ec_key_public_check(const EC_KEY *eckey, BN_CTX *ctx);
+int ec_key_public_check_quick(const EC_KEY *eckey, BN_CTX *ctx);
int ec_key_private_check(const EC_KEY *eckey);
int ec_key_pairwise_check(const EC_KEY *eckey, BN_CTX *ctx);
OSSL_LIB_CTX *ec_key_get_libctx(const EC_KEY *eckey);
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index aeff6de4f7..bdce18c5ee 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -1827,6 +1827,7 @@ int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
int EVP_PKEY_gen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
+int EVP_PKEY_public_check_quick(EVP_PKEY_CTX *ctx);
int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
int EVP_PKEY_param_check_quick(EVP_PKEY_CTX *ctx);
int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx);