summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2024-05-24 19:18:07 +0000
committertb <>2024-05-24 19:18:07 +0000
commitc52d22a54e3e92a05e10d77718764489ae76ac13 (patch)
tree13d4e804566cd017c5f11ab4707202530d86e487
parenta6943bfa57b92147bf35e505e1ee3679d7651bcb (diff)
downloadopenbsd-c52d22a54e3e92a05e10d77718764489ae76ac13.tar.gz
openbsd-c52d22a54e3e92a05e10d77718764489ae76ac13.tar.bz2
openbsd-c52d22a54e3e92a05e10d77718764489ae76ac13.zip
Remove documentation of DES_enc_{read,write} and DES_rw_mode
ok jsing
-rw-r--r--src/lib/libcrypto/man/DES_set_key.393
1 files changed, 4 insertions, 89 deletions
diff --git a/src/lib/libcrypto/man/DES_set_key.3 b/src/lib/libcrypto/man/DES_set_key.3
index 16188f1f28..fd09d77730 100644
--- a/src/lib/libcrypto/man/DES_set_key.3
+++ b/src/lib/libcrypto/man/DES_set_key.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: DES_set_key.3,v 1.16 2023/11/16 20:27:43 schwarze Exp $ 1.\" $OpenBSD: DES_set_key.3,v 1.17 2024/05/24 19:18:07 tb Exp $
2.\" full merge up to: 2.\" full merge up to:
3.\" OpenSSL man3/DES_random_key 521738e9 Oct 5 14:58:30 2018 -0400 3.\" OpenSSL man3/DES_random_key 521738e9 Oct 5 14:58:30 2018 -0400
4.\" 4.\"
@@ -115,7 +115,7 @@
115.\" copied and put under another distribution licence 115.\" copied and put under another distribution licence
116.\" [including the GNU Public Licence.] 116.\" [including the GNU Public Licence.]
117.\" 117.\"
118.Dd $Mdocdate: November 16 2023 $ 118.Dd $Mdocdate: May 24 2024 $
119.Dt DES_SET_KEY 3 119.Dt DES_SET_KEY 3
120.Os 120.Os
121.Sh NAME 121.Sh NAME
@@ -148,9 +148,7 @@
148.Nm DES_string_to_key , 148.Nm DES_string_to_key ,
149.Nm DES_string_to_2keys , 149.Nm DES_string_to_2keys ,
150.Nm DES_fcrypt , 150.Nm DES_fcrypt ,
151.Nm DES_crypt , 151.Nm DES_crypt
152.Nm DES_enc_read ,
153.Nm DES_enc_write
154.Nd DES encryption 152.Nd DES encryption
155.Sh SYNOPSIS 153.Sh SYNOPSIS
156.In openssl/des.h 154.In openssl/des.h
@@ -392,22 +390,6 @@
392.Fa "const char *buf" 390.Fa "const char *buf"
393.Fa "const char *salt" 391.Fa "const char *salt"
394.Fc 392.Fc
395.Ft int
396.Fo DES_enc_read
397.Fa "int fd"
398.Fa "void *buf"
399.Fa "int len"
400.Fa "DES_key_schedule *sched"
401.Fa "DES_cblock *iv"
402.Fc
403.Ft int
404.Fo DES_enc_write
405.Fa "int fd"
406.Fa "const void *buf"
407.Fa "int len"
408.Fa "DES_key_schedule *sched"
409.Fa "DES_cblock *iv"
410.Fc
411.Sh DESCRIPTION 393.Sh DESCRIPTION
412This library contains a fast implementation of the DES encryption 394This library contains a fast implementation of the DES encryption
413algorithm. 395algorithm.
@@ -686,71 +668,6 @@ This function calls
686with a static array passed as the third parameter. 668with a static array passed as the third parameter.
687This emulates the normal non-thread safe semantics of 669This emulates the normal non-thread safe semantics of
688.Xr crypt 3 . 670.Xr crypt 3 .
689.Pp
690.Fn DES_enc_write
691writes
692.Fa len
693bytes to file descriptor
694.Fa fd
695from buffer
696.Fa buf .
697The data is encrypted via
698.Em pcbc_encrypt
699(default) using
700.Fa sched
701for the key and
702.Fa iv
703as a starting vector.
704The actual data send down
705.Fa fd
706consists of 4 bytes (in network byte order) containing the length of the
707following encrypted data.
708The encrypted data then follows, padded with random data out to a
709multiple of 8 bytes.
710.Pp
711.Fn DES_enc_read
712is used to read
713.Fa len
714bytes from file descriptor
715.Fa fd
716into buffer
717.Fa buf .
718The data being read from
719.Fa fd
720is assumed to have come from
721.Fn DES_enc_write
722and is decrypted using
723.Fa sched
724for the key schedule and
725.Fa iv
726for the initial vector.
727.Pp
728.Sy Warning :
729The data format used by
730.Fn DES_enc_write
731and
732.Fn DES_enc_read
733has a cryptographic weakness: when asked to write more than
734.Dv MAXWRITE
735bytes,
736.Fn DES_enc_write
737will split the data into several chunks that are all encrypted using the
738same IV.
739So don't use these functions unless you are sure you know what
740you do (in which case you might not want to use them anyway).
741They cannot handle non-blocking sockets.
742.Fn DES_enc_read
743uses an internal state and thus cannot be used on multiple files.
744.Pp
745.Em DES_rw_mode
746is used to specify the encryption mode to use with
747.Fn DES_enc_read .
748If set to
749.Dv DES_PCBC_MODE
750(the default), DES_pcbc_encrypt is used.
751If set to
752.Dv DES_CBC_MODE ,
753DES_cbc_encrypt is used.
754.Sh RETURN VALUES 671.Sh RETURN VALUES
755.Fn DES_set_key , 672.Fn DES_set_key ,
756.Fn DES_key_sched , 673.Fn DES_key_sched ,
@@ -802,10 +719,8 @@ with the MIT Kerberos library.
802.Fn DES_quad_cksum , 719.Fn DES_quad_cksum ,
803.Fn DES_string_to_key , 720.Fn DES_string_to_key ,
804.Fn DES_string_to_2keys , 721.Fn DES_string_to_2keys ,
805.Fn DES_crypt ,
806.Fn DES_enc_read ,
807and 722and
808.Fn DES_enc_write 723.Fn DES_crypt
809appeared in SSLeay 0.4 or earlier. 724appeared in SSLeay 0.4 or earlier.
810.Fn DES_ncbc_encrypt 725.Fn DES_ncbc_encrypt
811first appeared in SSLeay 0.4.2. 726first appeared in SSLeay 0.4.2.