1EVP_PKEY_CMP(3)                     OpenSSL                    EVP_PKEY_CMP(3)
2
3
4

NAME

6       EVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters,
7       EVP_PKEY_cmp_parameters, EVP_PKEY_cmp - public key parameter and
8       comparison functions
9

SYNOPSIS

11        #include <openssl/evp.h>
12
13        int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
14        int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
15
16        int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
17        int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
18

DESCRIPTION

20       The function EVP_PKEY_missing_parameters() returns 1 if the public key
21       parameters of pkey are missing and 0 if they are present or the
22       algorithm doesn't use parameters.
23
24       The function EVP_PKEY_copy_parameters() copies the parameters from key
25       from to key to. An error is returned if the parameters are missing in
26       from or present in both from and to and mismatch. If the parameters in
27       from and to are both present and match this function has no effect.
28
29       The function EVP_PKEY_cmp_parameters() compares the parameters of keys
30       a and b.
31
32       The function EVP_PKEY_cmp() compares the public key components and
33       parameters (if present) of keys a and b.
34

NOTES

36       The main purpose of the functions EVP_PKEY_missing_parameters() and
37       EVP_PKEY_copy_parameters() is to handle public keys in certificates
38       where the parameters are sometimes omitted from a public key if they
39       are inherited from the CA that signed it.
40
41       Since OpenSSL private keys contain public key components too the
42       function EVP_PKEY_cmp() can also be used to determine if a private key
43       matches a public key.
44

RETURN VALUES

46       The function EVP_PKEY_missing_parameters() returns 1 if the public key
47       parameters of pkey are missing and 0 if they are present or the
48       algorithm doesn't use parameters.
49
50       These functions EVP_PKEY_copy_parameters() returns 1 for success and 0
51       for failure.
52
53       The function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if
54       the keys match, 0 if they don't match, -1 if the key types are
55       different and -2 if the operation is not supported.
56

SEE ALSO

58       EVP_PKEY_CTX_new(3), EVP_PKEY_keygen(3)
59
61       Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
62
63       Licensed under the OpenSSL license (the "License").  You may not use
64       this file except in compliance with the License.  You can obtain a copy
65       in the file LICENSE in the source distribution or at
66       <https://www.openssl.org/source/license.html>.
67
68
69
701.1.1l                            2021-09-15                   EVP_PKEY_CMP(3)
Impressum