xref: /freebsd-src/crypto/openssl/doc/man3/EC_KEY_get_enc_flags.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimEC_KEY_get_enc_flags, EC_KEY_set_enc_flags
6e71b7053SJung-uk Kim- Get and set flags for encoding EC_KEY structures
7e71b7053SJung-uk Kim
8e71b7053SJung-uk Kim=head1 SYNOPSIS
9e71b7053SJung-uk Kim
10e71b7053SJung-uk Kim #include <openssl/ec.h>
11e71b7053SJung-uk Kim
12e71b7053SJung-uk Kim unsigned int EC_KEY_get_enc_flags(const EC_KEY *key);
13e71b7053SJung-uk Kim void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
14e71b7053SJung-uk Kim
15e71b7053SJung-uk Kim=head1 DESCRIPTION
16e71b7053SJung-uk Kim
17e71b7053SJung-uk KimThe format of the external representation of the public key written by
18e71b7053SJung-uk Kimi2d_ECPrivateKey() (such as whether it is stored in a compressed form or not) is
19e71b7053SJung-uk Kimdescribed by the point_conversion_form. See L<EC_GROUP_copy(3)>
20e71b7053SJung-uk Kimfor a description of point_conversion_form.
21e71b7053SJung-uk Kim
22e71b7053SJung-uk KimWhen reading a private key encoded without an associated public key (e.g. if
23e71b7053SJung-uk KimEC_PKEY_NO_PUBKEY has been used - see below), then d2i_ECPrivateKey() generates
24e71b7053SJung-uk Kimthe missing public key automatically. Private keys encoded without parameters
25e71b7053SJung-uk Kim(e.g. if EC_PKEY_NO_PARAMETERS has been used - see below) cannot be loaded using
26e71b7053SJung-uk Kimd2i_ECPrivateKey().
27e71b7053SJung-uk Kim
28e71b7053SJung-uk KimThe functions EC_KEY_get_enc_flags() and EC_KEY_set_enc_flags() get and set the
29e71b7053SJung-uk Kimvalue of the encoding flags for the B<key>. There are two encoding flags
30e71b7053SJung-uk Kimcurrently defined - EC_PKEY_NO_PARAMETERS and EC_PKEY_NO_PUBKEY.  These flags
31e71b7053SJung-uk Kimdefine the behaviour of how the  B<key> is converted into ASN1 in a call to
32e71b7053SJung-uk Kimi2d_ECPrivateKey(). If EC_PKEY_NO_PARAMETERS is set then the public parameters for
33e71b7053SJung-uk Kimthe curve are not encoded along with the private key. If EC_PKEY_NO_PUBKEY is
34e71b7053SJung-uk Kimset then the public key is not encoded along with the private key.
35e71b7053SJung-uk Kim
36e71b7053SJung-uk Kim=head1 RETURN VALUES
37e71b7053SJung-uk Kim
38e71b7053SJung-uk KimEC_KEY_get_enc_flags() returns the value of the current encoding flags for the
39e71b7053SJung-uk KimEC_KEY.
40e71b7053SJung-uk Kim
41e71b7053SJung-uk Kim=head1 SEE ALSO
42e71b7053SJung-uk Kim
43e71b7053SJung-uk KimL<crypto(7)>, L<EC_GROUP_new(3)>,
44e71b7053SJung-uk KimL<EC_GROUP_copy(3)>, L<EC_POINT_new(3)>,
45e71b7053SJung-uk KimL<EC_POINT_add(3)>,
46e71b7053SJung-uk KimL<EC_GFp_simple_method(3)>,
47e71b7053SJung-uk KimL<d2i_ECPKParameters(3)>,
48e71b7053SJung-uk KimL<d2i_ECPrivateKey(3)>
49e71b7053SJung-uk Kim
50e71b7053SJung-uk Kim=head1 COPYRIGHT
51e71b7053SJung-uk Kim
52e71b7053SJung-uk KimCopyright 2015-2017 The OpenSSL Project Authors. All Rights Reserved.
53e71b7053SJung-uk Kim
54*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
55e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
56e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
57e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
58e71b7053SJung-uk Kim
59e71b7053SJung-uk Kim=cut
60