summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/EVP_DigestInit.3
diff options
context:
space:
mode:
authorschwarze <>2023-08-27 15:33:08 +0000
committerschwarze <>2023-08-27 15:33:08 +0000
commita99835855b43233ec3bafa94c62e9bd4915c38cf (patch)
tree6d19a9f18b878def4af8e2b452c79ade090c83a1 /src/lib/libcrypto/man/EVP_DigestInit.3
parentd0926c115d127cac7ceacf58752533ccf72e3735 (diff)
downloadopenbsd-a99835855b43233ec3bafa94c62e9bd4915c38cf.tar.gz
openbsd-a99835855b43233ec3bafa94c62e9bd4915c38cf.tar.bz2
openbsd-a99835855b43233ec3bafa94c62e9bd4915c38cf.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.355
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
413The 404The
414.Fa type 405.Fa type
415will typically be supplied by a function such as 406will typically be supplied by a function such as
416.Fn EVP_sha1 . 407.Fn EVP_sha512 .
417If 408If
418.Fa impl 409.Fa impl
419is 410is
@@ -537,9 +528,9 @@ and
537.Fn EVP_MD_CTX_type 528.Fn EVP_MD_CTX_type
538return the NID of the OBJECT IDENTIFIER representing the message digest. 529return the NID of the OBJECT IDENTIFIER representing the message digest.
539For example 530For example
540.Fn EVP_MD_type EVP_sha1() 531.Fn EVP_MD_type EVP_sha512()
541returns 532returns
542.Dv NID_sha1 . 533.Dv NID_sha512 .
543These functions are normally used when setting ASN.1 OIDs. 534These 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.
563returns the NID of the public key signing algorithm associated with this 554returns the NID of the public key signing algorithm associated with this
564digest. 555digest.
565For example 556For example
566.Fn EVP_sha1 557.Fn EVP_sha512
567is associated with RSA so this will return 558is associated with RSA so this will return
568.Dv NID_sha1WithRSAEncryption . 559.Dv NID_sha512WithRSAEncryption .
569Since digests and signature algorithms are no longer linked, this 560Since digests and signature algorithms are no longer linked, this
570function is only retained for compatibility reasons. 561function 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
620is assigned. 611is 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
630return 619return
631.Vt EVP_MD 620.Vt EVP_MD
632structures for the MD5, SHA1, SHA224, SHA256, SHA384, SHA512 and 621structures for the SHA224, SHA256, SHA384, SHA512 and
633RIPEMD160 digest algorithms respectively. 622RIPEMD160 digest algorithms respectively.
634.Pp 623.Pp
635.Fn EVP_sha512_224 624.Fn EVP_sha512_224
@@ -640,11 +629,6 @@ return an
640structure that provides the truncated SHA512 variants SHA512/224 and SHA512/256, 629structure that provides the truncated SHA512 variants SHA512/224 and SHA512/256,
641respectively. 630respectively.
642.Pp 631.Pp
643.Fn EVP_md5_sha1
644returns an
645.Vt EVP_MD
646structure that provides concatenated MD5 and SHA1 message digests.
647.Pp
648.Fn EVP_md_null 632.Fn EVP_md_null
649is a "null" message digest that does nothing: 633is a "null" message digest that does nothing:
650i.e. the hash it returns is of zero length. 634i.e. the hash it returns is of zero length.
@@ -671,9 +655,6 @@ in preference to the low-level interfaces.
671This is because the code then becomes transparent to the digest used and 655This is because the code then becomes transparent to the digest used and
672much more flexible. 656much more flexible.
673.Pp 657.Pp
674New applications should use the SHA2 digest algorithms such as SHA256.
675The other digest algorithms are still in common use.
676.Pp
677For most applications the 658For most applications the
678.Fa impl 659.Fa impl
679parameter to 660parameter to
@@ -757,10 +738,7 @@ if
757is 738is
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 ,
764and 742and
765.Fn EVP_ripemd160 743.Fn EVP_ripemd160
766return pointers to the corresponding 744return 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 ,
852and 829and
853.Fn EVP_sha1 830.Dv EVP_MAX_MD_SIZE
854first appeared in SSLeay 0.5.1. 831first appeared in SSLeay 0.5.1.
855.Fn EVP_MD_size 832.Fn EVP_MD_size
856first appeared in SSLeay 0.6.6. 833first 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 ,
874and 849and
875.Fn EVP_ripemd160 850.Fn EVP_ripemd160
876first appeared in SSLeay 0.9.0. 851first 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 ,
924and 898and
925.Fn EVP_md5_sha1 899.Fn EVP_MD_CTX_free
926first appeared in OpenSSL 1.1.0 and have been available since 900first 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
941first appeared in OpenSSL 1.1.1 and have been available since 915first appeared in OpenSSL 1.1.1 and have been available since
942.Ox 7.4 . 916.Ox 7.4 .
943.Pp
944The link between digests and signing algorithms was fixed in OpenSSL 1.0
945and later, so now
946.Fn EVP_sha1
947can be used with RSA and DSA.