Make EVP_MD_CTX_[gettable|settable]_params() take an EVP_MD_CTX
[openssl.git] / doc / man3 / EVP_DigestInit.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_MD_fetch, EVP_MD_up_ref, EVP_MD_free,
6 EVP_MD_get_params, EVP_MD_gettable_params,
7 EVP_MD_CTX_new, EVP_MD_CTX_reset, EVP_MD_CTX_free, EVP_MD_CTX_copy,
8 EVP_MD_CTX_copy_ex, EVP_MD_CTX_ctrl,
9 EVP_MD_CTX_set_params, EVP_MD_CTX_get_params,
10 EVP_MD_settable_ctx_params, EVP_MD_gettable_ctx_params,
11 EVP_MD_CTX_settable_params, EVP_MD_CTX_gettable_params,
12 EVP_MD_CTX_set_flags, EVP_MD_CTX_clear_flags, EVP_MD_CTX_test_flags,
13 EVP_Digest, EVP_DigestInit_ex, EVP_DigestInit, EVP_DigestUpdate,
14 EVP_DigestFinal_ex, EVP_DigestFinalXOF, EVP_DigestFinal,
15 EVP_MD_name, EVP_MD_provider,
16 EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size, EVP_MD_block_size, EVP_MD_flags,
17 EVP_MD_CTX_name,
18 EVP_MD_CTX_md, EVP_MD_CTX_type, EVP_MD_CTX_size, EVP_MD_CTX_block_size,
19 EVP_MD_CTX_md_data, EVP_MD_CTX_update_fn, EVP_MD_CTX_set_update_fn,
20 EVP_md_null,
21 EVP_get_digestbyname, EVP_get_digestbynid, EVP_get_digestbyobj,
22 EVP_MD_CTX_pkey_ctx, EVP_MD_CTX_set_pkey_ctx,
23 EVP_MD_do_all_ex
24 - EVP digest routines
25
26 =head1 SYNOPSIS
27
28  #include <openssl/evp.h>
29
30  EVP_MD *EVP_MD_fetch(OPENSSL_CTX *ctx, const char *algorithm,
31                       const char *properties);
32  int EVP_MD_up_ref(EVP_MD *md);
33  void EVP_MD_free(EVP_MD *md);
34  int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[]);
35  const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest);
36  EVP_MD_CTX *EVP_MD_CTX_new(void);
37  int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
38  void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
39  void EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void* p2);
40  int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[]);
41  int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
42  const OSSL_PARAM *EVP_MD_settable_ctx_params(const EVP_MD *md);
43  const OSSL_PARAM *EVP_MD_gettable_ctx_params(const EVP_MD *md);
44  const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx);
45  const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx);
46  void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
47  void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
48  int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
49
50  int EVP_Digest(const void *data, size_t count, unsigned char *md,
51                 unsigned int *size, const EVP_MD *type, ENGINE *impl);
52  int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
53  int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
54  int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
55  int EVP_DigestFinalXOF(EVP_MD_CTX *ctx, unsigned char *md, size_t len);
56
57  int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);
58
59  int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
60  int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
61
62  int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in);
63
64  const char *EVP_MD_name(const EVP_MD *md);
65  const OSSL_PROVIDER *EVP_MD_provider(const EVP_MD *md);
66  int EVP_MD_type(const EVP_MD *md);
67  int EVP_MD_pkey_type(const EVP_MD *md);
68  int EVP_MD_size(const EVP_MD *md);
69  int EVP_MD_block_size(const EVP_MD *md);
70  unsigned long EVP_MD_flags(const EVP_MD *md);
71
72  const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
73  const char *EVP_MD_CTX_name(const EVP_MD_CTX *ctx);
74  int EVP_MD_CTX_size(const EVP_MD_CTX *ctx);
75  int EVP_MD_CTX_block_size(const EVP_MD_CTX *ctx);
76  int EVP_MD_CTX_type(const EVP_MD_CTX *ctx);
77  void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
78  int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
79                                               const void *data, size_t count);
80  void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx,
81                                int (*update)(EVP_MD_CTX *ctx,
82                                              const void *data, size_t count));
83
84  const EVP_MD *EVP_md_null(void);
85
86  const EVP_MD *EVP_get_digestbyname(const char *name);
87  const EVP_MD *EVP_get_digestbynid(int type);
88  const EVP_MD *EVP_get_digestbyobj(const ASN1_OBJECT *o);
89
90  EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx);
91  void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx);
92
93  void EVP_MD_do_all_ex(OPENSSL_CTX *libctx,
94                        void (*fn)(EVP_MD *mac, void *arg),
95                        void *arg);
96
97 =head1 DESCRIPTION
98
99 The EVP digest routines are a high level interface to message digests,
100 and should be used instead of the digest-specific functions.
101
102 The B<EVP_MD> type is a structure for digest method implementation.
103
104 =over 4
105
106 =item EVP_MD_fetch()
107
108 Fetches the digest implementation for the given B<algorithm> from any
109 provider offering it, within the criteria given by the B<properties>.
110 See L<provider(7)/Fetching algorithms> for further information.
111
112 The returned value must eventually be freed with EVP_MD_free().
113
114 Fetched B<EVP_MD> structures are reference counted.
115
116 =item EVP_MD_up_ref()
117
118 Increments the reference count for an B<EVP_MD> structure.
119
120 =item EVP_MD_free()
121
122 Decrements the reference count for the fetched B<EVP_MD> structure.
123 If the reference count drops to 0 then the structure is freed.
124
125 =item EVP_MD_CTX_new()
126
127 Allocates and returns a digest context.
128
129 =item EVP_MD_CTX_reset()
130
131 Resets the digest context B<ctx>.  This can be used to reuse an already
132 existing context.
133
134 =item EVP_MD_CTX_free()
135
136 Cleans up digest context B<ctx> and frees up the space allocated to it.
137
138 =item EVP_MD_CTX_ctrl()
139
140 This is a legacy method. EVP_MD_CTX_set_params() and EVP_MD_CTX_get_params()
141 is the mechanism that should be used to set and get parameters that are used by
142 providers.
143 Performs digest-specific control actions on context B<ctx>. The control command
144 is indicated in B<cmd> and any additional arguments in B<p1> and B<p2>.
145 EVP_MD_CTX_ctrl() must be called after EVP_DigestInit_ex(). Other restrictions
146 may apply depending on the control type and digest implementation.
147 See L</CONTROLS> below for more information.
148
149 =item EVP_MD_get_params()
150
151 Retrieves the requested list of B<params> from a MD B<md>.
152 See L</PARAMETERS> below for more information.
153
154 =item EVP_MD_CTX_get_params()
155
156 Retrieves the requested list of B<params> from a MD context B<ctx>.
157 See L</PARAMETERS> below for more information.
158
159 =item EVP_MD_CTX_set_params()
160
161 Sets the list of B<params> into a MD context B<ctx>.
162 See L</PARAMETERS> below for more information.
163
164 =item EVP_MD_gettable_params(), EVP_MD_gettable_ctx_params(),
165 EVP_MD_settable_ctx_params(), EVP_MD_CTX_gettable_params(),
166 EVP_MD_CTX_settable_params()
167
168 Get a B<OSSL_PARAM> array that describes the retrievable and settable
169 parameters. EVP_MD_gettable_params() returns parameters that can be used with
170 EVP_MD_get_params(). EVP_MD_gettable_ctx_params() and
171 EVP_MD_CTX_gettable_params() return parameters that can be used with
172 EVP_MD_CTX_get_params(). EVP_MD_settable_ctx_params() and
173 EVP_MD_CTX_settable_params() return parameters that can be used with
174 EVP_MD_CTX_set_params().
175 See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
176
177 =item EVP_MD_CTX_set_flags(), EVP_MD_CTX_clear_flags(), EVP_MD_CTX_test_flags()
178
179 Sets, clears and tests B<ctx> flags.  See L</FLAGS> below for more information.
180
181 =item EVP_Digest()
182
183 A wrapper around the Digest Init_ex, Update and Final_ex functions.
184 Hashes B<count> bytes of data at B<data> using a digest B<type> from ENGINE
185 B<impl>. The digest value is placed in B<md> and its length is written at B<size>
186 if the pointer is not NULL. At most B<EVP_MAX_MD_SIZE> bytes will be written.
187 If B<impl> is NULL the default implementation of digest B<type> is used.
188
189 =item EVP_DigestInit_ex()
190
191 Sets up digest context B<ctx> to use a digest B<type>.
192 B<type> is typically supplied by a function such as EVP_sha1(), or a
193 value explicitly fetched with EVP_MD_fetch().
194
195 If B<impl> is non-NULL, its implementation of the digest B<type> is used if
196 there is one, and if not, the default implementation is used.
197
198 =item EVP_DigestUpdate()
199
200 Hashes B<cnt> bytes of data at B<d> into the digest context B<ctx>. This
201 function can be called several times on the same B<ctx> to hash additional
202 data.
203
204 =item EVP_DigestFinal_ex()
205
206 Retrieves the digest value from B<ctx> and places it in B<md>. If the B<s>
207 parameter is not NULL then the number of bytes of data written (i.e. the
208 length of the digest) will be written to the integer at B<s>, at most
209 B<EVP_MAX_MD_SIZE> bytes will be written.  After calling EVP_DigestFinal_ex()
210 no additional calls to EVP_DigestUpdate() can be made, but
211 EVP_DigestInit_ex() can be called to initialize a new digest operation.
212
213 =item EVP_DigestFinalXOF()
214
215 Interfaces to extendable-output functions, XOFs, such as SHAKE128 and SHAKE256.
216 It retrieves the digest value from B<ctx> and places it in B<len>-sized <B>md.
217 After calling this function no additional calls to EVP_DigestUpdate() can be
218 made, but EVP_DigestInit_ex() can be called to initialize a new operation.
219
220 =item EVP_MD_CTX_copy_ex()
221
222 Can be used to copy the message digest state from B<in> to B<out>. This is
223 useful if large amounts of data are to be hashed which only differ in the last
224 few bytes.
225
226 =item EVP_DigestInit()
227
228 Behaves in the same way as EVP_DigestInit_ex() except it always uses the
229 default digest implementation.
230
231 =item EVP_DigestFinal()
232
233 Similar to EVP_DigestFinal_ex() except the digest context B<ctx> is
234 automatically cleaned up.
235
236 =item EVP_MD_CTX_copy()
237
238 Similar to EVP_MD_CTX_copy_ex() except the destination B<out> does not have to
239 be initialized.
240
241 =item EVP_MD_name(),
242 EVP_MD_CTX_name()
243
244 Return the name of the given message digest.
245
246 =item EVP_MD_provider()
247
248 Returns an B<OSSL_PROVIDER> pointer to the provider that implements the given
249 B<EVP_MD>.
250
251 =item EVP_MD_size(),
252 EVP_MD_CTX_size()
253
254 Return the size of the message digest when passed an B<EVP_MD> or an
255 B<EVP_MD_CTX> structure, i.e. the size of the hash.
256
257 =item EVP_MD_block_size(),
258 EVP_MD_CTX_block_size()
259
260 Return the block size of the message digest when passed an B<EVP_MD> or an
261 B<EVP_MD_CTX> structure.
262
263 =item EVP_MD_type(),
264 EVP_MD_CTX_type()
265
266 Return the NID of the OBJECT IDENTIFIER representing the given message digest
267 when passed an B<EVP_MD> structure.  For example, C<EVP_MD_type(EVP_sha1())>
268 returns B<NID_sha1>. This function is normally used when setting ASN1 OIDs.
269
270 =item EVP_MD_CTX_md_data()
271
272 Return the digest method private data for the passed B<EVP_MD_CTX>.
273 The space is allocated by OpenSSL and has the size originally set with
274 EVP_MD_meth_set_app_datasize().
275
276 =item EVP_MD_CTX_md()
277
278 Returns the B<EVP_MD> structure corresponding to the passed B<EVP_MD_CTX>. This
279 will be the same B<EVP_MD> object originally passed to EVP_DigestInit_ex() (or
280 other similar function) when the EVP_MD_CTX was first initialised. Note that
281 where explicit fetch is in use (see L<EVP_MD_fetch(3)>) the value returned from
282 this function will not have its reference count incremented and therefore it
283 should not be used after the EVP_MD_CTX is freed.
284
285 =item EVP_MD_CTX_set_update_fn()
286
287 Sets the update function for B<ctx> to B<update>.
288 This is the function that is called by EVP_DigestUpdate. If not set, the
289 update function from the B<EVP_MD> type specified at initialization is used.
290
291 =item EVP_MD_CTX_update_fn()
292
293 Returns the update function for B<ctx>.
294
295 =item EVP_MD_flags()
296
297 Returns the B<md> flags. Note that these are different from the B<EVP_MD_CTX>
298 ones. See L<EVP_MD_meth_set_flags(3)> for more information.
299
300 =item EVP_MD_pkey_type()
301
302 Returns the NID of the public key signing algorithm associated with this
303 digest. For example EVP_sha1() is associated with RSA so this will return
304 B<NID_sha1WithRSAEncryption>. Since digests and signature algorithms are no
305 longer linked this function is only retained for compatibility reasons.
306
307 =item EVP_md_null()
308
309 A "null" message digest that does nothing: i.e. the hash it returns is of zero
310 length.
311
312 =item EVP_get_digestbyname(),
313 EVP_get_digestbynid(),
314 EVP_get_digestbyobj()
315
316 Returns an B<EVP_MD> structure when passed a digest name, a digest B<NID> or an
317 B<ASN1_OBJECT> structure respectively.
318
319 =item EVP_MD_CTX_pkey_ctx()
320
321 Returns the B<EVP_PKEY_CTX> assigned to B<ctx>. The returned pointer should not
322 be freed by the caller.
323
324 =item EVP_MD_CTX_set_pkey_ctx()
325
326 Assigns an B<EVP_PKEY_CTX> to B<EVP_MD_CTX>. This is usually used to provide
327 a customized B<EVP_PKEY_CTX> to L<EVP_DigestSignInit(3)> or
328 L<EVP_DigestVerifyInit(3)>. The B<pctx> passed to this function should be freed
329 by the caller. A NULL B<pctx> pointer is also allowed to clear the B<EVP_PKEY_CTX>
330 assigned to B<ctx>. In such case, freeing the cleared B<EVP_PKEY_CTX> or not
331 depends on how the B<EVP_PKEY_CTX> is created.
332
333 =item EVP_MD_do_all_ex()
334
335 Traverses all messages digests implemented by all activated providers
336 in the given library context I<libctx>, and for each of the implementations,
337 calls the given function I<fn> with the implementation method and the given
338 I<arg> as argument.
339
340 =back
341
342 =head1 PARAMETERS
343
344 See L<OSSL_PARAM(3)> for information about passing parameters.
345
346 EVP_MD_CTX_set_params() can be used with the following OSSL_PARAM keys:
347
348 =over 4
349
350 =item OSSL_PARAM_DIGEST_KEY_XOFLEN <unsigned integer>
351
352 Sets the digest length for extendable output functions.
353 It is used by the SHAKE algorithm and should not exceed what can be given
354 using a B<size_t>.
355
356 =item OSSL_PARAM_DIGEST_KEY_PAD_TYPE <integer>
357
358 Sets the pad type.
359 It is used by the MDC2 algorithm.
360
361 =back
362
363 EVP_MD_CTX_get_params() can be used with the following OSSL_PARAM keys:
364
365 =over 4
366
367 =item OSSL_PARAM_DIGEST_KEY_MICALG <UTF8 string>.
368
369 Gets the digest Message Integrity Check algorithm string. This is used when
370 creating S/MIME multipart/signed messages, as specified in RFC 3851.
371 It may be used by external engines or providers.
372
373 =back
374
375 =head1 CONTROLS
376
377 EVP_MD_CTX_ctrl() can be used to send the following standard controls:
378
379 =over 4
380
381 =item EVP_MD_CTRL_MICALG
382
383 Gets the digest Message Integrity Check algorithm string. This is used when
384 creating S/MIME multipart/signed messages, as specified in RFC 3851.
385 The string value is written to B<p2>.
386
387 =item EVP_MD_CTRL_XOF_LEN
388
389 This control sets the digest length for extendable output functions to B<p1>.
390 Sending this control directly should not be necessary, the use of
391 C<EVP_DigestFinalXOF()> is preferred.
392 Currently used by SHAKE.
393
394 =back
395
396 =head1 FLAGS
397
398 EVP_MD_CTX_set_flags(), EVP_MD_CTX_clear_flags() and EVP_MD_CTX_test_flags()
399 can be used the manipulate and test these B<EVP_MD_CTX> flags:
400
401 =over 4
402
403 =item EVP_MD_CTX_FLAG_ONESHOT
404
405 This flag instructs the digest to optimize for one update only, if possible.
406
407 =for comment EVP_MD_CTX_FLAG_CLEANED is internal, don't mention it
408
409 =for comment EVP_MD_CTX_FLAG_REUSE is internal, don't mention it
410
411 =for comment We currently avoid documenting flags that are only bit holder:
412 EVP_MD_CTX_FLAG_NON_FIPS_ALLOW, EVP_MD_CTX_FLAGS_PAD_*
413
414 =item EVP_MD_CTX_FLAG_NO_INIT
415
416 This flag instructs EVP_DigestInit() and similar not to initialise the
417 implementation specific data.
418
419 =item EVP_MD_CTX_FLAG_FINALISE
420
421 Some functions such as EVP_DigestSign only finalise copies of internal
422 contexts so additional data can be included after the finalisation call.
423 This is inefficient if this functionality is not required, and can be
424 disabled with this flag.
425
426 =back
427
428 =head1 RETURN VALUES
429
430 =over 4
431
432 =item EVP_MD_fetch()
433
434 Returns a pointer to a B<EVP_MD> for success or NULL for failure.
435
436 =item EVP_MD_up_ref()
437
438 Returns 1 for success or 0 for failure.
439
440 =item EVP_DigestInit_ex(),
441 EVP_DigestUpdate(),
442 EVP_DigestFinal_ex()
443
444 Returns 1 for
445 success and 0 for failure.
446
447 =item EVP_MD_CTX_ctrl()
448
449 Returns 1 if successful or 0 for failure.
450
451 =item EVP_MD_CTX_set_params(),
452 EVP_MD_CTX_get_params()
453
454 Returns 1 if successful or 0 for failure.
455
456 =item EVP_MD_CTX_settable_params(),
457 EVP_MD_CTX_gettable_params()
458
459 Return an array of constant B<OSSL_PARAM>s, or NULL if there is none
460 to get.
461
462 =item EVP_MD_CTX_copy_ex()
463
464 Returns 1 if successful or 0 for failure.
465
466 =item EVP_MD_type(),
467 EVP_MD_pkey_type()
468
469 Returns the NID of the corresponding OBJECT IDENTIFIER or NID_undef if none
470 exists.
471
472 =item EVP_MD_size(),
473 EVP_MD_block_size(),
474 EVP_MD_CTX_size(),
475 EVP_MD_CTX_block_size()
476
477 Returns the digest or block size in bytes.
478
479 =item EVP_md_null()
480
481 Returns a pointer to the B<EVP_MD> structure of the "null" message digest.
482
483 =item EVP_get_digestbyname(),
484 EVP_get_digestbynid(),
485 EVP_get_digestbyobj()
486
487 Returns either an B<EVP_MD> structure or NULL if an error occurs.
488
489 =item EVP_MD_CTX_set_pkey_ctx()
490
491 This function has no return value.
492
493 =back
494
495 =head1 NOTES
496
497 The B<EVP> interface to message digests should almost always be used in
498 preference to the low level interfaces. This is because the code then becomes
499 transparent to the digest used and much more flexible.
500
501 New applications should use the SHA-2 (such as L<EVP_sha256(3)>) or the SHA-3
502 digest algorithms (such as L<EVP_sha3_512(3)>). The other digest algorithms
503 are still in common use.
504
505 For most applications the B<impl> parameter to EVP_DigestInit_ex() will be
506 set to NULL to use the default digest implementation.
507
508 The functions EVP_DigestInit(), EVP_DigestFinal() and EVP_MD_CTX_copy() are
509 obsolete but are retained to maintain compatibility with existing code. New
510 applications should use EVP_DigestInit_ex(), EVP_DigestFinal_ex() and
511 EVP_MD_CTX_copy_ex() because they can efficiently reuse a digest context
512 instead of initializing and cleaning it up on each call and allow non default
513 implementations of digests to be specified.
514
515 If digest contexts are not cleaned up after use,
516 memory leaks will occur.
517
518 EVP_MD_CTX_name(), EVP_MD_CTX_size(), EVP_MD_CTX_block_size(),
519 EVP_MD_CTX_type(), EVP_get_digestbynid() and EVP_get_digestbyobj() are defined
520 as macros.
521
522 EVP_MD_CTX_ctrl() sends commands to message digests for additional configuration
523 or control.
524
525 =head1 EXAMPLES
526
527 This example digests the data "Test Message\n" and "Hello World\n", using the
528 digest name passed on the command line.
529
530  #include <stdio.h>
531  #include <string.h>
532  #include <openssl/evp.h>
533
534  int main(int argc, char *argv[])
535  {
536      EVP_MD_CTX *mdctx;
537      const EVP_MD *md;
538      char mess1[] = "Test Message\n";
539      char mess2[] = "Hello World\n";
540      unsigned char md_value[EVP_MAX_MD_SIZE];
541      unsigned int md_len, i;
542
543      if (argv[1] == NULL) {
544          printf("Usage: mdtest digestname\n");
545          exit(1);
546      }
547
548      md = EVP_get_digestbyname(argv[1]);
549      if (md == NULL) {
550          printf("Unknown message digest %s\n", argv[1]);
551          exit(1);
552      }
553
554      mdctx = EVP_MD_CTX_new();
555      EVP_DigestInit_ex(mdctx, md, NULL);
556      EVP_DigestUpdate(mdctx, mess1, strlen(mess1));
557      EVP_DigestUpdate(mdctx, mess2, strlen(mess2));
558      EVP_DigestFinal_ex(mdctx, md_value, &md_len);
559      EVP_MD_CTX_free(mdctx);
560
561      printf("Digest is: ");
562      for (i = 0; i < md_len; i++)
563          printf("%02x", md_value[i]);
564      printf("\n");
565
566      exit(0);
567  }
568
569 =head1 SEE ALSO
570
571 L<EVP_MD_meth_new(3)>,
572 L<dgst(1)>,
573 L<evp(7)>,
574 L<OSSL_PROVIDER(3)>,
575 L<OSSL_PARAM(3)>
576
577 The full list of digest algorithms are provided below.
578
579 L<EVP_blake2b512(3)>,
580 L<EVP_md2(3)>,
581 L<EVP_md4(3)>,
582 L<EVP_md5(3)>,
583 L<EVP_mdc2(3)>,
584 L<EVP_ripemd160(3)>,
585 L<EVP_sha1(3)>,
586 L<EVP_sha224(3)>,
587 L<EVP_sha3_224(3)>,
588 L<EVP_sm3(3)>,
589 L<EVP_whirlpool(3)>
590 L<provider(7)/Fetching algorithms>
591
592 =head1 HISTORY
593
594 The EVP_MD_CTX_create() and EVP_MD_CTX_destroy() functions were renamed to
595 EVP_MD_CTX_new() and EVP_MD_CTX_free() in OpenSSL 1.1.0, respectively.
596
597 The link between digests and signing algorithms was fixed in OpenSSL 1.0 and
598 later, so now EVP_sha1() can be used with RSA and DSA.
599
600 The EVP_dss1() function was removed in OpenSSL 1.1.0.
601
602 The EVP_MD_CTX_set_pkey_ctx() function was added in 1.1.1.
603
604 The EVP_MD_fetch(), EVP_MD_free(), EVP_MD_up_ref(), EVP_MD_CTX_set_params()
605 and EVP_MD_CTX_get_params() functions were added in 3.0.
606
607 =head1 COPYRIGHT
608
609 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
610
611 Licensed under the Apache License 2.0 (the "License").  You may not use
612 this file except in compliance with the License.  You can obtain a copy
613 in the file LICENSE in the source distribution or at
614 L<https://www.openssl.org/source/license.html>.
615
616 =cut