1EVP_PKEY_CHECK(3ossl)               OpenSSL              EVP_PKEY_CHECK(3ossl)
2
3
4

NAME

6       EVP_PKEY_check, EVP_PKEY_param_check, EVP_PKEY_param_check_quick,
7       EVP_PKEY_public_check, EVP_PKEY_public_check_quick,
8       EVP_PKEY_private_check, EVP_PKEY_pairwise_check - key and parameter
9       validation functions
10

SYNOPSIS

12        #include <openssl/evp.h>
13
14        int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
15        int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
16        int EVP_PKEY_param_check_quick(EVP_PKEY_CTX *ctx);
17        int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
18        int EVP_PKEY_public_check_quick(EVP_PKEY_CTX *ctx);
19        int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx);
20        int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx);
21

DESCRIPTION

23       EVP_PKEY_param_check() validates the parameters component of the key
24       given by ctx. This check will always succeed for key types that do not
25       have parameters.
26
27       EVP_PKEY_param_check_quick() validates the parameters component of the
28       key given by ctx like EVP_PKEY_param_check() does. However some
29       algorithm implementations may offer a quicker form of validation that
30       omits some checks in order to perform a lightweight sanity check of the
31       key. If a quicker form is not provided then this function call does the
32       same thing as EVP_PKEY_param_check().
33
34       EVP_PKEY_public_check() validates the public component of the key given
35       by ctx.
36
37       EVP_PKEY_public_check_quick() validates the public component of the key
38       given by ctx like EVP_PKEY_public_check() does. However some algorithm
39       implementations may offer a quicker form of validation that omits some
40       checks in order to perform a lightweight sanity check of the key. If a
41       quicker form is not provided then this function call does the same
42       thing as EVP_PKEY_public_check().
43
44       EVP_PKEY_private_check() validates the private component of the key
45       given by ctx.
46
47       EVP_PKEY_pairwise_check() validates that the public and private
48       components have the correct mathematical relationship to each other for
49       the key given by ctx.
50
51       EVP_PKEY_check() is an alias for the EVP_PKEY_pairwise_check()
52       function.
53

NOTES

55       Key validation used by the OpenSSL FIPS provider complies with the
56       rules within SP800-56A and SP800-56B. For backwards compatibility
57       reasons the OpenSSL default provider may use checks that are not as
58       restrictive for certain key types.  For further information see "DSA
59       key validation" in EVP_PKEY-DSA(7), "DH key validation" in
60       EVP_PKEY-DH(7), "EC key validation" in EVP_PKEY-EC(7) and "RSA key
61       validation" in EVP_PKEY-RSA(7).
62
63       Refer to SP800-56A and SP800-56B for rules relating to when these
64       functions should be called during key establishment.  It is not
65       necessary to call these functions after locally calling an approved key
66       generation method, but may be required for assurance purposes when
67       receiving keys from a third party.
68

RETURN VALUES

70       All functions return 1 for success or others for failure.  They return
71       -2 if the operation is not supported for the specific algorithm.
72

SEE ALSO

74       EVP_PKEY_CTX_new(3), EVP_PKEY_fromdata(3), EVP_PKEY-DH(7),
75       EVP_PKEY-FFC(7), EVP_PKEY-DSA(7), EVP_PKEY-EC(7), EVP_PKEY-RSA(7),
76

HISTORY

78       EVP_PKEY_check(), EVP_PKEY_public_check() and EVP_PKEY_param_check()
79       were added in OpenSSL 1.1.1.
80
81       EVP_PKEY_param_check_quick(), EVP_PKEY_public_check_quick(),
82       EVP_PKEY_private_check() and EVP_PKEY_pairwise_check() were added in
83       OpenSSL 3.0.
84
86       Copyright 2006-2022 The OpenSSL Project Authors. All Rights Reserved.
87
88       Licensed under the Apache License 2.0 (the "License").  You may not use
89       this file except in compliance with the License.  You can obtain a copy
90       in the file LICENSE in the source distribution or at
91       <https://www.openssl.org/source/license.html>.
92
93
94
953.0.9                             2023-07-27             EVP_PKEY_CHECK(3ossl)
Impressum