summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2019-03-21 13:37:25 +0000
committerschwarze <>2019-03-21 13:37:25 +0000
commit3b1f9f9126c0070a53993c0bd852f03c008147c2 (patch)
tree546ef5fcdd03902d2265e11cd45eea50091fe6b0 /src/lib
parent7d20707156b3fcbf876071ef455a7b2ad1a9e374 (diff)
downloadopenbsd-3b1f9f9126c0070a53993c0bd852f03c008147c2.tar.gz
openbsd-3b1f9f9126c0070a53993c0bd852f03c008147c2.tar.bz2
openbsd-3b1f9f9126c0070a53993c0bd852f03c008147c2.zip
Split EVP_rc4(3) out of EVP_EncryptInit(3) to reduce clutter.
The algorithm is insecure and yet its description would spread over three paragraphs in the cipher list, including remarkable advice like using a 40 bit key length.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/EVP_EncryptInit.322
-rw-r--r--src/lib/libcrypto/man/EVP_rc4.3109
-rw-r--r--src/lib/libcrypto/man/Makefile3
-rw-r--r--src/lib/libcrypto/man/evp.33
4 files changed, 116 insertions, 21 deletions
diff --git a/src/lib/libcrypto/man/EVP_EncryptInit.3 b/src/lib/libcrypto/man/EVP_EncryptInit.3
index a730923d96..ead07dbb2b 100644
--- a/src/lib/libcrypto/man/EVP_EncryptInit.3
+++ b/src/lib/libcrypto/man/EVP_EncryptInit.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: EVP_EncryptInit.3,v 1.32 2019/03/21 12:54:37 schwarze Exp $ 1.\" $OpenBSD: EVP_EncryptInit.3,v 1.33 2019/03/21 13:37:25 schwarze Exp $
2.\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800 2.\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800
3.\" EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod 3.\" EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod
4.\" 7c6d372a Nov 20 13:20:01 2018 +0000 4.\" 7c6d372a Nov 20 13:20:01 2018 +0000
@@ -110,9 +110,6 @@
110.Nm EVP_CIPHER_param_to_asn1 , 110.Nm EVP_CIPHER_param_to_asn1 ,
111.Nm EVP_CIPHER_asn1_to_param , 111.Nm EVP_CIPHER_asn1_to_param ,
112.Nm EVP_enc_null , 112.Nm EVP_enc_null ,
113.Nm EVP_rc4 ,
114.Nm EVP_rc4_40 ,
115.Nm EVP_rc4_hmac_md5 ,
116.Nm EVP_idea_cbc , 113.Nm EVP_idea_cbc ,
117.Nm EVP_idea_ecb , 114.Nm EVP_idea_ecb ,
118.Nm EVP_idea_cfb64 , 115.Nm EVP_idea_cfb64 ,
@@ -920,16 +917,6 @@ All algorithms have a fixed key length unless otherwise stated.
920.Bl -tag -width Ds 917.Bl -tag -width Ds
921.It Fn EVP_enc_null 918.It Fn EVP_enc_null
922Null cipher: does nothing. 919Null cipher: does nothing.
923.It Fn EVP_rc4
924RC4 stream cipher.
925This is a variable key length cipher with default key length 128 bits.
926.It Fn EVP_rc4_40
927RC4 stream cipher with 40-bit key length.
928This is obsolete and new code should use
929.Fn EVP_rc4
930and the
931.Fn EVP_CIPHER_CTX_set_key_length
932function.
933.It Xo 920.It Xo
934.Fn EVP_idea_cbc , 921.Fn EVP_idea_cbc ,
935.Fn EVP_idea_ecb , 922.Fn EVP_idea_ecb ,
@@ -1000,6 +987,7 @@ The key length is 256 bits, the IV is 96 bits long.
1000See also 987See also
1001.Xr EVP_aes_128_cbc 3 , 988.Xr EVP_aes_128_cbc 3 ,
1002.Xr EVP_des_cbc 3 , 989.Xr EVP_des_cbc 3 ,
990.Xr EVP_rc4 3 ,
1003and 991and
1004.Xr EVP_sm4_cbc 3 . 992.Xr EVP_sm4_cbc 3 .
1005.Ss GCM mode 993.Ss GCM mode
@@ -1207,6 +1195,7 @@ do_crypt(FILE *in, FILE *out, int do_encrypt)
1207.Xr evp 3 , 1195.Xr evp 3 ,
1208.Xr EVP_aes_128_cbc 3 , 1196.Xr EVP_aes_128_cbc 3 ,
1209.Xr EVP_des_cbc 3 , 1197.Xr EVP_des_cbc 3 ,
1198.Xr EVP_rc4 3 ,
1210.Xr EVP_sm4_cbc 3 1199.Xr EVP_sm4_cbc 3
1211.Sh HISTORY 1200.Sh HISTORY
1212.Fn EVP_EncryptInit , 1201.Fn EVP_EncryptInit ,
@@ -1219,7 +1208,6 @@ do_crypt(FILE *in, FILE *out, int do_encrypt)
1219.Fn EVP_CipherUpdate , 1208.Fn EVP_CipherUpdate ,
1220.Fn EVP_CipherFinal , 1209.Fn EVP_CipherFinal ,
1221.Fn EVP_get_cipherbyname , 1210.Fn EVP_get_cipherbyname ,
1222.Fn EVP_rc4 ,
1223.Fn EVP_idea_cbc , 1211.Fn EVP_idea_cbc ,
1224.Fn EVP_idea_ecb , 1212.Fn EVP_idea_ecb ,
1225.Fn EVP_idea_cfb , 1213.Fn EVP_idea_cfb ,
@@ -1315,10 +1303,6 @@ first appeared in OpenSSL 0.9.8b.
1315These functions have been available since 1303These functions have been available since
1316.Ox 4.5 . 1304.Ox 4.5 .
1317.Pp 1305.Pp
1318.Fn EVP_rc4_hmac_md5
1319first appeared in OpenSSL 1.0.1 and has been available since
1320.Ox 5.3 .
1321.Pp
1322.Fn EVP_CIPHER_CTX_reset 1306.Fn EVP_CIPHER_CTX_reset
1323first appeared in OpenSSL 1.1.0 and has been available since 1307first appeared in OpenSSL 1.1.0 and has been available since
1324.Ox 6.3 . 1308.Ox 6.3 .
diff --git a/src/lib/libcrypto/man/EVP_rc4.3 b/src/lib/libcrypto/man/EVP_rc4.3
new file mode 100644
index 0000000000..fda041113c
--- /dev/null
+++ b/src/lib/libcrypto/man/EVP_rc4.3
@@ -0,0 +1,109 @@
1.\" $OpenBSD: EVP_rc4.3,v 1.1 2019/03/21 13:37:25 schwarze Exp $
2.\" full merge up to: OpenSSL 8fa4d95e Oct 21 11:59:09 2017 +0900
3.\"
4.\" This file was written by Ronald Tse <ronald.tse@ribose.com>
5.\" Copyright (c) 2017 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: March 21 2019 $
52.Dt EVP_RC4 3
53.Os
54.Sh NAME
55.Nm EVP_rc4 ,
56.Nm EVP_rc4_40 ,
57.Nm EVP_rc4_hmac_md5
58.Nd EVP RC4 stream cipher
59.Sh SYNOPSIS
60.In openssl/evp.h
61.Ft const EVP_CIPHER *
62.Fn EVP_rc4 void
63.Ft const EVP_CIPHER *
64.Fn EVP_rc4_40 void
65.Ft const EVP_CIPHER *
66.Fn EVP_rc4_hmac_md5 void
67.Sh DESCRIPTION
68These functions provide the RC4 stream cipher in the
69.Xr evp 3
70framework.
71It is a variable key length cipher.
72.Pp
73.Fn EVP_rc4
74uses a default key length of 128 bits.
75.Pp
76.Fn EVP_rc4_40
77uses a key length of 40 bits instead.
78This function is deprecated.
79Use
80.Fn EVP_rc4
81and
82.Xr EVP_CIPHER_CTX_set_key_length 3
83instead.
84.Pp
85.Fn EVP_rc4_hmac_md5
86provides authenticated encryption with the RC4 stream cipher
87with MD5 as HMAC.
88This function is not intended for usage outside of TLS
89and requires calling of some undocumented control functions.
90It does not conform to the EVP AEAD interface.
91.Sh RETURN VALUES
92These functions return an
93.Vt EVP_CIPHER
94structure that provides the implementation of the symmetric cipher.
95.Sh SEE ALSO
96.Xr evp 3 ,
97.Xr EVP_EncryptInit 3
98.Sh HISTORY
99.Fn EVP_rc4
100first appeared in SSLeay 0.5.1
101and
102.Fn EVP_rc4_40
103in OpenSSL 0.9.1.
104These functions have been available since
105.Ox 2.4 .
106.Pp
107.Fn EVP_rc4_hmac_md5
108first appeared in OpenSSL 1.0.1 and has been available since
109.Ox 5.3 .
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 2e885c1bcd..08888f9fef 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.146 2019/03/21 12:54:37 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.147 2019/03/21 13:37:25 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -153,6 +153,7 @@ MAN= \
153 EVP_VerifyInit.3 \ 153 EVP_VerifyInit.3 \
154 EVP_aes_128_cbc.3 \ 154 EVP_aes_128_cbc.3 \
155 EVP_des_cbc.3 \ 155 EVP_des_cbc.3 \
156 EVP_rc4.3 \
156 EVP_sm4_cbc.3 \ 157 EVP_sm4_cbc.3 \
157 EXTENDED_KEY_USAGE_new.3 \ 158 EXTENDED_KEY_USAGE_new.3 \
158 GENERAL_NAME_new.3 \ 159 GENERAL_NAME_new.3 \
diff --git a/src/lib/libcrypto/man/evp.3 b/src/lib/libcrypto/man/evp.3
index 4b1f5568b6..27ecaced4e 100644
--- a/src/lib/libcrypto/man/evp.3
+++ b/src/lib/libcrypto/man/evp.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: evp.3,v 1.8 2019/03/21 12:54:37 schwarze Exp $ 1.\" $OpenBSD: evp.3,v 1.9 2019/03/21 13:37:25 schwarze Exp $
2.\" OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100 2.\" OpenSSL a9c85cea Nov 11 09:33:55 2016 +0100
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org>, 4.\" This file was written by Ulf Moeller <ulf@openssl.org>,
@@ -199,6 +199,7 @@ operations are more efficient using the high level interfaces.
199.Xr EVP_PKEY_sign 3 , 199.Xr EVP_PKEY_sign 3 ,
200.Xr EVP_PKEY_verify 3 , 200.Xr EVP_PKEY_verify 3 ,
201.Xr EVP_PKEY_verify_recover 3 , 201.Xr EVP_PKEY_verify_recover 3 ,
202.Xr EVP_rc4 3 ,
202.Xr EVP_SealInit 3 , 203.Xr EVP_SealInit 3 ,
203.Xr EVP_SignInit 3 , 204.Xr EVP_SignInit 3 ,
204.Xr EVP_sm4_cbc 3 , 205.Xr EVP_sm4_cbc 3 ,