diff options
Diffstat (limited to 'src/lib/libcrypto/man')
| -rw-r--r-- | src/lib/libcrypto/man/DES_set_key.3 | 93 |
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 |
| 412 | This library contains a fast implementation of the DES encryption | 394 | This library contains a fast implementation of the DES encryption |
| 413 | algorithm. | 395 | algorithm. |
| @@ -686,71 +668,6 @@ This function calls | |||
| 686 | with a static array passed as the third parameter. | 668 | with a static array passed as the third parameter. |
| 687 | This emulates the normal non-thread safe semantics of | 669 | This emulates the normal non-thread safe semantics of |
| 688 | .Xr crypt 3 . | 670 | .Xr crypt 3 . |
| 689 | .Pp | ||
| 690 | .Fn DES_enc_write | ||
| 691 | writes | ||
| 692 | .Fa len | ||
| 693 | bytes to file descriptor | ||
| 694 | .Fa fd | ||
| 695 | from buffer | ||
| 696 | .Fa buf . | ||
| 697 | The data is encrypted via | ||
| 698 | .Em pcbc_encrypt | ||
| 699 | (default) using | ||
| 700 | .Fa sched | ||
| 701 | for the key and | ||
| 702 | .Fa iv | ||
| 703 | as a starting vector. | ||
| 704 | The actual data send down | ||
| 705 | .Fa fd | ||
| 706 | consists of 4 bytes (in network byte order) containing the length of the | ||
| 707 | following encrypted data. | ||
| 708 | The encrypted data then follows, padded with random data out to a | ||
| 709 | multiple of 8 bytes. | ||
| 710 | .Pp | ||
| 711 | .Fn DES_enc_read | ||
| 712 | is used to read | ||
| 713 | .Fa len | ||
| 714 | bytes from file descriptor | ||
| 715 | .Fa fd | ||
| 716 | into buffer | ||
| 717 | .Fa buf . | ||
| 718 | The data being read from | ||
| 719 | .Fa fd | ||
| 720 | is assumed to have come from | ||
| 721 | .Fn DES_enc_write | ||
| 722 | and is decrypted using | ||
| 723 | .Fa sched | ||
| 724 | for the key schedule and | ||
| 725 | .Fa iv | ||
| 726 | for the initial vector. | ||
| 727 | .Pp | ||
| 728 | .Sy Warning : | ||
| 729 | The data format used by | ||
| 730 | .Fn DES_enc_write | ||
| 731 | and | ||
| 732 | .Fn DES_enc_read | ||
| 733 | has a cryptographic weakness: when asked to write more than | ||
| 734 | .Dv MAXWRITE | ||
| 735 | bytes, | ||
| 736 | .Fn DES_enc_write | ||
| 737 | will split the data into several chunks that are all encrypted using the | ||
| 738 | same IV. | ||
| 739 | So don't use these functions unless you are sure you know what | ||
| 740 | you do (in which case you might not want to use them anyway). | ||
| 741 | They cannot handle non-blocking sockets. | ||
| 742 | .Fn DES_enc_read | ||
| 743 | uses an internal state and thus cannot be used on multiple files. | ||
| 744 | .Pp | ||
| 745 | .Em DES_rw_mode | ||
| 746 | is used to specify the encryption mode to use with | ||
| 747 | .Fn DES_enc_read . | ||
| 748 | If set to | ||
| 749 | .Dv DES_PCBC_MODE | ||
| 750 | (the default), DES_pcbc_encrypt is used. | ||
| 751 | If set to | ||
| 752 | .Dv DES_CBC_MODE , | ||
| 753 | DES_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 , | ||
| 807 | and | 722 | and |
| 808 | .Fn DES_enc_write | 723 | .Fn DES_crypt |
| 809 | appeared in SSLeay 0.4 or earlier. | 724 | appeared in SSLeay 0.4 or earlier. |
| 810 | .Fn DES_ncbc_encrypt | 725 | .Fn DES_ncbc_encrypt |
| 811 | first appeared in SSLeay 0.4.2. | 726 | first appeared in SSLeay 0.4.2. |
