diff options
| author | schwarze <> | 2023-08-27 15:33:08 +0000 |
|---|---|---|
| committer | schwarze <> | 2023-08-27 15:33:08 +0000 |
| commit | 44e1ad16951d32b584361dfd5f8ecee255a20c70 (patch) | |
| tree | 6d19a9f18b878def4af8e2b452c79ade090c83a1 /src/lib/libcrypto/man/EVP_DigestInit.3 | |
| parent | 9c05c884a801c11fd0795c5ef24b2c422487860e (diff) | |
| download | openbsd-44e1ad16951d32b584361dfd5f8ecee255a20c70.tar.gz openbsd-44e1ad16951d32b584361dfd5f8ecee255a20c70.tar.bz2 openbsd-44e1ad16951d32b584361dfd5f8ecee255a20c70.zip | |
Move the weak SHA-1 and MD5 hashes out of EVP_DigestInit(3)
into a new EVP_sha1(3) manual page, and also mention EVP_md4(3) there.
Using input from tb@ and jsing@, who like the general direction.
Diffstat (limited to 'src/lib/libcrypto/man/EVP_DigestInit.3')
| -rw-r--r-- | src/lib/libcrypto/man/EVP_DigestInit.3 | 55 |
1 files changed, 12 insertions, 43 deletions
diff --git a/src/lib/libcrypto/man/EVP_DigestInit.3 b/src/lib/libcrypto/man/EVP_DigestInit.3 index 2d790cb2c0..54cc771b10 100644 --- a/src/lib/libcrypto/man/EVP_DigestInit.3 +++ b/src/lib/libcrypto/man/EVP_DigestInit.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: EVP_DigestInit.3,v 1.28 2023/08/14 14:22:32 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_DigestInit.3,v 1.29 2023/08/27 15:33:08 schwarze Exp $ |
| 2 | .\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000 | 2 | .\" full merge up to: OpenSSL 7f572e95 Dec 2 13:57:04 2015 +0000 |
| 3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 |
| 4 | .\" | 4 | .\" |
| @@ -70,7 +70,7 @@ | |||
| 70 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 70 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 71 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 71 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 72 | .\" | 72 | .\" |
| 73 | .Dd $Mdocdate: August 14 2023 $ | 73 | .Dd $Mdocdate: August 27 2023 $ |
| 74 | .Dt EVP_DIGESTINIT 3 | 74 | .Dt EVP_DIGESTINIT 3 |
| 75 | .Os | 75 | .Os |
| 76 | .Sh NAME | 76 | .Sh NAME |
| @@ -107,9 +107,6 @@ | |||
| 107 | .Nm EVP_MD_CTX_pkey_ctx , | 107 | .Nm EVP_MD_CTX_pkey_ctx , |
| 108 | .Nm EVP_MD_CTX_set_pkey_ctx , | 108 | .Nm EVP_MD_CTX_set_pkey_ctx , |
| 109 | .Nm EVP_md_null , | 109 | .Nm EVP_md_null , |
| 110 | .Nm EVP_md5 , | ||
| 111 | .Nm EVP_md5_sha1 , | ||
| 112 | .Nm EVP_sha1 , | ||
| 113 | .Nm EVP_sha224 , | 110 | .Nm EVP_sha224 , |
| 114 | .Nm EVP_sha256 , | 111 | .Nm EVP_sha256 , |
| 115 | .Nm EVP_sha384 , | 112 | .Nm EVP_sha384 , |
| @@ -270,12 +267,6 @@ | |||
| 270 | .Ft const EVP_MD * | 267 | .Ft const EVP_MD * |
| 271 | .Fn EVP_md_null void | 268 | .Fn EVP_md_null void |
| 272 | .Ft const EVP_MD * | 269 | .Ft const EVP_MD * |
| 273 | .Fn EVP_md5 void | ||
| 274 | .Ft const EVP_MD * | ||
| 275 | .Fn EVP_md5_sha1 void | ||
| 276 | .Ft const EVP_MD * | ||
| 277 | .Fn EVP_sha1 void | ||
| 278 | .Ft const EVP_MD * | ||
| 279 | .Fn EVP_sha224 void | 270 | .Fn EVP_sha224 void |
| 280 | .Ft const EVP_MD * | 271 | .Ft const EVP_MD * |
| 281 | .Fn EVP_sha256 void | 272 | .Fn EVP_sha256 void |
| @@ -413,7 +404,7 @@ from | |||
| 413 | The | 404 | The |
| 414 | .Fa type | 405 | .Fa type |
| 415 | will typically be supplied by a function such as | 406 | will typically be supplied by a function such as |
| 416 | .Fn EVP_sha1 . | 407 | .Fn EVP_sha512 . |
| 417 | If | 408 | If |
| 418 | .Fa impl | 409 | .Fa impl |
| 419 | is | 410 | is |
| @@ -537,9 +528,9 @@ and | |||
| 537 | .Fn EVP_MD_CTX_type | 528 | .Fn EVP_MD_CTX_type |
| 538 | return the NID of the OBJECT IDENTIFIER representing the message digest. | 529 | return the NID of the OBJECT IDENTIFIER representing the message digest. |
| 539 | For example | 530 | For example |
| 540 | .Fn EVP_MD_type EVP_sha1() | 531 | .Fn EVP_MD_type EVP_sha512() |
| 541 | returns | 532 | returns |
| 542 | .Dv NID_sha1 . | 533 | .Dv NID_sha512 . |
| 543 | These functions are normally used when setting ASN.1 OIDs. | 534 | These functions are normally used when setting ASN.1 OIDs. |
| 544 | .Pp | 535 | .Pp |
| 545 | .Fn EVP_MD_CTX_md_data | 536 | .Fn EVP_MD_CTX_md_data |
| @@ -563,9 +554,9 @@ for more information. | |||
| 563 | returns the NID of the public key signing algorithm associated with this | 554 | returns the NID of the public key signing algorithm associated with this |
| 564 | digest. | 555 | digest. |
| 565 | For example | 556 | For example |
| 566 | .Fn EVP_sha1 | 557 | .Fn EVP_sha512 |
| 567 | is associated with RSA so this will return | 558 | is associated with RSA so this will return |
| 568 | .Dv NID_sha1WithRSAEncryption . | 559 | .Dv NID_sha512WithRSAEncryption . |
| 569 | Since digests and signature algorithms are no longer linked, this | 560 | Since digests and signature algorithms are no longer linked, this |
| 570 | function is only retained for compatibility reasons. | 561 | function is only retained for compatibility reasons. |
| 571 | .Pp | 562 | .Pp |
| @@ -619,8 +610,6 @@ is dissociated from it as described above, but no new | |||
| 619 | .Vt EVP_PKEY_CTX | 610 | .Vt EVP_PKEY_CTX |
| 620 | is assigned. | 611 | is assigned. |
| 621 | .Pp | 612 | .Pp |
| 622 | .Fn EVP_md5 , | ||
| 623 | .Fn EVP_sha1 , | ||
| 624 | .Fn EVP_sha224 , | 613 | .Fn EVP_sha224 , |
| 625 | .Fn EVP_sha256 , | 614 | .Fn EVP_sha256 , |
| 626 | .Fn EVP_sha384 , | 615 | .Fn EVP_sha384 , |
| @@ -629,7 +618,7 @@ and | |||
| 629 | .Fn EVP_ripemd160 | 618 | .Fn EVP_ripemd160 |
| 630 | return | 619 | return |
| 631 | .Vt EVP_MD | 620 | .Vt EVP_MD |
| 632 | structures for the MD5, SHA1, SHA224, SHA256, SHA384, SHA512 and | 621 | structures for the SHA224, SHA256, SHA384, SHA512 and |
| 633 | RIPEMD160 digest algorithms respectively. | 622 | RIPEMD160 digest algorithms respectively. |
| 634 | .Pp | 623 | .Pp |
| 635 | .Fn EVP_sha512_224 | 624 | .Fn EVP_sha512_224 |
| @@ -640,11 +629,6 @@ return an | |||
| 640 | structure that provides the truncated SHA512 variants SHA512/224 and SHA512/256, | 629 | structure that provides the truncated SHA512 variants SHA512/224 and SHA512/256, |
| 641 | respectively. | 630 | respectively. |
| 642 | .Pp | 631 | .Pp |
| 643 | .Fn EVP_md5_sha1 | ||
| 644 | returns an | ||
| 645 | .Vt EVP_MD | ||
| 646 | structure that provides concatenated MD5 and SHA1 message digests. | ||
| 647 | .Pp | ||
| 648 | .Fn EVP_md_null | 632 | .Fn EVP_md_null |
| 649 | is a "null" message digest that does nothing: | 633 | is a "null" message digest that does nothing: |
| 650 | i.e. the hash it returns is of zero length. | 634 | i.e. the hash it returns is of zero length. |
| @@ -671,9 +655,6 @@ in preference to the low-level interfaces. | |||
| 671 | This is because the code then becomes transparent to the digest used and | 655 | This is because the code then becomes transparent to the digest used and |
| 672 | much more flexible. | 656 | much more flexible. |
| 673 | .Pp | 657 | .Pp |
| 674 | New applications should use the SHA2 digest algorithms such as SHA256. | ||
| 675 | The other digest algorithms are still in common use. | ||
| 676 | .Pp | ||
| 677 | For most applications the | 658 | For most applications the |
| 678 | .Fa impl | 659 | .Fa impl |
| 679 | parameter to | 660 | parameter to |
| @@ -757,10 +738,7 @@ if | |||
| 757 | is | 738 | is |
| 758 | .Dv NULL . | 739 | .Dv NULL . |
| 759 | .Pp | 740 | .Pp |
| 760 | .Fn EVP_md_null , | 741 | .Fn EVP_md_null |
| 761 | .Fn EVP_md5 , | ||
| 762 | .Fn EVP_md5_sha1 , | ||
| 763 | .Fn EVP_sha1 , | ||
| 764 | and | 742 | and |
| 765 | .Fn EVP_ripemd160 | 743 | .Fn EVP_ripemd160 |
| 766 | return pointers to the corresponding | 744 | return pointers to the corresponding |
| @@ -830,6 +808,7 @@ main(int argc, char *argv[]) | |||
| 830 | .Xr EVP_MD_meth_new 3 , | 808 | .Xr EVP_MD_meth_new 3 , |
| 831 | .Xr EVP_PKEY_CTX_set_signature_md 3 , | 809 | .Xr EVP_PKEY_CTX_set_signature_md 3 , |
| 832 | .Xr EVP_PKEY_meth_set_signctx 3 , | 810 | .Xr EVP_PKEY_meth_set_signctx 3 , |
| 811 | .Xr EVP_sha1 3 , | ||
| 833 | .Xr EVP_sha3_224 3 , | 812 | .Xr EVP_sha3_224 3 , |
| 834 | .Xr EVP_SignInit 3 , | 813 | .Xr EVP_SignInit 3 , |
| 835 | .Xr EVP_sm3 3 , | 814 | .Xr EVP_sm3 3 , |
| @@ -847,10 +826,8 @@ main(int argc, char *argv[]) | |||
| 847 | .Fn EVP_DigestInit , | 826 | .Fn EVP_DigestInit , |
| 848 | .Fn EVP_DigestUpdate , | 827 | .Fn EVP_DigestUpdate , |
| 849 | .Fn EVP_DigestFinal , | 828 | .Fn EVP_DigestFinal , |
| 850 | .Dv EVP_MAX_MD_SIZE , | ||
| 851 | .Fn EVP_md5 , | ||
| 852 | and | 829 | and |
| 853 | .Fn EVP_sha1 | 830 | .Dv EVP_MAX_MD_SIZE |
| 854 | first appeared in SSLeay 0.5.1. | 831 | first appeared in SSLeay 0.5.1. |
| 855 | .Fn EVP_MD_size | 832 | .Fn EVP_MD_size |
| 856 | first appeared in SSLeay 0.6.6. | 833 | first appeared in SSLeay 0.6.6. |
| @@ -869,8 +846,6 @@ first appeared in SSLeay 0.8.1. | |||
| 869 | .Fn EVP_MD_block_size , | 846 | .Fn EVP_MD_block_size , |
| 870 | .Fn EVP_MD_CTX_size , | 847 | .Fn EVP_MD_CTX_size , |
| 871 | .Fn EVP_MD_CTX_block_size , | 848 | .Fn EVP_MD_CTX_block_size , |
| 872 | .Fn EVP_rc4_40 , | ||
| 873 | .Fn EVP_rc2_40_cbc , | ||
| 874 | and | 849 | and |
| 875 | .Fn EVP_ripemd160 | 850 | .Fn EVP_ripemd160 |
| 876 | first appeared in SSLeay 0.9.0. | 851 | first appeared in SSLeay 0.9.0. |
| @@ -920,9 +895,8 @@ first appeared in OpenSSL 1.1.0 and has been available since | |||
| 920 | .Pp | 895 | .Pp |
| 921 | .Fn EVP_MD_CTX_new , | 896 | .Fn EVP_MD_CTX_new , |
| 922 | .Fn EVP_MD_CTX_reset , | 897 | .Fn EVP_MD_CTX_reset , |
| 923 | .Fn EVP_MD_CTX_free , | ||
| 924 | and | 898 | and |
| 925 | .Fn EVP_md5_sha1 | 899 | .Fn EVP_MD_CTX_free |
| 926 | first appeared in OpenSSL 1.1.0 and have been available since | 900 | first appeared in OpenSSL 1.1.0 and have been available since |
| 927 | .Ox 6.3 . | 901 | .Ox 6.3 . |
| 928 | .Pp | 902 | .Pp |
| @@ -940,8 +914,3 @@ and | |||
| 940 | .Fn EVP_sha512_256 | 914 | .Fn EVP_sha512_256 |
| 941 | first appeared in OpenSSL 1.1.1 and have been available since | 915 | first appeared in OpenSSL 1.1.1 and have been available since |
| 942 | .Ox 7.4 . | 916 | .Ox 7.4 . |
| 943 | .Pp | ||
| 944 | The link between digests and signing algorithms was fixed in OpenSSL 1.0 | ||
| 945 | and later, so now | ||
| 946 | .Fn EVP_sha1 | ||
| 947 | can be used with RSA and DSA. | ||
