88d0ebdd36054884691ae41b8ac029faf45bca04
[openssl.git] / doc / man7 / EVP_PKEY-EC.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_PKEY-EC - EVP_PKEY EC keytype and algorithm support
6
7 =head1 DESCRIPTION
8
9 The B<EC> keytype is implemented in OpenSSL's default provider.
10
11 =head2 Common EC parameters
12
13 The following Import/Export types are available for the built-in EC algorithm:
14
15 =over 4
16
17 =item "curve-name" (B<OSSL_PKEY_PARAM_EC_NAME>) <utf8 string>
18
19 The EC curve name.
20
21 =item "use-cofactor-flag" (B<OSSL_PKEY_PARAM_USE_COFACTOR_ECDH>) <integer>
22
23 Enable Cofactor DH (ECC CDH) if this value is 1, otherwise it uses normal EC DH
24 if the value is zero. The cofactor variant multiplies the shared secret by the
25 EC curve's cofactor (note for some curves the cofactor is 1).
26
27 =for comment The following link should become L<EVP_KEYEXCH-ECDH(7)>
28
29 See also L<provider-keyexch(7)> for the related
30 B<OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE> parameter that can be set on a
31 per-operation basis.
32
33 =item "pub" (B<OSSL_PKEY_PARAM_PUB_KEY>) <octet string>
34
35 The public key value in EC point format.
36
37 =item "priv" (B<OSSL_PKEY_PARAM_PRIV_KEY>) <unsigned integer>
38
39 The private key value.
40
41 =back
42
43 =head1 EXAMPLES
44
45 An B<EVP_PKEY> context can be obtained by calling:
46
47     EVP_PKEY_CTX *pctx =
48         EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL);
49
50 =head1 SEE ALSO
51
52 L<EVP_KEYMGMT(3)>, L<EVP_PKEY(3)>, L<provider-keymgmt(7)>,
53 L<EVP_SIGNATURE-ECDSA(7)>, L<EVP_KEYEXCH-ECDH(7)>
54
55 =head1 COPYRIGHT
56
57 Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
58
59 Licensed under the Apache License 2.0 (the "License").  You may not use
60 this file except in compliance with the License.  You can obtain a copy
61 in the file LICENSE in the source distribution or at
62 L<https://www.openssl.org/source/license.html>.
63
64 =cut