diff options
Diffstat (limited to 'src/lib/libcrypto/man/DH_generate_parameters.3')
| -rw-r--r-- | src/lib/libcrypto/man/DH_generate_parameters.3 | 188 |
1 files changed, 0 insertions, 188 deletions
diff --git a/src/lib/libcrypto/man/DH_generate_parameters.3 b/src/lib/libcrypto/man/DH_generate_parameters.3 deleted file mode 100644 index accdf116f5..0000000000 --- a/src/lib/libcrypto/man/DH_generate_parameters.3 +++ /dev/null | |||
| @@ -1,188 +0,0 @@ | |||
| 1 | .\" $OpenBSD: DH_generate_parameters.3,v 1.13 2019/06/10 14:58:48 schwarze Exp $ | ||
| 2 | .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 | ||
| 3 | .\" | ||
| 4 | .\" This file was written by Ulf Moeller <ulf@openssl.org>. | ||
| 5 | .\" Copyright (c) 2000, 2016 The OpenSSL Project. All rights reserved. | ||
| 6 | .\" | ||
| 7 | .\" Redistribution and use in source and binary forms, with or without | ||
| 8 | .\" modification, are permitted provided that the following conditions | ||
| 9 | .\" are met: | ||
| 10 | .\" | ||
| 11 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 12 | .\" notice, this list of conditions and the following disclaimer. | ||
| 13 | .\" | ||
| 14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 15 | .\" notice, this list of conditions and the following disclaimer in | ||
| 16 | .\" the documentation and/or other materials provided with the | ||
| 17 | .\" distribution. | ||
| 18 | .\" | ||
| 19 | .\" 3. All advertising materials mentioning features or use of this | ||
| 20 | .\" software must display the following acknowledgment: | ||
| 21 | .\" "This product includes software developed by the OpenSSL Project | ||
| 22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 23 | .\" | ||
| 24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 25 | .\" endorse or promote products derived from this software without | ||
| 26 | .\" prior written permission. For written permission, please contact | ||
| 27 | .\" openssl-core@openssl.org. | ||
| 28 | .\" | ||
| 29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 31 | .\" permission of the OpenSSL Project. | ||
| 32 | .\" | ||
| 33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 34 | .\" acknowledgment: | ||
| 35 | .\" "This product includes software developed by the OpenSSL Project | ||
| 36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 37 | .\" | ||
| 38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 50 | .\" | ||
| 51 | .Dd $Mdocdate: June 10 2019 $ | ||
| 52 | .Dt DH_GENERATE_PARAMETERS 3 | ||
| 53 | .Os | ||
| 54 | .Sh NAME | ||
| 55 | .Nm DH_generate_parameters_ex , | ||
| 56 | .Nm DH_check , | ||
| 57 | .Nm DH_generate_parameters | ||
| 58 | .Nd generate and check Diffie-Hellman parameters | ||
| 59 | .Sh SYNOPSIS | ||
| 60 | .In openssl/dh.h | ||
| 61 | .Ft int | ||
| 62 | .Fo DH_generate_parameters_ex | ||
| 63 | .Fa "DH *dh" | ||
| 64 | .Fa "int prime_len" | ||
| 65 | .Fa "int generator" | ||
| 66 | .Fa "BN_GENCB *cb" | ||
| 67 | .Fc | ||
| 68 | .Ft int | ||
| 69 | .Fo DH_check | ||
| 70 | .Fa "DH *dh" | ||
| 71 | .Fa "int *codes" | ||
| 72 | .Fc | ||
| 73 | .Pp | ||
| 74 | Deprecated: | ||
| 75 | .Pp | ||
| 76 | .Ft DH * | ||
| 77 | .Fo DH_generate_parameters | ||
| 78 | .Fa "int prime_len" | ||
| 79 | .Fa "int generator" | ||
| 80 | .Fa "void (*callback)(int, int, void *)" | ||
| 81 | .Fa "void *cb_arg" | ||
| 82 | .Fc | ||
| 83 | .Sh DESCRIPTION | ||
| 84 | .Fn DH_generate_parameters_ex | ||
| 85 | generates Diffie-Hellman parameters that can be shared among a group of | ||
| 86 | users, and stores them in the provided | ||
| 87 | .Vt DH | ||
| 88 | structure. | ||
| 89 | .Pp | ||
| 90 | .Fa prime_len | ||
| 91 | is the length in bits of the safe prime to be generated. | ||
| 92 | .Fa generator | ||
| 93 | is a small number > 1, typically 2 or 5. | ||
| 94 | .Pp | ||
| 95 | A callback function may be used to provide feedback about the progress | ||
| 96 | of the key generation. | ||
| 97 | If | ||
| 98 | .Fa cb | ||
| 99 | is not | ||
| 100 | .Dv NULL , | ||
| 101 | it will be called as described in | ||
| 102 | .Xr BN_generate_prime 3 | ||
| 103 | while a random prime number is generated, and when a prime has been | ||
| 104 | found, | ||
| 105 | .Fn BN_GENCB_call cb 3 0 | ||
| 106 | is called; see | ||
| 107 | .Xr BN_GENCB_call 3 . | ||
| 108 | .Pp | ||
| 109 | .Fn DH_check | ||
| 110 | validates Diffie-Hellman parameters. | ||
| 111 | If no problems are found, | ||
| 112 | .Pf * Ar codes | ||
| 113 | is set to zero. | ||
| 114 | Otherwise, one or more of the following bits are set: | ||
| 115 | .Bl -tag -width Ds | ||
| 116 | .It Dv DH_CHECK_P_NOT_PRIME | ||
| 117 | The parameter | ||
| 118 | .Fa dh->p | ||
| 119 | is not prime. | ||
| 120 | .It Dv DH_CHECK_P_NOT_SAFE_PRIME | ||
| 121 | The parameter | ||
| 122 | .Fa dh->p | ||
| 123 | is not a safe prime. | ||
| 124 | .It Dv DH_UNABLE_TO_CHECK_GENERATOR | ||
| 125 | The generator | ||
| 126 | .Fa dh->g | ||
| 127 | cannot be checked for suitability: it is neither 2 nor 5. | ||
| 128 | .It Dv DH_NOT_SUITABLE_GENERATOR | ||
| 129 | The generator | ||
| 130 | .Fa dh->g | ||
| 131 | is not suitable. | ||
| 132 | .El | ||
| 133 | .Sh RETURN VALUES | ||
| 134 | .Fn DH_generate_parameters_ex | ||
| 135 | and | ||
| 136 | .Fn DH_check | ||
| 137 | return 1 if the check could be performed, or 0 otherwise. | ||
| 138 | .Pp | ||
| 139 | .Fn DH_generate_parameters | ||
| 140 | (deprecated) returns a pointer to the | ||
| 141 | .Vt DH | ||
| 142 | structure, or | ||
| 143 | .Dv NULL | ||
| 144 | if the parameter generation fails. | ||
| 145 | .Pp | ||
| 146 | The error codes can be obtained by | ||
| 147 | .Xr ERR_get_error 3 . | ||
| 148 | .Sh SEE ALSO | ||
| 149 | .Xr DH_get0_pqg 3 , | ||
| 150 | .Xr DH_new 3 | ||
| 151 | .Sh HISTORY | ||
| 152 | .Fn DH_check | ||
| 153 | and | ||
| 154 | .Fn DH_generate_parameters | ||
| 155 | first appeared in SSLeay 0.5.1 and have been available since | ||
| 156 | .Ox 2.4 . | ||
| 157 | .Pp | ||
| 158 | The | ||
| 159 | .Fa cb_arg | ||
| 160 | argument to | ||
| 161 | .Fn DH_generate_parameters | ||
| 162 | was added in SSLeay 0.9.0. | ||
| 163 | .Pp | ||
| 164 | In versions before OpenSSL 0.9.5, | ||
| 165 | .Dv DH_CHECK_P_NOT_STRONG_PRIME | ||
| 166 | is used instead of | ||
| 167 | .Dv DH_CHECK_P_NOT_SAFE_PRIME . | ||
| 168 | .Pp | ||
| 169 | .Fn DH_generate_parameters_ex | ||
| 170 | first appeared in OpenSSL 0.9.8 and has been available since | ||
| 171 | .Ox 4.5 . | ||
| 172 | .Sh CAVEATS | ||
| 173 | .Fn DH_generate_parameters_ex | ||
| 174 | and | ||
| 175 | .Fn DH_generate_parameters | ||
| 176 | may run for several hours before finding a suitable prime. | ||
| 177 | .Pp | ||
| 178 | The parameters generated by | ||
| 179 | .Fn DH_generate_parameters_ex | ||
| 180 | and | ||
| 181 | .Fn DH_generate_parameters | ||
| 182 | are not to be used in signature schemes. | ||
| 183 | .Sh BUGS | ||
| 184 | If | ||
| 185 | .Fa generator | ||
| 186 | is not 2 or 5, | ||
| 187 | .Fa dh->g Ns = Ns Fa generator | ||
| 188 | is not a usable generator. | ||
