summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2019-03-21 12:54:37 +0000
committerschwarze <>2019-03-21 12:54:37 +0000
commit7d20707156b3fcbf876071ef455a7b2ad1a9e374 (patch)
treeebdb37306b04f31a2115436a0b80ef3d9eb28b93 /src/lib
parente1206d1b262323483476be3ac03fecd1416c9236 (diff)
downloadopenbsd-7d20707156b3fcbf876071ef455a7b2ad1a9e374.tar.gz
openbsd-7d20707156b3fcbf876071ef455a7b2ad1a9e374.tar.bz2
openbsd-7d20707156b3fcbf876071ef455a7b2ad1a9e374.zip
Split EVP_des_cbc(3) out of EVP_EncryptInit(3) to reduce clutter:
this moves a large number of functions out of the way that are no longer the latest and greatest. Also mention a few that were missing.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/EVP_EncryptInit.356
-rw-r--r--src/lib/libcrypto/man/EVP_des_cbc.3221
-rw-r--r--src/lib/libcrypto/man/Makefile3
-rw-r--r--src/lib/libcrypto/man/evp.35
4 files changed, 230 insertions, 55 deletions
diff --git a/src/lib/libcrypto/man/EVP_EncryptInit.3 b/src/lib/libcrypto/man/EVP_EncryptInit.3
index 3afff9f60f..a730923d96 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.31 2019/03/21 11:21:40 schwarze Exp $ 1.\" $OpenBSD: EVP_EncryptInit.3,v 1.32 2019/03/21 12:54:37 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,19 +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_des_cbc ,
114.Nm EVP_des_ecb ,
115.Nm EVP_des_cfb ,
116.Nm EVP_des_ofb ,
117.Nm EVP_des_ede_cbc ,
118.Nm EVP_des_ede ,
119.Nm EVP_des_ede_ofb ,
120.Nm EVP_des_ede_cfb ,
121.Nm EVP_des_ede3_cbc ,
122.Nm EVP_des_ede3 ,
123.Nm EVP_des_ede3_ofb ,
124.Nm EVP_des_ede3_cfb ,
125.Nm EVP_desx_cbc ,
126.Nm EVP_rc4 , 113.Nm EVP_rc4 ,
127.Nm EVP_rc4_40 , 114.Nm EVP_rc4_40 ,
128.Nm EVP_rc4_hmac_md5 , 115.Nm EVP_rc4_hmac_md5 ,
@@ -933,29 +920,6 @@ All algorithms have a fixed key length unless otherwise stated.
933.Bl -tag -width Ds 920.Bl -tag -width Ds
934.It Fn EVP_enc_null 921.It Fn EVP_enc_null
935Null cipher: does nothing. 922Null cipher: does nothing.
936.It Xo
937.Fn EVP_des_cbc ,
938.Fn EVP_des_ecb ,
939.Fn EVP_des_cfb ,
940.Fn EVP_des_ofb
941.Xc
942DES in CBC, ECB, CFB and OFB modes respectively.
943.It Xo
944.Fn EVP_des_ede_cbc ,
945.Fn EVP_des_ede ,
946.Fn EVP_des_ede_ofb ,
947.Fn EVP_des_ede_cfb
948.Xc
949Two key triple DES in CBC, ECB, CFB and OFB modes respectively.
950.It Xo
951.Fn EVP_des_ede3_cbc ,
952.Fn EVP_des_ede3 ,
953.Fn EVP_des_ede3_ofb ,
954.Fn EVP_des_ede3_cfb
955.Xc
956Three key triple DES in CBC, ECB, CFB and OFB modes respectively.
957.It Fn EVP_desx_cbc
958DESX algorithm in CBC mode.
959.It Fn EVP_rc4 923.It Fn EVP_rc4
960RC4 stream cipher. 924RC4 stream cipher.
961This is a variable key length cipher with default key length 128 bits. 925This is a variable key length cipher with default key length 128 bits.
@@ -1034,7 +998,8 @@ The key length is 256 bits, the IV is 96 bits long.
1034.El 998.El
1035.Pp 999.Pp
1036See also 1000See also
1037.Xr EVP_aes_128_cbc 3 1001.Xr EVP_aes_128_cbc 3 ,
1002.Xr EVP_des_cbc 3 ,
1038and 1003and
1039.Xr EVP_sm4_cbc 3 . 1004.Xr EVP_sm4_cbc 3 .
1040.Ss GCM mode 1005.Ss GCM mode
@@ -1241,6 +1206,7 @@ do_crypt(FILE *in, FILE *out, int do_encrypt)
1241.Sh SEE ALSO 1206.Sh SEE ALSO
1242.Xr evp 3 , 1207.Xr evp 3 ,
1243.Xr EVP_aes_128_cbc 3 , 1208.Xr EVP_aes_128_cbc 3 ,
1209.Xr EVP_des_cbc 3 ,
1244.Xr EVP_sm4_cbc 3 1210.Xr EVP_sm4_cbc 3
1245.Sh HISTORY 1211.Sh HISTORY
1246.Fn EVP_EncryptInit , 1212.Fn EVP_EncryptInit ,
@@ -1253,18 +1219,6 @@ do_crypt(FILE *in, FILE *out, int do_encrypt)
1253.Fn EVP_CipherUpdate , 1219.Fn EVP_CipherUpdate ,
1254.Fn EVP_CipherFinal , 1220.Fn EVP_CipherFinal ,
1255.Fn EVP_get_cipherbyname , 1221.Fn EVP_get_cipherbyname ,
1256.Fn EVP_des_cbc ,
1257.Fn EVP_des_ecb ,
1258.Fn EVP_des_cfb ,
1259.Fn EVP_des_ofb ,
1260.Fn EVP_des_ede_cbc ,
1261.Fn EVP_des_ede ,
1262.Fn EVP_des_ede_ofb ,
1263.Fn EVP_des_ede_cfb ,
1264.Fn EVP_des_ede3_cbc ,
1265.Fn EVP_des_ede3 ,
1266.Fn EVP_des_ede3_ofb ,
1267.Fn EVP_des_ede3_cfb ,
1268.Fn EVP_rc4 , 1222.Fn EVP_rc4 ,
1269.Fn EVP_idea_cbc , 1223.Fn EVP_idea_cbc ,
1270.Fn EVP_idea_ecb , 1224.Fn EVP_idea_ecb ,
@@ -1278,8 +1232,6 @@ first appeared in SSLeay 0.5.1.
1278and 1232and
1279.Fn EVP_rc2_ofb 1233.Fn EVP_rc2_ofb
1280first appeared in SSLeay 0.5.2. 1234first appeared in SSLeay 0.5.2.
1281.Fn EVP_desx_cbc
1282first appeared in SSLeay 0.6.2.
1283.Fn EVP_CIPHER_block_size , 1235.Fn EVP_CIPHER_block_size ,
1284.Fn EVP_CIPHER_key_length , 1236.Fn EVP_CIPHER_key_length ,
1285.Fn EVP_CIPHER_iv_length , 1237.Fn EVP_CIPHER_iv_length ,
diff --git a/src/lib/libcrypto/man/EVP_des_cbc.3 b/src/lib/libcrypto/man/EVP_des_cbc.3
new file mode 100644
index 0000000000..759e03fac0
--- /dev/null
+++ b/src/lib/libcrypto/man/EVP_des_cbc.3
@@ -0,0 +1,221 @@
1.\" $OpenBSD: EVP_des_cbc.3,v 1.1 2019/03/21 12:54:37 schwarze Exp $
2.\" full merge up to:
3.\" OpenSSL EVP_desx_cbc.pod 8fa4d95e Oct 21 11:59:09 2017 +0900
4.\" selective merge up to:
5.\" OpenSSL EVP_des.pod 7c6d372a Nov 20 13:20:01 2018 +0000
6.\"
7.\" This file was written by Ronald Tse <ronald.tse@ribose.com>
8.\" Copyright (c) 2017 The OpenSSL Project. All rights reserved.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\"
14.\" 1. Redistributions of source code must retain the above copyright
15.\" notice, this list of conditions and the following disclaimer.
16.\"
17.\" 2. Redistributions in binary form must reproduce the above copyright
18.\" notice, this list of conditions and the following disclaimer in
19.\" the documentation and/or other materials provided with the
20.\" distribution.
21.\"
22.\" 3. All advertising materials mentioning features or use of this
23.\" software must display the following acknowledgment:
24.\" "This product includes software developed by the OpenSSL Project
25.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26.\"
27.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
28.\" endorse or promote products derived from this software without
29.\" prior written permission. For written permission, please contact
30.\" openssl-core@openssl.org.
31.\"
32.\" 5. Products derived from this software may not be called "OpenSSL"
33.\" nor may "OpenSSL" appear in their names without prior written
34.\" permission of the OpenSSL Project.
35.\"
36.\" 6. Redistributions of any form whatsoever must retain the following
37.\" acknowledgment:
38.\" "This product includes software developed by the OpenSSL Project
39.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
40.\"
41.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
42.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
44.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
45.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
46.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
47.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
48.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
50.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
51.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
52.\" OF THE POSSIBILITY OF SUCH DAMAGE.
53.\"
54.Dd $Mdocdate: March 21 2019 $
55.Dt EVP_DES_CBC 3
56.Os
57.Sh NAME
58.Nm EVP_des_cbc ,
59.Nm EVP_des_cfb ,
60.Nm EVP_des_cfb1 ,
61.Nm EVP_des_cfb8 ,
62.Nm EVP_des_cfb64 ,
63.Nm EVP_des_ecb ,
64.Nm EVP_des_ofb ,
65.Nm EVP_des_ede ,
66.Nm EVP_des_ede_cbc ,
67.Nm EVP_des_ede_cfb ,
68.Nm EVP_des_ede_cfb64 ,
69.Nm EVP_des_ede_ecb ,
70.Nm EVP_des_ede_ofb ,
71.Nm EVP_des_ede3 ,
72.Nm EVP_des_ede3_cbc ,
73.Nm EVP_des_ede3_cfb ,
74.Nm EVP_des_ede3_cfb1 ,
75.Nm EVP_des_ede3_cfb8 ,
76.Nm EVP_des_ede3_cfb64 ,
77.Nm EVP_des_ede3_ecb ,
78.Nm EVP_des_ede3_ofb ,
79.Nm EVP_desx_cbc
80.Nd EVP DES cipher
81.Sh SYNOPSIS
82.In openssl/evp.h
83.Ft const EVP_CIPHER *
84.Fn EVP_des_cbc void
85.Ft const EVP_CIPHER *
86.Fn EVP_des_cfb void
87.Ft const EVP_CIPHER *
88.Fn EVP_des_cfb1 void
89.Ft const EVP_CIPHER *
90.Fn EVP_des_cfb8 void
91.Ft const EVP_CIPHER *
92.Fn EVP_des_cfb64 void
93.Ft const EVP_CIPHER *
94.Fn EVP_des_ecb void
95.Ft const EVP_CIPHER *
96.Fn EVP_des_ofb void
97.Ft const EVP_CIPHER *
98.Fn EVP_des_ede void
99.Ft const EVP_CIPHER *
100.Fn EVP_des_ede_cbc void
101.Ft const EVP_CIPHER *
102.Fn EVP_des_ede_cfb void
103.Ft const EVP_CIPHER *
104.Fn EVP_des_ede_cfb64 void
105.Ft const EVP_CIPHER *
106.Fn EVP_des_ede_ecb void
107.Ft const EVP_CIPHER *
108.Fn EVP_des_ede_ofb void
109.Ft const EVP_CIPHER *
110.Fn EVP_des_ede3 void
111.Ft const EVP_CIPHER *
112.Fn EVP_des_ede3_cbc void
113.Ft const EVP_CIPHER *
114.Fn EVP_des_ede3_cfb void
115.Ft const EVP_CIPHER *
116.Fn EVP_des_ede3_cfb1 void
117.Ft const EVP_CIPHER *
118.Fn EVP_des_ede3_cfb8 void
119.Ft const EVP_CIPHER *
120.Fn EVP_des_ede3_cfb64 void
121.Ft const EVP_CIPHER *
122.Fn EVP_des_ede3_ecb void
123.Ft const EVP_CIPHER *
124.Fn EVP_des_ede3_ofb void
125.Ft const EVP_CIPHER *
126.Fn EVP_desx_cbc void
127.Sh DESCRIPTION
128These functions provide the DES encryption algorithm in the
129.Xr evp 3
130framework.
131.Pp
132.Fn EVP_des_cbc ,
133.Fn EVP_des_cfb1 ,
134.Fn EVP_des_cfb8 ,
135.Fn EVP_des_cfb64 ,
136.Fn EVP_des_ecb ,
137and
138.Fn EVP_des_ofb
139provide DES in CBC, CFB with 1-bit shift, CFB with 8-bit shift,
140CFB with 64-bit shift, ECB, and OFB modes.
141.Fn EVP_des_cfb
142is an alias for
143.Fn EVP_des_cfb64 ,
144implemented as a macro.
145.Pp
146.Fn EVP_des_ede_cbc ,
147.Fn EVP_des_ede_cfb64 ,
148.Fn EVP_des_ede_ecb ,
149and
150.Fn EVP_des_ede_ofb
151provide two key triple DES in CBC, CFB with 64-bit shift, ECB, and OFB modes.
152.Fn EVP_des_ede_cfb
153is an alias for
154.Fn EVP_des_ede_cfb64 ,
155implemented as a macro.
156.Fn EVP_des_ede
157is an alias for
158.Fn EVP_des_ede_ecb .
159.Pp
160.Fn EVP_des_ede3_cbc ,
161.Fn EVP_des_ede3_cfb1 ,
162.Fn EVP_des_ede3_cfb8 ,
163.Fn EVP_des_ede3_cfb64 ,
164.Fn EVP_des_ede3_ecb ,
165.Fn EVP_des_ede3_ofb
166provide three key triple DES in CBC, CFB with 1-bit shift, CFB with 8-bit
167shift, CFB with 64-bit shift, ECB, and OFB modes.
168.Fn EVP_des_ede3_cfb
169is an alias for
170.Fn EVP_des_ede3_cfb64 ,
171implemented as a macro.
172.Fn EVP_des_ede3
173is an alias for
174.Fn EVP_des_ede3_ecb .
175.Pp
176.Fn EVP_desx_cbc
177provides the DES-X encryption algorithm in CBC mode.
178It uses a key length of 128 bits and acts on blocks of 128 bits.
179.Sh RETURN VALUES
180These functions return an
181.Vt EVP_CIPHER
182structure that provides the implementation of the symmetric cipher.
183.Sh SEE ALSO
184.Xr evp 3 ,
185.Xr EVP_EncryptInit 3
186.Sh HISTORY
187.Fn EVP_des_cbc ,
188.Fn EVP_des_cfb ,
189.Fn EVP_des_ecb ,
190.Fn EVP_des_ofb ,
191.Fn EVP_des_ede ,
192.Fn EVP_des_ede_cbc ,
193.Fn EVP_des_ede_cfb ,
194.Fn EVP_des_ede_ofb ,
195.Fn EVP_des_ede3 ,
196.Fn EVP_des_ede3_cbc ,
197.Fn EVP_des_ede3_cfb ,
198and
199.Fn EVP_des_ede3_ofb
200first appeared in SSLeay 0.5.1.
201.Fn EVP_desx_cbc
202first appeared in SSLeay 0.6.2.
203These functions have been available since
204.Ox 2.4 .
205.Pp
206.Fn EVP_des_ede_ecb
207and
208.Fn EVP_des_ede3_ecb
209first appeared in OpenSSL 0.9.7 and have been available since
210.Ox 3.2 .
211.Pp
212.Fn EVP_des_cfb1 ,
213.Fn EVP_des_cfb8 ,
214.Fn EVP_des_cfb64 ,
215.Fn EVP_des_ede_cfb64 ,
216.Fn EVP_des_ede3_cfb1 ,
217.Fn EVP_des_ede3_cfb8 ,
218and
219.Fn EVP_des_ede3_cfb64
220first appeared in OpenSSL 0.9.7e and have been available since
221.Ox 3.8 .
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 884e5257ef..2e885c1bcd 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.145 2019/03/18 11:38:16 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.146 2019/03/21 12:54:37 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -152,6 +152,7 @@ MAN= \
152 EVP_SignInit.3 \ 152 EVP_SignInit.3 \
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_sm4_cbc.3 \ 156 EVP_sm4_cbc.3 \
156 EXTENDED_KEY_USAGE_new.3 \ 157 EXTENDED_KEY_USAGE_new.3 \
157 GENERAL_NAME_new.3 \ 158 GENERAL_NAME_new.3 \
diff --git a/src/lib/libcrypto/man/evp.3 b/src/lib/libcrypto/man/evp.3
index 6dbd884c72..4b1f5568b6 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.7 2019/03/18 11:38:16 schwarze Exp $ 1.\" $OpenBSD: evp.3,v 1.8 2019/03/21 12:54:37 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>,
@@ -51,7 +51,7 @@
51.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
52.\" OF THE POSSIBILITY OF SUCH DAMAGE. 52.\" OF THE POSSIBILITY OF SUCH DAMAGE.
53.\" 53.\"
54.Dd $Mdocdate: March 18 2019 $ 54.Dd $Mdocdate: March 21 2019 $
55.Dt EVP 3 55.Dt EVP 3
56.Os 56.Os
57.Sh NAME 57.Sh NAME
@@ -184,6 +184,7 @@ operations are more efficient using the high level interfaces.
184.Xr EVP_AEAD_CTX_init 3 , 184.Xr EVP_AEAD_CTX_init 3 ,
185.Xr EVP_aes_128_cbc 3 , 185.Xr EVP_aes_128_cbc 3 ,
186.Xr EVP_BytesToKey 3 , 186.Xr EVP_BytesToKey 3 ,
187.Xr EVP_des_cbc 3 ,
187.Xr EVP_DigestInit 3 , 188.Xr EVP_DigestInit 3 ,
188.Xr EVP_DigestSignInit 3 , 189.Xr EVP_DigestSignInit 3 ,
189.Xr EVP_EncryptInit 3 , 190.Xr EVP_EncryptInit 3 ,