diff options
Diffstat (limited to 'secure/lib/libcrypto/man/EC_KEY_new.3')
-rw-r--r-- | secure/lib/libcrypto/man/EC_KEY_new.3 | 120 |
1 files changed, 62 insertions, 58 deletions
diff --git a/secure/lib/libcrypto/man/EC_KEY_new.3 b/secure/lib/libcrypto/man/EC_KEY_new.3 index aa156b2ac6e25..183139d4dfbe4 100644 --- a/secure/lib/libcrypto/man/EC_KEY_new.3 +++ b/secure/lib/libcrypto/man/EC_KEY_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) +.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -54,16 +54,20 @@ .\" Avoid warning from groff about undefined register 'F'. .de IX .. -.if !\nF .nr F 0 -.if \nF>0 \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{\ -. nr % 0 -. nr F 2 +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} . \} .\} +.rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. @@ -129,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EC_KEY_NEW 3" -.TH EC_KEY_NEW 3 "2018-11-20" "1.1.1a" "OpenSSL" +.TH EC_KEY_NEW 3 "2019-02-26" "1.1.1b" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -180,121 +184,121 @@ EC_KEY_get_method, EC_KEY_set_method, EC_KEY_new, EC_KEY_get_flags, EC_KEY_set_f .IX Header "DESCRIPTION" An \s-1EC_KEY\s0 represents a public key and, optionally, the associated private key. A new \s-1EC_KEY\s0 with no associated curve can be constructed by calling -\&\fIEC_KEY_new()\fR. The reference count for the newly created \s-1EC_KEY\s0 is initially +\&\fBEC_KEY_new()\fR. The reference count for the newly created \s-1EC_KEY\s0 is initially set to 1. A curve can be associated with the \s-1EC_KEY\s0 by calling -\&\fIEC_KEY_set_group()\fR. +\&\fBEC_KEY_set_group()\fR. .PP Alternatively a new \s-1EC_KEY\s0 can be constructed by calling -\&\fIEC_KEY_new_by_curve_name()\fR and supplying the nid of the associated curve. See -\&\fIEC_GROUP_new\fR\|(3) for a description of curve names. This function simply -wraps calls to \fIEC_KEY_new()\fR and \fIEC_GROUP_new_by_curve_name()\fR. +\&\fBEC_KEY_new_by_curve_name()\fR and supplying the nid of the associated curve. See +\&\fBEC_GROUP_new\fR\|(3) for a description of curve names. This function simply +wraps calls to \fBEC_KEY_new()\fR and \fBEC_GROUP_new_by_curve_name()\fR. .PP -Calling \fIEC_KEY_free()\fR decrements the reference count for the \s-1EC_KEY\s0 object, +Calling \fBEC_KEY_free()\fR decrements the reference count for the \s-1EC_KEY\s0 object, and if it has dropped to zero then frees the memory associated with it. If \&\fBkey\fR is \s-1NULL\s0 nothing is done. .PP -\&\fIEC_KEY_copy()\fR copies the contents of the \s-1EC_KEY\s0 in \fBsrc\fR into \fBdest\fR. +\&\fBEC_KEY_copy()\fR copies the contents of the \s-1EC_KEY\s0 in \fBsrc\fR into \fBdest\fR. .PP -\&\fIEC_KEY_dup()\fR creates a new \s-1EC_KEY\s0 object and copies \fBec_key\fR into it. +\&\fBEC_KEY_dup()\fR creates a new \s-1EC_KEY\s0 object and copies \fBec_key\fR into it. .PP -\&\fIEC_KEY_up_ref()\fR increments the reference count associated with the \s-1EC_KEY\s0 +\&\fBEC_KEY_up_ref()\fR increments the reference count associated with the \s-1EC_KEY\s0 object. .PP -\&\fIEC_KEY_get0_engine()\fR returns a handle to the \s-1ENGINE\s0 that has been set for +\&\fBEC_KEY_get0_engine()\fR returns a handle to the \s-1ENGINE\s0 that has been set for this \s-1EC_KEY\s0 object. .PP -\&\fIEC_KEY_generate_key()\fR generates a new public and private key for the supplied +\&\fBEC_KEY_generate_key()\fR generates a new public and private key for the supplied \&\fBeckey\fR object. \fBeckey\fR must have an \s-1EC_GROUP\s0 object associated with it before calling this function. The private key is a random integer (0 < priv_key < order, where \fIorder\fR is the order of the \s-1EC_GROUP\s0 object). The public key is an \s-1EC_POINT\s0 on the curve calculated by multiplying the generator for the curve by the private key. .PP -\&\fIEC_KEY_check_key()\fR performs various sanity checks on the \s-1EC_KEY\s0 object to +\&\fBEC_KEY_check_key()\fR performs various sanity checks on the \s-1EC_KEY\s0 object to confirm that it is valid. .PP -\&\fIEC_KEY_set_public_key_affine_coordinates()\fR sets the public key for \fBkey\fR based +\&\fBEC_KEY_set_public_key_affine_coordinates()\fR sets the public key for \fBkey\fR based on its affine co-ordinates; i.e., it constructs an \s-1EC_POINT\s0 object based on the supplied \fBx\fR and \fBy\fR values and sets the public key to be this \&\s-1EC_POINT.\s0 It also performs certain sanity checks on the key to confirm that it is valid. .PP -The functions \fIEC_KEY_get0_group()\fR, \fIEC_KEY_set_group()\fR, -\&\fIEC_KEY_get0_private_key()\fR, \fIEC_KEY_set_private_key()\fR, \fIEC_KEY_get0_public_key()\fR, -and \fIEC_KEY_set_public_key()\fR get and set the \s-1EC_GROUP\s0 object, the private key, +The functions \fBEC_KEY_get0_group()\fR, \fBEC_KEY_set_group()\fR, +\&\fBEC_KEY_get0_private_key()\fR, \fBEC_KEY_set_private_key()\fR, \fBEC_KEY_get0_public_key()\fR, +and \fBEC_KEY_set_public_key()\fR get and set the \s-1EC_GROUP\s0 object, the private key, and the \s-1EC_POINT\s0 public key for the \fBkey\fR respectively. .PP -The functions \fIEC_KEY_get_conv_form()\fR and \fIEC_KEY_set_conv_form()\fR get and set the +The functions \fBEC_KEY_get_conv_form()\fR and \fBEC_KEY_set_conv_form()\fR get and set the point_conversion_form for the \fBkey\fR. For a description of -point_conversion_forms please see \fIEC_POINT_new\fR\|(3). +point_conversion_forms please see \fBEC_POINT_new\fR\|(3). .PP -\&\fIEC_KEY_set_flags()\fR sets the flags in the \fBflags\fR parameter on the \s-1EC_KEY\s0 +\&\fBEC_KEY_set_flags()\fR sets the flags in the \fBflags\fR parameter on the \s-1EC_KEY\s0 object. Any flags that are already set are left set. The flags currently defined are \s-1EC_FLAG_NON_FIPS_ALLOW\s0 and \s-1EC_FLAG_FIPS_CHECKED.\s0 In addition there is the flag \s-1EC_FLAG_COFACTOR_ECDH\s0 which is specific to \s-1ECDH.\s0 -\&\fIEC_KEY_get_flags()\fR returns the current flags that are set for this \s-1EC_KEY.\s0 -\&\fIEC_KEY_clear_flags()\fR clears the flags indicated by the \fBflags\fR parameter; all +\&\fBEC_KEY_get_flags()\fR returns the current flags that are set for this \s-1EC_KEY.\s0 +\&\fBEC_KEY_clear_flags()\fR clears the flags indicated by the \fBflags\fR parameter; all other flags are left in their existing state. .PP -\&\fIEC_KEY_set_asn1_flag()\fR sets the asn1_flag on the underlying \s-1EC_GROUP\s0 object -(if set). Refer to \fIEC_GROUP_copy\fR\|(3) for further information on the +\&\fBEC_KEY_set_asn1_flag()\fR sets the asn1_flag on the underlying \s-1EC_GROUP\s0 object +(if set). Refer to \fBEC_GROUP_copy\fR\|(3) for further information on the asn1_flag. .PP -\&\fIEC_KEY_precompute_mult()\fR stores multiples of the underlying \s-1EC_GROUP\s0 generator -for faster point multiplication. See also \fIEC_POINT_add\fR\|(3). +\&\fBEC_KEY_precompute_mult()\fR stores multiples of the underlying \s-1EC_GROUP\s0 generator +for faster point multiplication. See also \fBEC_POINT_add\fR\|(3). .PP -\&\fIEC_KEY_oct2key()\fR and \fIEC_KEY_key2buf()\fR are identical to the functions -\&\fIEC_POINT_oct2point()\fR and \fIEC_KEY_point2buf()\fR except they use the public key +\&\fBEC_KEY_oct2key()\fR and \fBEC_KEY_key2buf()\fR are identical to the functions +\&\fBEC_POINT_oct2point()\fR and \fBEC_KEY_point2buf()\fR except they use the public key \&\s-1EC_POINT\s0 in \fBeckey\fR. .PP -\&\fIEC_KEY_oct2priv()\fR and \fIEC_KEY_priv2oct()\fR convert between the private key +\&\fBEC_KEY_oct2priv()\fR and \fBEC_KEY_priv2oct()\fR convert between the private key component of \fBeckey\fR and octet form. The octet form consists of the content octets of the \fBprivateKey\fR \s-1OCTET STRING\s0 in an \fBECPrivateKey\fR \s-1ASN.1\s0 structure. .PP -The function \fIEC_KEY_priv2oct()\fR must be supplied with a buffer long enough to +The function \fBEC_KEY_priv2oct()\fR must be supplied with a buffer long enough to store the octet form. The return value provides the number of octets stored. Calling the function with a \s-1NULL\s0 buffer will not perform the conversion but will just return the required buffer length. .PP -The function \fIEC_KEY_priv2buf()\fR allocates a buffer of suitable length and writes +The function \fBEC_KEY_priv2buf()\fR allocates a buffer of suitable length and writes an \s-1EC_KEY\s0 to it in octet format. The allocated buffer is written to \fB*pbuf\fR and its length is returned. The caller must free up the allocated buffer with a -call to \fIOPENSSL_free()\fR. Since the allocated buffer value is written to \fB*pbuf\fR +call to \fBOPENSSL_free()\fR. Since the allocated buffer value is written to \fB*pbuf\fR the \fBpbuf\fR parameter \fB\s-1MUST NOT\s0\fR be \fB\s-1NULL\s0\fR. .PP -\&\fIEC_KEY_priv2buf()\fR converts an \s-1EC_KEY\s0 private key into an allocated buffer. +\&\fBEC_KEY_priv2buf()\fR converts an \s-1EC_KEY\s0 private key into an allocated buffer. .SH "RETURN VALUES" .IX Header "RETURN VALUES" -\&\fIEC_KEY_new()\fR, \fIEC_KEY_new_by_curve_name()\fR and \fIEC_KEY_dup()\fR return a pointer to +\&\fBEC_KEY_new()\fR, \fBEC_KEY_new_by_curve_name()\fR and \fBEC_KEY_dup()\fR return a pointer to the newly created \s-1EC_KEY\s0 object, or \s-1NULL\s0 on error. .PP -\&\fIEC_KEY_get_flags()\fR returns the flags associated with the \s-1EC_KEY\s0 object as an +\&\fBEC_KEY_get_flags()\fR returns the flags associated with the \s-1EC_KEY\s0 object as an integer. .PP -\&\fIEC_KEY_copy()\fR returns a pointer to the destination key, or \s-1NULL\s0 on error. +\&\fBEC_KEY_copy()\fR returns a pointer to the destination key, or \s-1NULL\s0 on error. .PP -\&\fIEC_KEY_get0_engine()\fR returns a pointer to an \s-1ENGINE,\s0 or \s-1NULL\s0 if it wasn't set. +\&\fBEC_KEY_get0_engine()\fR returns a pointer to an \s-1ENGINE,\s0 or \s-1NULL\s0 if it wasn't set. .PP -\&\fIEC_KEY_up_ref()\fR, \fIEC_KEY_set_group()\fR, \fIEC_KEY_set_private_key()\fR, -\&\fIEC_KEY_set_public_key()\fR, \fIEC_KEY_precompute_mult()\fR, \fIEC_KEY_generate_key()\fR, -\&\fIEC_KEY_check_key()\fR, \fIEC_KEY_set_public_key_affine_coordinates()\fR, -\&\fIEC_KEY_oct2key()\fR and \fIEC_KEY_oct2priv()\fR return 1 on success or 0 on error. +\&\fBEC_KEY_up_ref()\fR, \fBEC_KEY_set_group()\fR, \fBEC_KEY_set_private_key()\fR, +\&\fBEC_KEY_set_public_key()\fR, \fBEC_KEY_precompute_mult()\fR, \fBEC_KEY_generate_key()\fR, +\&\fBEC_KEY_check_key()\fR, \fBEC_KEY_set_public_key_affine_coordinates()\fR, +\&\fBEC_KEY_oct2key()\fR and \fBEC_KEY_oct2priv()\fR return 1 on success or 0 on error. .PP -\&\fIEC_KEY_get0_group()\fR returns the \s-1EC_GROUP\s0 associated with the \s-1EC_KEY.\s0 +\&\fBEC_KEY_get0_group()\fR returns the \s-1EC_GROUP\s0 associated with the \s-1EC_KEY.\s0 .PP -\&\fIEC_KEY_get0_private_key()\fR returns the private key associated with the \s-1EC_KEY.\s0 +\&\fBEC_KEY_get0_private_key()\fR returns the private key associated with the \s-1EC_KEY.\s0 .PP -\&\fIEC_KEY_get_conv_form()\fR return the point_conversion_form for the \s-1EC_KEY.\s0 +\&\fBEC_KEY_get_conv_form()\fR return the point_conversion_form for the \s-1EC_KEY.\s0 .PP -\&\fIEC_KEY_key2buf()\fR, \fIEC_KEY_priv2oct()\fR and \fIEC_KEY_priv2buf()\fR return the length +\&\fBEC_KEY_key2buf()\fR, \fBEC_KEY_priv2oct()\fR and \fBEC_KEY_priv2buf()\fR return the length of the buffer or 0 on error. .SH "SEE ALSO" .IX Header "SEE ALSO" -\&\fIcrypto\fR\|(7), \fIEC_GROUP_new\fR\|(3), -\&\fIEC_GROUP_copy\fR\|(3), \fIEC_POINT_new\fR\|(3), -\&\fIEC_POINT_add\fR\|(3), -\&\fIEC_GFp_simple_method\fR\|(3), -\&\fId2i_ECPKParameters\fR\|(3) +\&\fBcrypto\fR\|(7), \fBEC_GROUP_new\fR\|(3), +\&\fBEC_GROUP_copy\fR\|(3), \fBEC_POINT_new\fR\|(3), +\&\fBEC_POINT_add\fR\|(3), +\&\fBEC_GFp_simple_method\fR\|(3), +\&\fBd2i_ECPKParameters\fR\|(3) .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2013\-2017 The OpenSSL Project Authors. All Rights Reserved. |