]>
Commit | Line | Data |
---|---|---|
93b83d06 MC |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
4692340e RS |
5 | EC_KEY_get_enc_flags, EC_KEY_set_enc_flags |
6 | - Get and set flags for encoding EC_KEY structures | |
93b83d06 MC |
7 | |
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/ec.h> | |
11 | ||
93b83d06 MC |
12 | unsigned int EC_KEY_get_enc_flags(const EC_KEY *key); |
13 | void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags); | |
14 | ||
15 | =head1 DESCRIPTION | |
16 | ||
93b83d06 | 17 | The format of the external representation of the public key written by |
4692340e | 18 | i2d_ECPrivateKey() (such as whether it is stored in a compressed form or not) is |
9b86974e | 19 | described by the point_conversion_form. See L<EC_GROUP_copy(3)> |
93b83d06 MC |
20 | for a description of point_conversion_form. |
21 | ||
22 | When reading a private key encoded without an associated public key (e.g. if | |
4692340e | 23 | EC_PKEY_NO_PUBKEY has been used - see below), then d2i_ECPrivateKey() generates |
93b83d06 | 24 | the missing public key automatically. Private keys encoded without parameters |
12e0ea30 | 25 | (e.g. if EC_PKEY_NO_PARAMETERS has been used - see below) cannot be loaded using |
4692340e | 26 | d2i_ECPrivateKey(). |
93b83d06 | 27 | |
4692340e | 28 | The functions EC_KEY_get_enc_flags() and EC_KEY_set_enc_flags() get and set the |
93b83d06 MC |
29 | value of the encoding flags for the B<key>. There are two encoding flags |
30 | currently defined - EC_PKEY_NO_PARAMETERS and EC_PKEY_NO_PUBKEY. These flags | |
31 | define the behaviour of how the B<key> is converted into ASN1 in a call to | |
4692340e | 32 | i2d_ECPrivateKey(). If EC_PKEY_NO_PARAMETERS is set then the public parameters for |
93b83d06 MC |
33 | the curve are not encoded along with the private key. If EC_PKEY_NO_PUBKEY is |
34 | set then the public key is not encoded along with the private key. | |
35 | ||
36 | =head1 RETURN VALUES | |
37 | ||
4692340e | 38 | EC_KEY_get_enc_flags() returns the value of the current encoding flags for the |
93b83d06 MC |
39 | EC_KEY. |
40 | ||
41 | =head1 SEE ALSO | |
42 | ||
9e183d22 | 43 | L<crypto(7)>, L<EC_GROUP_new(3)>, |
9b86974e RS |
44 | L<EC_GROUP_copy(3)>, L<EC_POINT_new(3)>, |
45 | L<EC_POINT_add(3)>, | |
46 | L<EC_GFp_simple_method(3)>, | |
47 | L<d2i_ECPKParameters(3)>, | |
48 | L<d2i_ECPrivateKey(3)> | |
93b83d06 | 49 | |
e2f92610 RS |
50 | =head1 COPYRIGHT |
51 | ||
9e183d22 | 52 | Copyright 2015-2017 The OpenSSL Project Authors. All Rights Reserved. |
e2f92610 | 53 | |
4746f25a | 54 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
55 | this file except in compliance with the License. You can obtain a copy |
56 | in the file LICENSE in the source distribution or at | |
57 | L<https://www.openssl.org/source/license.html>. | |
58 | ||
59 | =cut |