Regen man pages with modern pod2man to get more normalised version.
This commit is contained in:
parent
1e8d9fce59
commit
86c2d11e12
180
crypto/external/bsd/openssl/lib/libdes/des.3
vendored
180
crypto/external/bsd/openssl/lib/libdes/des.3
vendored
@ -1,26 +1,11 @@
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Wed Jul 23 14:41:57 2003
|
||||
.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
.de Sh \" Subsection heading
|
||||
.br
|
||||
.if t .Sp
|
||||
.ne 5
|
||||
.PP
|
||||
\fB\\$1\fR
|
||||
.PP
|
||||
..
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Ip \" List item
|
||||
.br
|
||||
.ie \\n(.$>=3 .ne \\$3
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
@ -28,16 +13,15 @@
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. | will give a
|
||||
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
|
||||
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
|
||||
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
|
||||
.tr \(*W-|\(bv\*(Tr
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
@ -46,8 +30,8 @@
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` `
|
||||
. ds C' '
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
@ -56,26 +40,28 @@
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr
|
||||
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
|
||||
.\" index entries marked with X<> in POD. Of course, you'll have to process
|
||||
.\" the output yourself in some meaningful fashion.
|
||||
.if \nF \{\
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
. .
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.\"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it
|
||||
.\" makes way too many mistakes in technical documents.
|
||||
.hy 0
|
||||
.if n .na
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
.bd B 3
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
@ -135,11 +121,14 @@
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ======================================================================
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "des 3"
|
||||
.TH des 3 "0.9.6j" "2003-07-23" "libdes"
|
||||
.UC
|
||||
.TH des 3 "2009-07-20" "0.9.6j" "libdes"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
des_random_key, des_set_key, des_key_sched, des_set_key_checked,
|
||||
des_set_key_unchecked, des_set_odd_parity, des_is_weak_key,
|
||||
@ -150,39 +139,34 @@ des_ede2_cfb64_encrypt, des_ede2_ofb64_encrypt, des_ede3_cbc_encrypt,
|
||||
des_ede3_cbcm_encrypt, des_ede3_cfb64_encrypt, des_ede3_ofb64_encrypt,
|
||||
des_read_password, des_read_2passwords, des_read_pw_string,
|
||||
des_cbc_cksum, des_quad_cksum, des_string_to_key, des_string_to_2keys,
|
||||
des_fcrypt, des_crypt, des_enc_read, des_enc_write \- \s-1DES\s0 encryption
|
||||
des_fcrypt, des_crypt, des_enc_read, des_enc_write \- DES encryption
|
||||
.SH "SYNOPSIS"
|
||||
.IX Header "SYNOPSIS"
|
||||
.Vb 1
|
||||
\& #include <openssl/des.h>
|
||||
.Ve
|
||||
.Vb 1
|
||||
\&
|
||||
\& void des_random_key(des_cblock *ret);
|
||||
.Ve
|
||||
.Vb 6
|
||||
\&
|
||||
\& int des_set_key(const_des_cblock *key, des_key_schedule schedule);
|
||||
\& int des_key_sched(const_des_cblock *key, des_key_schedule schedule);
|
||||
\& int des_set_key_checked(const_des_cblock *key,
|
||||
\& des_key_schedule schedule);
|
||||
\& void des_set_key_unchecked(const_des_cblock *key,
|
||||
\& des_key_schedule schedule);
|
||||
.Ve
|
||||
.Vb 2
|
||||
\&
|
||||
\& void des_set_odd_parity(des_cblock *key);
|
||||
\& int des_is_weak_key(const_des_cblock *key);
|
||||
.Ve
|
||||
.Vb 7
|
||||
\& void des_ecb_encrypt(const_des_cblock *input, des_cblock *output,
|
||||
\&
|
||||
\& void des_ecb_encrypt(const_des_cblock *input, des_cblock *output,
|
||||
\& des_key_schedule ks, int enc);
|
||||
\& void des_ecb2_encrypt(const_des_cblock *input, des_cblock *output,
|
||||
\& void des_ecb2_encrypt(const_des_cblock *input, des_cblock *output,
|
||||
\& des_key_schedule ks1, des_key_schedule ks2, int enc);
|
||||
\& void des_ecb3_encrypt(const_des_cblock *input, des_cblock *output,
|
||||
\& des_key_schedule ks1, des_key_schedule ks2,
|
||||
\& void des_ecb3_encrypt(const_des_cblock *input, des_cblock *output,
|
||||
\& des_key_schedule ks1, des_key_schedule ks2,
|
||||
\& des_key_schedule ks3, int enc);
|
||||
.Ve
|
||||
.Vb 18
|
||||
\& void des_ncbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
\&
|
||||
\& void des_ncbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
\& int enc);
|
||||
\& void des_cfb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& int numbits, long length, des_key_schedule schedule,
|
||||
@ -190,8 +174,8 @@ des_fcrypt, des_crypt, des_enc_read, des_enc_write \- \s-1DES\s0 encryption
|
||||
\& void des_ofb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& int numbits, long length, des_key_schedule schedule,
|
||||
\& des_cblock *ivec);
|
||||
\& void des_pcbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
\& void des_pcbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
\& int enc);
|
||||
\& void des_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
@ -199,13 +183,11 @@ des_fcrypt, des_crypt, des_enc_read, des_enc_write \- \s-1DES\s0 encryption
|
||||
\& void des_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
\& int *num);
|
||||
.Ve
|
||||
.Vb 3
|
||||
\& void des_xcbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
\&
|
||||
\& void des_xcbc_encrypt(const unsigned char *input, unsigned char *output,
|
||||
\& long length, des_key_schedule schedule, des_cblock *ivec,
|
||||
\& const_des_cblock *inw, const_des_cblock *outw, int enc);
|
||||
.Ve
|
||||
.Vb 9
|
||||
\&
|
||||
\& void des_ede2_cbc_encrypt(const unsigned char *input,
|
||||
\& unsigned char *output, long length, des_key_schedule ks1,
|
||||
\& des_key_schedule ks2, des_cblock *ivec, int enc);
|
||||
@ -215,47 +197,42 @@ des_fcrypt, des_crypt, des_enc_read, des_enc_write \- \s-1DES\s0 encryption
|
||||
\& void des_ede2_ofb64_encrypt(const unsigned char *in,
|
||||
\& unsigned char *out, long length, des_key_schedule ks1,
|
||||
\& des_key_schedule ks2, des_cblock *ivec, int *num);
|
||||
.Ve
|
||||
.Vb 15
|
||||
\&
|
||||
\& void des_ede3_cbc_encrypt(const unsigned char *input,
|
||||
\& unsigned char *output, long length, des_key_schedule ks1,
|
||||
\& des_key_schedule ks2, des_key_schedule ks3, des_cblock *ivec,
|
||||
\& int enc);
|
||||
\& void des_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& long length, des_key_schedule ks1, des_key_schedule ks2,
|
||||
\& des_key_schedule ks3, des_cblock *ivec1, des_cblock *ivec2,
|
||||
\& void des_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& long length, des_key_schedule ks1, des_key_schedule ks2,
|
||||
\& des_key_schedule ks3, des_cblock *ivec1, des_cblock *ivec2,
|
||||
\& int enc);
|
||||
\& void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& long length, des_key_schedule ks1, des_key_schedule ks2,
|
||||
\& des_key_schedule ks3, des_cblock *ivec, int *num, int enc);
|
||||
\& void des_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& long length, des_key_schedule ks1,
|
||||
\& des_key_schedule ks2, des_key_schedule ks3,
|
||||
\& void des_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
\& long length, des_key_schedule ks1,
|
||||
\& des_key_schedule ks2, des_key_schedule ks3,
|
||||
\& des_cblock *ivec, int *num);
|
||||
.Ve
|
||||
.Vb 5
|
||||
\&
|
||||
\& int des_read_password(des_cblock *key, const char *prompt, int verify);
|
||||
\& int des_read_2passwords(des_cblock *key1, des_cblock *key2,
|
||||
\& int des_read_2passwords(des_cblock *key1, des_cblock *key2,
|
||||
\& const char *prompt, int verify);
|
||||
\& int des_read_pw_string(char *buf, int length, const char *prompt,
|
||||
\& int verify);
|
||||
.Ve
|
||||
.Vb 8
|
||||
\& DES_LONG des_cbc_cksum(const unsigned char *input, des_cblock *output,
|
||||
\& long length, des_key_schedule schedule,
|
||||
\&
|
||||
\& DES_LONG des_cbc_cksum(const unsigned char *input, des_cblock *output,
|
||||
\& long length, des_key_schedule schedule,
|
||||
\& const_des_cblock *ivec);
|
||||
\& DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
|
||||
\& DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
|
||||
\& long length, int out_count, des_cblock *seed);
|
||||
\& void des_string_to_key(const char *str, des_cblock *key);
|
||||
\& void des_string_to_2keys(const char *str, des_cblock *key1,
|
||||
\& des_cblock *key2);
|
||||
.Ve
|
||||
.Vb 3
|
||||
\&
|
||||
\& char *des_fcrypt(const char *buf, const char *salt, char *ret);
|
||||
\& char *des_crypt(const char *buf, const char *salt);
|
||||
\& char *crypt(const char *buf, const char *salt);
|
||||
.Ve
|
||||
.Vb 4
|
||||
\&
|
||||
\& int des_enc_read(int fd, void *buf, int len, des_key_schedule sched,
|
||||
\& des_cblock *iv);
|
||||
\& int des_enc_write(int fd, const void *buf, int len,
|
||||
@ -274,7 +251,7 @@ each byte is the parity bit. The key schedule is an expanded form of
|
||||
the key; it is used to speed the encryption process.
|
||||
.PP
|
||||
\&\fIdes_random_key()\fR generates a random key. The \s-1PRNG\s0 must be seeded
|
||||
prior to using this function (see rand(3); for backward
|
||||
prior to using this function (see \fIrand\fR\|(3); for backward
|
||||
compatibility the function \fIdes_random_seed()\fR is available as well).
|
||||
If the \s-1PRNG\s0 could not generate a secure key, 0 is returned. In
|
||||
earlier versions of the library, \fIdes_random_key()\fR did not generate
|
||||
@ -350,6 +327,9 @@ The \fIdes_ede2_cbc_encrypt()\fR macro implements two-key Triple-DES by
|
||||
reusing \fIks1\fR for the final encryption. \f(CW\*(C`C=E(ks1,D(ks2,E(ks1,M)))\*(C'\fR.
|
||||
This form of Triple-DES is used by the \s-1RSAREF\s0 library.
|
||||
.PP
|
||||
\&\fIdes_pcbc_encrypt()\fR encrypt/decrypts using the propagating cipher block
|
||||
chaining mode used by Kerberos v4. Its parameters are the same as
|
||||
\&\fIdes_ncbc_encrypt()\fR.
|
||||
.PP
|
||||
\&\fIdes_cfb_encrypt()\fR encrypt/decrypts using cipher feedback mode. This
|
||||
method takes an array of characters as input and outputs and array of
|
||||
@ -384,6 +364,10 @@ Feed Back mode.
|
||||
\&\fIdes_ede3_ofb64_encrypt()\fR and \fIdes_ede2_ofb64_encrypt()\fR is the same as
|
||||
\&\fIdes_ofb64_encrypt()\fR, using Triple-DES.
|
||||
.PP
|
||||
The following functions are included in the \s-1DES\s0 library for
|
||||
compatibility with the \s-1MIT\s0 Kerberos library. \fIdes_read_pw_string()\fR
|
||||
is also available under the name \fIEVP_read_pw_string()\fR.
|
||||
.PP
|
||||
\&\fIdes_read_pw_string()\fR writes the string specified by \fIprompt\fR to
|
||||
standard output, turns echo off and reads in input string from the
|
||||
terminal. The string is returned in \fIbuf\fR, which must have space for
|
||||
@ -400,6 +384,18 @@ available for backward compatibility with the \s-1MIT\s0 library. New
|
||||
applications should use a cryptographic hash function. The same
|
||||
applies for \fIdes_string_to_2key()\fR.
|
||||
.PP
|
||||
\&\fIdes_cbc_cksum()\fR produces an 8 byte checksum based on the input stream
|
||||
(via \s-1CBC\s0 encryption). The last 4 bytes of the checksum are returned
|
||||
and the complete 8 bytes are placed in \fIoutput\fR. This function is
|
||||
used by Kerberos v4. Other applications should use
|
||||
\&\fIEVP_DigestInit\fR\|(3) etc. instead.
|
||||
.PP
|
||||
\&\fIdes_quad_cksum()\fR is a Kerberos v4 function. It returns a 4 byte
|
||||
checksum from the input bytes. The algorithm can be iterated over the
|
||||
input, depending on \fIout_count\fR, 1, 2, 3 or 4 times. If \fIoutput\fR is
|
||||
non-NULL, the 8 bytes generated by each pass are written into
|
||||
\&\fIoutput\fR.
|
||||
.PP
|
||||
The following are DES-based transformations:
|
||||
.PP
|
||||
\&\fIdes_fcrypt()\fR is a fast version of the Unix \fIcrypt\fR\|(3) function. This
|
||||
@ -443,9 +439,9 @@ des_cbc_encrypt is used.
|
||||
.SH "NOTES"
|
||||
.IX Header "NOTES"
|
||||
Single-key \s-1DES\s0 is insecure due to its short key size. \s-1ECB\s0 mode is
|
||||
not suitable for most applications; see des_modes(7).
|
||||
not suitable for most applications; see \fIdes_modes\fR\|(7).
|
||||
.PP
|
||||
The evp(3) library provides higher-level encryption functions.
|
||||
The \fIevp\fR\|(3) library provides higher-level encryption functions.
|
||||
.SH "BUGS"
|
||||
.IX Header "BUGS"
|
||||
\&\fIdes_3cbc_encrypt()\fR is flawed and must not be used in applications.
|
||||
@ -468,14 +464,18 @@ normally generates the most problems when porting this code.
|
||||
.SH "CONFORMING TO"
|
||||
.IX Header "CONFORMING TO"
|
||||
\&\s-1ANSI\s0 X3.106
|
||||
.PP
|
||||
The \fBdes\fR library was written to be source code compatible with
|
||||
the \s-1MIT\s0 Kerberos library.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fIcrypt\fR\|(3), des_modes(7), evp(3), rand(3)
|
||||
\&\fIcrypt\fR\|(3), \fIdes_modes\fR\|(7), \fIevp\fR\|(3), \fIrand\fR\|(3)
|
||||
.SH "HISTORY"
|
||||
.IX Header "HISTORY"
|
||||
\&\fIdes_cbc_cksum()\fR, \fIdes_cbc_encrypt()\fR, \fIdes_ecb_encrypt()\fR,
|
||||
\&\fIdes_is_weak_key()\fR, \fIdes_key_sched()\fR, \fIdes_pcbc_encrypt()\fR,
|
||||
\&\fIdes_quad_cksum()\fR, \fIdes_random_key()\fR, \fIdes_read_password()\fR and
|
||||
\&\fIdes_string_to_key()\fR are available in the \s-1MIT\s0 Kerberos library;
|
||||
\&\fIdes_check_key_parity()\fR, \fIdes_fixup_key_parity()\fR and \fIdes_is_weak_key()\fR
|
||||
are available in newer versions of that library.
|
||||
.PP
|
||||
|
161
crypto/external/bsd/openssl/lib/libdes/des_modes.7
vendored
161
crypto/external/bsd/openssl/lib/libdes/des_modes.7
vendored
@ -1,26 +1,11 @@
|
||||
.\" Automatically generated by Pod::Man version 1.02
|
||||
.\" Wed Jul 23 14:44:48 2003
|
||||
.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ======================================================================
|
||||
.de Sh \" Subsection heading
|
||||
.br
|
||||
.if t .Sp
|
||||
.ne 5
|
||||
.PP
|
||||
\fB\\$1\fR
|
||||
.PP
|
||||
..
|
||||
.\" ========================================================================
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Ip \" List item
|
||||
.br
|
||||
.ie \\n(.$>=3 .ne \\$3
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.de Vb \" Begin verbatim text
|
||||
.ft CW
|
||||
.nf
|
||||
@ -28,16 +13,15 @@
|
||||
..
|
||||
.de Ve \" End verbatim text
|
||||
.ft R
|
||||
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. | will give a
|
||||
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
|
||||
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
|
||||
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
|
||||
.tr \(*W-|\(bv\*(Tr
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
@ -46,8 +30,8 @@
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` `
|
||||
. ds C' '
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
@ -56,26 +40,28 @@
|
||||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr
|
||||
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
|
||||
.\" index entries marked with X<> in POD. Of course, you'll have to process
|
||||
.\" the output yourself in some meaningful fashion.
|
||||
.if \nF \{\
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
. .
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.\"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it
|
||||
.\" makes way too many mistakes in technical documents.
|
||||
.hy 0
|
||||
.if n .na
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
.bd B 3
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
@ -135,13 +121,16 @@
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ======================================================================
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "des_modes 7"
|
||||
.TH des_modes 7 "0.9.6j" "2003-07-23" "libdes"
|
||||
.UC
|
||||
.IX Title "DES_MODES 7"
|
||||
.TH DES_MODES 7 "2009-07-20" "0.9.6j" "libdes"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
Modes of \s-1DES\s0 \- the variants of \s-1DES\s0 and other crypto algorithms of OpenSSL
|
||||
Modes of DES \- the variants of DES and other crypto algorithms of OpenSSL
|
||||
.SH "DESCRIPTION"
|
||||
.IX Header "DESCRIPTION"
|
||||
Several crypto algorithms for OpenSSL can be used in a number of modes. Those
|
||||
@ -149,126 +138,126 @@ are used for using block ciphers in a way similar to stream ciphers, among
|
||||
other things.
|
||||
.SH "OVERVIEW"
|
||||
.IX Header "OVERVIEW"
|
||||
.Sh "Electronic Codebook Mode (\s-1ECB\s0)"
|
||||
.SS "Electronic Codebook Mode (\s-1ECB\s0)"
|
||||
.IX Subsection "Electronic Codebook Mode (ECB)"
|
||||
Normally, this is found as the function \fIalgorithm\fR\fI_ecb_encrypt()\fR.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
64 bits are enciphered at a time.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The order of the blocks can be rearranged without detection.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The same plaintext block always produces the same ciphertext block
|
||||
(for the same key) making it vulnerable to a 'dictionary attack'.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
An error will only affect one ciphertext block.
|
||||
.Sh "Cipher Block Chaining Mode (\s-1CBC\s0)"
|
||||
.SS "Cipher Block Chaining Mode (\s-1CBC\s0)"
|
||||
.IX Subsection "Cipher Block Chaining Mode (CBC)"
|
||||
Normally, this is found as the function \fIalgorithm\fR\fI_cbc_encrypt()\fR.
|
||||
Be aware that \fIdes_cbc_encrypt()\fR is not really \s-1DES\s0 \s-1CBC\s0 (it does
|
||||
not update the \s-1IV\s0); use \fIdes_ncbc_encrypt()\fR instead.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
a multiple of 64 bits are enciphered at a time.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The \s-1CBC\s0 mode produces the same ciphertext whenever the same
|
||||
plaintext is encrypted using the same key and starting variable.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The chaining operation makes the ciphertext blocks dependent on the
|
||||
current and all preceding plaintext blocks and therefore blocks can not
|
||||
be rearranged.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The use of different starting variables prevents the same plaintext
|
||||
enciphering to the same ciphertext.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
An error will affect the current and the following ciphertext blocks.
|
||||
.Sh "Cipher Feedback Mode (\s-1CFB\s0)"
|
||||
.SS "Cipher Feedback Mode (\s-1CFB\s0)"
|
||||
.IX Subsection "Cipher Feedback Mode (CFB)"
|
||||
Normally, this is found as the function \fIalgorithm\fR\fI_cfb_encrypt()\fR.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
a number of bits (j) <= 64 are enciphered at a time.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The \s-1CFB\s0 mode produces the same ciphertext whenever the same
|
||||
plaintext is encrypted using the same key and starting variable.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The chaining operation makes the ciphertext variables dependent on the
|
||||
current and all preceding variables and therefore j-bit variables are
|
||||
current and all preceding variables and therefore j\-bit variables are
|
||||
chained together and can not be rearranged.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The use of different starting variables prevents the same plaintext
|
||||
enciphering to the same ciphertext.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The strength of the \s-1CFB\s0 mode depends on the size of k (maximal if
|
||||
j == k). In my implementation this is always the case.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
Selection of a small value for j will require more cycles through
|
||||
the encipherment algorithm per unit of plaintext and thus cause
|
||||
greater processing overheads.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
Only multiples of j bits can be enciphered.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
An error will affect the current and the following ciphertext variables.
|
||||
.Sh "Output Feedback Mode (\s-1OFB\s0)"
|
||||
.SS "Output Feedback Mode (\s-1OFB\s0)"
|
||||
.IX Subsection "Output Feedback Mode (OFB)"
|
||||
Normally, this is found as the function \fIalgorithm\fR\fI_ofb_encrypt()\fR.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
a number of bits (j) <= 64 are enciphered at a time.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The \s-1OFB\s0 mode produces the same ciphertext whenever the same
|
||||
plaintext enciphered using the same key and starting variable. More
|
||||
over, in the \s-1OFB\s0 mode the same key stream is produced when the same
|
||||
key and start variable are used. Consequently, for security reasons
|
||||
a specific start variable should be used only once for a given key.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The absence of chaining makes the \s-1OFB\s0 more vulnerable to specific attacks.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
The use of different start variables values prevents the same
|
||||
plaintext enciphering to the same ciphertext, by producing different
|
||||
key streams.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
Selection of a small value for j will require more cycles through
|
||||
the encipherment algorithm per unit of plaintext and thus cause
|
||||
greater processing overheads.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
Only multiples of j bits can be enciphered.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
\&\s-1OFB\s0 mode of operation does not extend ciphertext errors in the
|
||||
resultant plaintext output. Every bit error in the ciphertext causes
|
||||
only one bit to be in error in the deciphered plaintext.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
\&\s-1OFB\s0 mode is not self-synchronizing. If the two operation of
|
||||
encipherment and decipherment get out of synchronism, the system needs
|
||||
to be re-initialized.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
Each re-initialization should use a value of the start variable
|
||||
different from the start variable values used before with the same
|
||||
key. The reason for this is that an identical bit stream would be
|
||||
produced each time from the same parameters. This would be
|
||||
susceptible to a 'known plaintext' attack.
|
||||
.Sh "Triple \s-1ECB\s0 Mode"
|
||||
.SS "Triple \s-1ECB\s0 Mode"
|
||||
.IX Subsection "Triple ECB Mode"
|
||||
Normally, this is found as the function \fIalgorithm\fR\fI_ecb3_encrypt()\fR.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
Encrypt with key1, decrypt with key2 and encrypt with key3 again.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
As for \s-1ECB\s0 encryption but increases the key length to 168 bits.
|
||||
There are theoretic attacks that can be used that make the effective
|
||||
key length 112 bits, but this attack also requires 2^56 blocks of
|
||||
memory, not very likely, even for the \s-1NSA\s0.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
If both keys are the same it is equivalent to encrypting once with
|
||||
just one key.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
If the first and last key are the same, the key length is 112 bits.
|
||||
There are attacks that could reduce the effective key strength
|
||||
to only slightly more than 56 bits, but these require a lot of memory.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
If all 3 keys are the same, this is effectively the same as normal
|
||||
ecb mode.
|
||||
.Sh "Triple \s-1CBC\s0 Mode"
|
||||
.SS "Triple \s-1CBC\s0 Mode"
|
||||
.IX Subsection "Triple CBC Mode"
|
||||
Normally, this is found as the function \fIalgorithm\fR\fI_ede3_cbc_encrypt()\fR.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
Encrypt with key1, decrypt with key2 and then encrypt with key3.
|
||||
.Ip "\(bu" 2
|
||||
.IP "\(bu" 2
|
||||
As for \s-1CBC\s0 encryption but increases the key length to 168 bits with
|
||||
the same restrictions as for triple ecb mode.
|
||||
.SH "NOTES"
|
||||
@ -280,11 +269,11 @@ it to:
|
||||
.Vb 5
|
||||
\& AS 2805.5.2
|
||||
\& Australian Standard
|
||||
\& Electronic funds transfer - Requirements for interfaces,
|
||||
\& Part 5.2: Modes of operation for an n-bit block cipher algorithm
|
||||
\& Electronic funds transfer \- Requirements for interfaces,
|
||||
\& Part 5.2: Modes of operation for an n\-bit block cipher algorithm
|
||||
\& Appendix A
|
||||
.Ve
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
blowfish(3), des(3), idea(3),
|
||||
rc2(3)
|
||||
\&\fIblowfish\fR\|(3), \fIdes\fR\|(3), \fIidea\fR\|(3),
|
||||
\&\fIrc2\fR\|(3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user