diff options
Diffstat (limited to 'src/lib/libcrypto/man/crypto.3')
-rw-r--r-- | src/lib/libcrypto/man/crypto.3 | 419 |
1 files changed, 0 insertions, 419 deletions
diff --git a/src/lib/libcrypto/man/crypto.3 b/src/lib/libcrypto/man/crypto.3 deleted file mode 100644 index f1367e9e62..0000000000 --- a/src/lib/libcrypto/man/crypto.3 +++ /dev/null | |||
@@ -1,419 +0,0 @@ | |||
1 | .\" $OpenBSD: crypto.3,v 1.30 2024/12/07 19:22:15 schwarze Exp $ | ||
2 | .\" OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file is a derived work. | ||
5 | .\" The changes are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
8 | .\" | ||
9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
11 | .\" copyright notice and this permission notice appear in all copies. | ||
12 | .\" | ||
13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | .\" | ||
21 | .\" The original file was written by Ulf Moeller <ulf@openssl.org> and | ||
22 | .\" Dr. Stephen Henson <steve@openssl.org>. | ||
23 | .\" Copyright (c) 2000, 2002 The OpenSSL Project. All rights reserved. | ||
24 | .\" | ||
25 | .\" Redistribution and use in source and binary forms, with or without | ||
26 | .\" modification, are permitted provided that the following conditions | ||
27 | .\" are met: | ||
28 | .\" | ||
29 | .\" 1. Redistributions of source code must retain the above copyright | ||
30 | .\" notice, this list of conditions and the following disclaimer. | ||
31 | .\" | ||
32 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
33 | .\" notice, this list of conditions and the following disclaimer in | ||
34 | .\" the documentation and/or other materials provided with the | ||
35 | .\" distribution. | ||
36 | .\" | ||
37 | .\" 3. All advertising materials mentioning features or use of this | ||
38 | .\" software must display the following acknowledgment: | ||
39 | .\" "This product includes software developed by the OpenSSL Project | ||
40 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
41 | .\" | ||
42 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
43 | .\" endorse or promote products derived from this software without | ||
44 | .\" prior written permission. For written permission, please contact | ||
45 | .\" openssl-core@openssl.org. | ||
46 | .\" | ||
47 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
48 | .\" nor may "OpenSSL" appear in their names without prior written | ||
49 | .\" permission of the OpenSSL Project. | ||
50 | .\" | ||
51 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
52 | .\" acknowledgment: | ||
53 | .\" "This product includes software developed by the OpenSSL Project | ||
54 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
55 | .\" | ||
56 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
57 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
58 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
59 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
60 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
61 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
62 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
63 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
64 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
65 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
68 | .\" | ||
69 | .Dd $Mdocdate: December 7 2024 $ | ||
70 | .Dt CRYPTO 3 | ||
71 | .Os | ||
72 | .Sh NAME | ||
73 | .Nm crypto | ||
74 | .Nd OpenSSL cryptographic library | ||
75 | .Sh DESCRIPTION | ||
76 | The OpenSSL crypto library implements a wide range of cryptographic | ||
77 | algorithms used in various Internet standards. | ||
78 | The services provided by this library are used by the OpenSSL | ||
79 | implementations of TLS and S/MIME, and they have also been used to | ||
80 | implement SSH, OpenPGP, and other cryptographic standards. | ||
81 | .Pp | ||
82 | .Sy Symmetric ciphers | ||
83 | including AES, Blowfish, CAST, ChaCha20, IDEA, DES, RC2, and RC4 | ||
84 | are provided by the generic interface | ||
85 | .Xr EVP_EncryptInit 3 . | ||
86 | Low-level stand-alone interfaces include | ||
87 | .Xr AES_encrypt 3 , | ||
88 | .Xr BF_set_key 3 , | ||
89 | .Xr ChaCha 3 , | ||
90 | .Xr DES_set_key 3 , | ||
91 | .Xr RC2_encrypt 3 , | ||
92 | and | ||
93 | .Xr RC4 3 . | ||
94 | .Pp | ||
95 | .Sy Public key cryptography and key agreement | ||
96 | are provided by | ||
97 | .Xr DH_new 3 , | ||
98 | .Xr ECDH_compute_key 3 , | ||
99 | .Xr X25519 3 , | ||
100 | .Xr DSA_new 3 , | ||
101 | .Xr ECDSA_SIG_new 3 , | ||
102 | .Xr RSA_new 3 , | ||
103 | and | ||
104 | .Xr EVP_PKEY_new 3 . | ||
105 | .Pp | ||
106 | .Sy Certificates | ||
107 | are handled by | ||
108 | .Xr X509_new 3 | ||
109 | and | ||
110 | .Xr X509v3_add_ext 3 . | ||
111 | .Pp | ||
112 | .Sy Authentication codes and hash functions | ||
113 | offered include | ||
114 | .Xr EVP_DigestInit 3 , | ||
115 | .Xr CMAC_Init 3 , | ||
116 | .Xr HMAC 3 , | ||
117 | .Xr MD4 3 , | ||
118 | .Xr MD5 3 , | ||
119 | .Xr RIPEMD160 3 , | ||
120 | .Xr SHA1 3 , | ||
121 | and | ||
122 | .Xr SHA256 3 . | ||
123 | .Pp | ||
124 | .Sy Input, output, and data encoding | ||
125 | facilities include | ||
126 | .Xr ASN1_TYPE_get 3 , | ||
127 | .Xr BIO_new 3 , | ||
128 | .Xr CMS_ContentInfo_new 3 , | ||
129 | .Xr evp 3 , | ||
130 | .Xr EVP_EncodeInit 3 , | ||
131 | .Xr PEM_read 3 , | ||
132 | .Xr PKCS7_encrypt 3 , | ||
133 | .Xr PKCS7_sign 3 , | ||
134 | .Xr PKCS12_create 3 , | ||
135 | and | ||
136 | .Xr SMIME_write_PKCS7 3 . | ||
137 | .Pp | ||
138 | .Sy Auxiliary features include: | ||
139 | .Bl -dash -compact | ||
140 | .It | ||
141 | configuration file handling: see | ||
142 | .Xr OPENSSL_config 3 | ||
143 | .It | ||
144 | error reporting: see | ||
145 | .Xr ERR 3 | ||
146 | .It | ||
147 | .Xr OCSP_REQUEST_new 3 | ||
148 | .It | ||
149 | .Xr UI_new 3 | ||
150 | .El | ||
151 | .Pp | ||
152 | .Sy Internal utilities | ||
153 | include | ||
154 | .Xr BIO_f_buffer 3 , | ||
155 | .Xr BN_new 3 , | ||
156 | .Xr EC_GROUP_new 3 , | ||
157 | .Xr lh_new 3 , | ||
158 | and | ||
159 | .Xr STACK_OF 3 . | ||
160 | .Sh NAMING CONVENTIONS | ||
161 | Elements used in the names of API functions include the following: | ||
162 | .Bl -tag -width Ds | ||
163 | .It add0 | ||
164 | See | ||
165 | .Dq set0 | ||
166 | below. | ||
167 | .It add1 | ||
168 | See | ||
169 | .Dq set1 | ||
170 | below. | ||
171 | .It BIO | ||
172 | basic input and/or output abstraction: | ||
173 | The function manipulates objects of the idiosyncratic OpenSSL | ||
174 | .Vt BIO | ||
175 | object type. | ||
176 | See | ||
177 | .Xr BIO_new 3 . | ||
178 | .It bio | ||
179 | The function uses a | ||
180 | .Vt BIO | ||
181 | object for input or output. | ||
182 | In many cases, simpler variants of the function are available | ||
183 | that operate directly on | ||
184 | .In stdio.h | ||
185 | .Vt FILE | ||
186 | objects or directly in RAM, usually using byte arrays. | ||
187 | .It BIO_f_ | ||
188 | filter BIO: | ||
189 | The function returns a pointer to a static built-in object that, | ||
190 | when passed to | ||
191 | .Xr BIO_new 3 , | ||
192 | results in the creation of a BIO object that can write data to | ||
193 | and/or read data from another | ||
194 | .Vt BIO | ||
195 | object. | ||
196 | .It BIO_s_ | ||
197 | source and/or sink BIO: | ||
198 | The function returns a pointer to a static built-in object that, | ||
199 | when passed to | ||
200 | .Xr BIO_new 3 , | ||
201 | results in the creation of a BIO object | ||
202 | that can write data to an external destination | ||
203 | and/or read data from an external source, | ||
204 | for example a file descriptor or object, a memory buffer, or the network. | ||
205 | .It BN | ||
206 | big number: | ||
207 | The function operates on | ||
208 | .Vt BIGNUM | ||
209 | objects representing integer numbers of variable, almost unlimited size. | ||
210 | See | ||
211 | .Xr BN_new 3 . | ||
212 | .It cb | ||
213 | callback: | ||
214 | The function takes or returns a function pointer | ||
215 | that is called by API functions from inside the library. | ||
216 | The function pointed to may be defined by the application program. | ||
217 | In some cases, API functions with | ||
218 | .Dq cb | ||
219 | in their name may return function pointers to internal functions | ||
220 | defined inside the library that are not API functions. | ||
221 | The element | ||
222 | .Dq cb | ||
223 | is also used in the names of some function pointer datatypes | ||
224 | declared with | ||
225 | .Sy typedef . | ||
226 | In a small number of cases, the all caps form | ||
227 | .Dq CB | ||
228 | is used with the same meaning. | ||
229 | .It CTX | ||
230 | context: | ||
231 | The function operates on a wrapper object around another object. | ||
232 | The purposes and properties of such | ||
233 | .Dq CTX | ||
234 | wrapper objects vary wildly depending on the objects in question. | ||
235 | A few function names use the lower case form | ||
236 | .Dq ctx | ||
237 | in the same sense. | ||
238 | .It d2i | ||
239 | DER to internal: | ||
240 | The function decodes input conforming to ASN.1 basic encoding rules (BER) | ||
241 | and either stores the result in an existing object | ||
242 | or in a newly allocated object. | ||
243 | The latter is usually preferable because | ||
244 | creating a new object is more robust and less error prone. | ||
245 | In spite of the name, the input usually does not need to conform to ASN.1 | ||
246 | distinguished encoding rules (DER), which are more restrictive than BER. | ||
247 | .It EVP | ||
248 | digital EnVeloPe library: | ||
249 | See | ||
250 | .Xr evp 3 . | ||
251 | .It ex | ||
252 | This name element is used for two completely unrelated purposes. | ||
253 | .Pp | ||
254 | extended version: | ||
255 | The function is similar to an older function without the | ||
256 | .Dq ex | ||
257 | in its name, but takes one or more additional arguments | ||
258 | in order to make it more versatile. | ||
259 | In several cases, the older version is now deprecated. | ||
260 | .Pp | ||
261 | extra data: | ||
262 | Some object types support storing additional, application-specific data | ||
263 | inside objects in addition to the data the object is designed to hold. | ||
264 | The function sets, retrieves, or prepares for using such extra data. | ||
265 | Related function names usually contain | ||
266 | .Dq ex_data | ||
267 | or | ||
268 | .Dq ex_new_index . | ||
269 | See | ||
270 | .Xr CRYPTO_set_ex_data 3 . | ||
271 | .It fp | ||
272 | file pointer: | ||
273 | The function takes a | ||
274 | .Vt FILE * | ||
275 | argument. | ||
276 | Usually, the function is a variant of another function taking a | ||
277 | .Vt BIO * | ||
278 | argument instead. | ||
279 | .It i2d | ||
280 | internal to DER: | ||
281 | The function encodes an object passed as an argument | ||
282 | according to ASN.1 distinguished encoding rules (DER). | ||
283 | There are a few rare exceptions of functions that have | ||
284 | .Dq i2d | ||
285 | in their name but produce output anyway | ||
286 | that only conforms to ASN.1 basic encoding rules (BER) and not to DER. | ||
287 | .It get0 | ||
288 | The function returns an internal pointer | ||
289 | owned by the object passed as an argument. | ||
290 | The returned pointer must not be freed by the calling code. | ||
291 | It will be freed automatically | ||
292 | when the object owning the pointer will be freed. | ||
293 | .It get1 | ||
294 | The function returns a copy of a sub-object | ||
295 | of an object passed as an argument. | ||
296 | The caller is responsible for freeing the returned object | ||
297 | when it is no longer needed. | ||
298 | .Pp | ||
299 | If the object type is reference counted, usually the reference count | ||
300 | is incremented instead of copying the object. | ||
301 | Consequently, modifying the returned object may still impact all | ||
302 | objects containing references to it. | ||
303 | The caller is responsible for freeing the returned object | ||
304 | when it is no longer needed; for reference-counted objects still | ||
305 | referenced elsewhere, this will merely decrement the reference count. | ||
306 | .It get | ||
307 | Functions containing | ||
308 | .Dq get | ||
309 | in their name without a following digit may behave in | ||
310 | .Dq get0 | ||
311 | or, more rarely, in | ||
312 | .Dq get1 | ||
313 | style. | ||
314 | To find out which is the case, refer to the individual manual pages. | ||
315 | .It lh | ||
316 | linear hash: | ||
317 | The function manipulates a dynamic hash table. | ||
318 | See | ||
319 | .Xr lh_new 3 . | ||
320 | .It md | ||
321 | message digest. | ||
322 | Some function names use the all caps form | ||
323 | .Dq MD | ||
324 | in the same sense. | ||
325 | .It meth | ||
326 | The function manipulates an object holding a function table. | ||
327 | Usually, such function tables allow the application program | ||
328 | to implement additional cryptographic or I/O algorithms | ||
329 | and to use them with the same high-level API functions as the | ||
330 | algorithms provided by the library itself, or to replace the | ||
331 | implementations of algorithms provided by the library with | ||
332 | custom implementations provided by the application program. | ||
333 | Some API functions use the name elements | ||
334 | .Dq method | ||
335 | or | ||
336 | .Dq METHOD | ||
337 | in the same sense. | ||
338 | See also the | ||
339 | .Dq cb | ||
340 | entry in the present list. | ||
341 | .It nid | ||
342 | numerical identifier: | ||
343 | A non-standard, LibreSSL-specific | ||
344 | .Vt int | ||
345 | number associated with an ASN.1 object identifier. | ||
346 | In several cases, the all caps form | ||
347 | .Dq NID | ||
348 | is used in the same sense. | ||
349 | See | ||
350 | .Xr OBJ_nid2obj 3 . | ||
351 | .It obj | ||
352 | This name element and its all caps form | ||
353 | .Dq OBJ | ||
354 | usually refer to ASN.1 object identifiers represented by the | ||
355 | .Vt ASN1_OBJECT | ||
356 | data type. | ||
357 | See | ||
358 | .Xr ASN1_OBJECT_new 3 . | ||
359 | .It PKEY | ||
360 | In most cases, this name element and its lower case form | ||
361 | .Dq pkey | ||
362 | mean | ||
363 | .Dq private key , | ||
364 | but for both forms, there are some cases where they mean | ||
365 | .Dq public key | ||
366 | instead. | ||
367 | .It set0 | ||
368 | The function transfers ownership of a pointer passed as an argument | ||
369 | to an object passed as another argument, | ||
370 | by storing the pointer inside the object. | ||
371 | The transferred pointer must not be freed by the calling code. | ||
372 | It will be freed automatically | ||
373 | when the object now owning the pointer will be freed. | ||
374 | .It set1 | ||
375 | The function copies the content of one object passed as an argument | ||
376 | into another object also passed as an argument. | ||
377 | When the calling code no longer needs the copied object, | ||
378 | it can free that object. | ||
379 | .Pp | ||
380 | In some cases, if the object to be copied is reference counted, | ||
381 | the function does not actually copy the object but merely increments | ||
382 | its reference count and stores the pointer to it in the other object. | ||
383 | When the calling code no longer needs its original pointer to | ||
384 | the now inner object, it can free the original pointer, thus | ||
385 | decrementing the reference count of the inner object | ||
386 | and transferring ownership of the inner object to the outer object. | ||
387 | The inner object will then be freed automatically | ||
388 | when the outer object is freed later on. | ||
389 | .It set | ||
390 | Functions containing | ||
391 | .Dq set | ||
392 | in their name without a following digit may behave in | ||
393 | .Dq set0 | ||
394 | or, more rarely, in | ||
395 | .Dq set1 | ||
396 | style. | ||
397 | To find out which is the case, refer to the individual manual pages. | ||
398 | .It sk | ||
399 | stack: | ||
400 | The function manipulates a variable-sized array of pointers | ||
401 | in the idiosyncratic style described in | ||
402 | .Xr OPENSSL_sk_new 3 . | ||
403 | .It TS | ||
404 | X.509 time-stamp protocol: | ||
405 | See | ||
406 | .Xr TS_REQ_new 3 . | ||
407 | .It up_ref | ||
408 | The function increments the reference count of the argument by one. | ||
409 | Only a minority of object types support reference counting. | ||
410 | For those that do, if the reference count is greater than one, | ||
411 | the corresponding | ||
412 | .Dq free | ||
413 | function reverses the effect of one call to the | ||
414 | .Dq up_ref | ||
415 | function rather than freeing the object. | ||
416 | .El | ||
417 | .Sh SEE ALSO | ||
418 | .Xr openssl 1 , | ||
419 | .Xr ssl 3 | ||