xref: /minix3/usr.bin/bdes/bdes.1 (revision 92f7a4ab20e250d4f41d042b48e0e8a783d13fe9)
1*92f7a4abSThomas Cort.\"	$NetBSD: bdes.1,v 1.14 2010/01/15 19:40:17 joerg Exp $
2*92f7a4abSThomas Cort.\"
3*92f7a4abSThomas Cort.\" Copyright (c) 1991, 1993
4*92f7a4abSThomas Cort.\"	The Regents of the University of California.  All rights reserved.
5*92f7a4abSThomas Cort.\"
6*92f7a4abSThomas Cort.\" This code is derived from software contributed to Berkeley by
7*92f7a4abSThomas Cort.\" Matt Bishop of Dartmouth College.
8*92f7a4abSThomas Cort.\"
9*92f7a4abSThomas Cort.\" Redistribution and use in source and binary forms, with or without
10*92f7a4abSThomas Cort.\" modification, are permitted provided that the following conditions
11*92f7a4abSThomas Cort.\" are met:
12*92f7a4abSThomas Cort.\" 1. Redistributions of source code must retain the above copyright
13*92f7a4abSThomas Cort.\"    notice, this list of conditions and the following disclaimer.
14*92f7a4abSThomas Cort.\" 2. Redistributions in binary form must reproduce the above copyright
15*92f7a4abSThomas Cort.\"    notice, this list of conditions and the following disclaimer in the
16*92f7a4abSThomas Cort.\"    documentation and/or other materials provided with the distribution.
17*92f7a4abSThomas Cort.\" 3. Neither the name of the University nor the names of its contributors
18*92f7a4abSThomas Cort.\"    may be used to endorse or promote products derived from this software
19*92f7a4abSThomas Cort.\"    without specific prior written permission.
20*92f7a4abSThomas Cort.\"
21*92f7a4abSThomas Cort.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22*92f7a4abSThomas Cort.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*92f7a4abSThomas Cort.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*92f7a4abSThomas Cort.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25*92f7a4abSThomas Cort.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*92f7a4abSThomas Cort.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*92f7a4abSThomas Cort.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*92f7a4abSThomas Cort.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*92f7a4abSThomas Cort.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*92f7a4abSThomas Cort.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*92f7a4abSThomas Cort.\" SUCH DAMAGE.
32*92f7a4abSThomas Cort.\"
33*92f7a4abSThomas Cort.\"	@(#)bdes.1	8.1 (Berkeley) 6/29/93
34*92f7a4abSThomas Cort.\"
35*92f7a4abSThomas Cort.Dd December 1, 2001
36*92f7a4abSThomas Cort.Dt BDES 1
37*92f7a4abSThomas Cort.Os
38*92f7a4abSThomas Cort.Sh NAME
39*92f7a4abSThomas Cort.Nm bdes
40*92f7a4abSThomas Cort.Nd encrypt/decrypt using the Data Encryption Standard
41*92f7a4abSThomas Cort.Sh SYNOPSIS
42*92f7a4abSThomas Cort.Nm
43*92f7a4abSThomas Cort.Op Fl abdp
44*92f7a4abSThomas Cort.Op Fl F Ar N
45*92f7a4abSThomas Cort.Op Fl f Ar N
46*92f7a4abSThomas Cort.Op Fl k Ar key
47*92f7a4abSThomas Cort.Op Fl m Ar N
48*92f7a4abSThomas Cort.Op Fl o Ar N
49*92f7a4abSThomas Cort.Op Fl v Ar vector
50*92f7a4abSThomas Cort.Sh DESCRIPTION
51*92f7a4abSThomas Cort.Nm
52*92f7a4abSThomas Cortimplements all DES modes of operation described in FIPS PUB 81,
53*92f7a4abSThomas Cortincluding alternative cipher feedback mode and both authentication
54*92f7a4abSThomas Cortmodes.
55*92f7a4abSThomas Cort.Nm
56*92f7a4abSThomas Cortreads from the standard input and writes to the standard output.
57*92f7a4abSThomas CortBy default, the input is encrypted using cipher block chaining mode.
58*92f7a4abSThomas CortUsing the same key for encryption and decryption preserves plain text.
59*92f7a4abSThomas Cort.Pp
60*92f7a4abSThomas CortAll modes but the electronic code book mode require an initialization
61*92f7a4abSThomas Cortvector; if none is supplied, the zero vector is used.
62*92f7a4abSThomas CortIf no
63*92f7a4abSThomas Cort.Ar key
64*92f7a4abSThomas Cortis specified on the command line, the user is prompted for one (see
65*92f7a4abSThomas Cort.Xr getpass 3
66*92f7a4abSThomas Cortfor more details).
67*92f7a4abSThomas Cort.Pp
68*92f7a4abSThomas CortThe options are as follows:
69*92f7a4abSThomas Cort.Bl -tag -width "-v vector" -compact
70*92f7a4abSThomas Cort.It Fl a
71*92f7a4abSThomas CortThe key and initialization vector strings are to be taken as ASCII,
72*92f7a4abSThomas Cortsuppressing the special interpretation given to leading
73*92f7a4abSThomas Cort.Dq 0X ,
74*92f7a4abSThomas Cort.Dq 0x ,
75*92f7a4abSThomas Cort.Dq 0B ,
76*92f7a4abSThomas Cortand
77*92f7a4abSThomas Cort.Dq 0b
78*92f7a4abSThomas Cortcharacters.
79*92f7a4abSThomas CortThis flag applies to
80*92f7a4abSThomas Cort.Em both
81*92f7a4abSThomas Cortthe key and initialization vector.
82*92f7a4abSThomas Cort.It Fl b
83*92f7a4abSThomas CortUse electronic code book mode.
84*92f7a4abSThomas CortThis is not recommended for messages
85*92f7a4abSThomas Cortlonger than 8 bytes, as patterns in the input will show through to the
86*92f7a4abSThomas Cortoutput.
87*92f7a4abSThomas Cort.It Fl d
88*92f7a4abSThomas CortDecrypt the input.
89*92f7a4abSThomas Cort.It Fl F Ar N
90*92f7a4abSThomas CortUse
91*92f7a4abSThomas Cort.Ar N Ns -bit
92*92f7a4abSThomas Cortalternative cipher feedback mode.
93*92f7a4abSThomas CortCurrently
94*92f7a4abSThomas Cort.Ar N
95*92f7a4abSThomas Cortmust be a multiple of 7 between 7 and 56 inclusive (this does not conform
96*92f7a4abSThomas Cortto the alternative CFB mode specification).
97*92f7a4abSThomas Cort.It Fl f Ar N
98*92f7a4abSThomas CortUse
99*92f7a4abSThomas Cort.Ar N Ns -bit
100*92f7a4abSThomas Cortcipher feedback mode.
101*92f7a4abSThomas CortCurrently
102*92f7a4abSThomas Cort.Ar N
103*92f7a4abSThomas Cortmust be a multiple of 8 between 8 and 64 inclusive (this does not conform
104*92f7a4abSThomas Cortto the standard CFB mode specification).
105*92f7a4abSThomas Cort.It Fl k Ar key
106*92f7a4abSThomas CortUse
107*92f7a4abSThomas Cort.Ar key
108*92f7a4abSThomas Cortas the cryptographic key.
109*92f7a4abSThomas Cort.It Fl m Ar N
110*92f7a4abSThomas CortCompute a message authentication code (MAC) of
111*92f7a4abSThomas Cort.Ar N
112*92f7a4abSThomas Cortbits on the input.
113*92f7a4abSThomas CortThe value of
114*92f7a4abSThomas Cort.Ar N
115*92f7a4abSThomas Cortmust be between 1 and 64 inclusive; if
116*92f7a4abSThomas Cort.Ar N
117*92f7a4abSThomas Cortis not a multiple of 8, enough 0 bits will be added to pad the MAC length
118*92f7a4abSThomas Cortto the nearest multiple of 8.
119*92f7a4abSThomas CortOnly the MAC is output.
120*92f7a4abSThomas CortMACs are only available in cipher block chaining mode or in cipher feedback
121*92f7a4abSThomas Cortmode.
122*92f7a4abSThomas Cort.It Fl o Ar N
123*92f7a4abSThomas CortUse
124*92f7a4abSThomas Cort.Ar N Ns -bit
125*92f7a4abSThomas Cortoutput feedback mode.
126*92f7a4abSThomas CortCurrently
127*92f7a4abSThomas Cort.Ar N
128*92f7a4abSThomas Cortmust be a multiple of 8 between 8 and 64 inclusive (this does not conform
129*92f7a4abSThomas Cortto the OFB mode specification).
130*92f7a4abSThomas Cort.It Fl p
131*92f7a4abSThomas CortDisable the resetting of the parity bit.
132*92f7a4abSThomas CortThis flag forces the parity bit of the key to be used as typed, rather than
133*92f7a4abSThomas Cortmaking each character be of odd parity.
134*92f7a4abSThomas CortIt is used only if the key is given in ASCII.
135*92f7a4abSThomas Cort.It Fl v Ar vector
136*92f7a4abSThomas CortSet the initialization vector to
137*92f7a4abSThomas Cort.Ar vector ;
138*92f7a4abSThomas Cortthe vector is interpreted in the same way as the key.
139*92f7a4abSThomas CortThe vector is ignored in electronic codebook mode.
140*92f7a4abSThomas CortFor best security, a different
141*92f7a4abSThomas Cortinitialization vector should be used for each file.
142*92f7a4abSThomas Cort.El
143*92f7a4abSThomas Cort.Pp
144*92f7a4abSThomas CortThe key and initialization vector are taken as sequences of ASCII
145*92f7a4abSThomas Cortcharacters which are then mapped into their bit representations.
146*92f7a4abSThomas CortIf either begins with
147*92f7a4abSThomas Cort.Dq 0X
148*92f7a4abSThomas Cortor
149*92f7a4abSThomas Cort.Dq 0x ,
150*92f7a4abSThomas Cortthat one is taken as a sequence of hexadecimal digits indicating the
151*92f7a4abSThomas Cortbit pattern;
152*92f7a4abSThomas Cortif either begins with
153*92f7a4abSThomas Cort.Dq 0B
154*92f7a4abSThomas Cortor
155*92f7a4abSThomas Cort.Dq 0b ,
156*92f7a4abSThomas Cortthat one is taken as a sequence of binary digits indicating the bit pattern.
157*92f7a4abSThomas CortIn either case,
158*92f7a4abSThomas Cortonly the leading 64 bits of the key or initialization vector
159*92f7a4abSThomas Cortare used,
160*92f7a4abSThomas Cortand if fewer than 64 bits are provided, enough 0 bits are appended
161*92f7a4abSThomas Cortto pad the key to 64 bits.
162*92f7a4abSThomas Cort.Pp
163*92f7a4abSThomas CortAccording to the DES standard, the low-order bit of each character in the
164*92f7a4abSThomas Cortkey string is deleted.
165*92f7a4abSThomas CortSince most ASCII representations set the high-order bit to 0, simply
166*92f7a4abSThomas Cortdeleting the low-order bit effectively reduces the size of the key space
167*92f7a4abSThomas Cortfrom
168*92f7a4abSThomas Cort.if t 2\u\s-356\s0\d
169*92f7a4abSThomas Cort.if n 2**56
170*92f7a4abSThomas Cortto
171*92f7a4abSThomas Cort.if t 2\u\s-348\s0\d
172*92f7a4abSThomas Cort.if n 2**48
173*92f7a4abSThomas Cortkeys.
174*92f7a4abSThomas CortTo prevent this, the high-order bit must be a function depending in part
175*92f7a4abSThomas Cortupon the low-order bit; so, the high-order bit is set to whatever value
176*92f7a4abSThomas Cortgives odd parity.
177*92f7a4abSThomas CortThis preserves the key space size.
178*92f7a4abSThomas CortNote this resetting of the parity bit is
179*92f7a4abSThomas Cort.Em not
180*92f7a4abSThomas Cortdone if the key is given in binary or hex, and can be disabled for ASCII
181*92f7a4abSThomas Cortkeys as well.
182*92f7a4abSThomas Cort.Pp
183*92f7a4abSThomas CortThe DES is considered a very strong cryptosystem hobbled by a short
184*92f7a4abSThomas Cortkey, and other than table lookup attacks, key search attacks, and
185*92f7a4abSThomas CortHellman's time-memory tradeoff (all of which are very expensive and
186*92f7a4abSThomas Corttime-consuming), no practical cryptanalytic methods for breaking the
187*92f7a4abSThomas CortDES are known in the open literature.
188*92f7a4abSThomas CortAs of this writing, the best
189*92f7a4abSThomas Cortknown cryptanalytic method is linear cryptanalysis, which requires an
190*92f7a4abSThomas Cortaverage of
191*92f7a4abSThomas Cort.if t 2\u\s-343\s0\d
192*92f7a4abSThomas Cort.if n 2**43
193*92f7a4abSThomas Cortknown plaintext-ciphertext pairs to succeed.
194*92f7a4abSThomas CortUnfortunately for the DES, key search attacks (requiring only
195*92f7a4abSThomas Corta single known plaintext-ciphertext pair and trying
196*92f7a4abSThomas Cort.if t 2\u\s-355\s0\d
197*92f7a4abSThomas Cort.if n 2**55
198*92f7a4abSThomas Cortkeys on average) are becoming practical.
199*92f7a4abSThomas Cort.Pp
200*92f7a4abSThomas CortAs with all cryptosystems, the choice of keys and
201*92f7a4abSThomas Cortkey security remain the most vulnerable aspect of
202*92f7a4abSThomas Cort.Nm .
203*92f7a4abSThomas Cort.Sh IMPLEMENTATION NOTES
204*92f7a4abSThomas CortFor implementors wishing to write software compatible with this program,
205*92f7a4abSThomas Cortthe following notes are provided.
206*92f7a4abSThomas CortThis software is believed to be compatible with the implementation of the
207*92f7a4abSThomas Cortdata encryption standard distributed by Sun Microsystems, Inc.
208*92f7a4abSThomas Cort.Pp
209*92f7a4abSThomas CortIn the ECB and CBC modes, plaintext is encrypted in units of 64 bits (8 bytes,
210*92f7a4abSThomas Cortalso called a block).
211*92f7a4abSThomas CortTo ensure that the plaintext file is encrypted correctly,
212*92f7a4abSThomas Cort.Nm
213*92f7a4abSThomas Cortwill (internally) append from 1 to 8 bytes, the last byte containing an
214*92f7a4abSThomas Cortinteger stating how many bytes of that final block are from the plaintext
215*92f7a4abSThomas Cortfile, and encrypt the resulting block.
216*92f7a4abSThomas CortHence, when decrypting, the last block may contain from 0 to 7 characters
217*92f7a4abSThomas Cortpresent in the plaintext file, and the last byte tells how many.
218*92f7a4abSThomas CortNote that if during decryption the last byte of the file does not contain an
219*92f7a4abSThomas Cortinteger between 0 and 7, either the file has been corrupted or an incorrect
220*92f7a4abSThomas Cortkey has been given.
221*92f7a4abSThomas CortA similar mechanism is used for the OFB and CFB modes, except that those
222*92f7a4abSThomas Cortsimply require the length of the input to be a multiple of the mode size,
223*92f7a4abSThomas Cortand the final byte contains an integer between 0 and one less than the number
224*92f7a4abSThomas Cortof bytes being used as the mode.
225*92f7a4abSThomas Cort(This was another reason that the mode size must be a multiple of 8 for those
226*92f7a4abSThomas Cortmodes.)
227*92f7a4abSThomas Cort.Pp
228*92f7a4abSThomas CortUnlike Sun's implementation, unused bytes of that last block are not filled
229*92f7a4abSThomas Cortwith random data, but instead contain what was in those byte positions in
230*92f7a4abSThomas Cortthe preceding block.
231*92f7a4abSThomas CortThis is quicker and more portable, and does not weaken the encryption
232*92f7a4abSThomas Cortsignificantly.
233*92f7a4abSThomas Cort.Pp
234*92f7a4abSThomas CortIf the key is entered in ASCII, the parity bits of the key characters are set
235*92f7a4abSThomas Cortso that each key character is of odd parity.
236*92f7a4abSThomas CortUnlike Sun's implementation, it is possible to enter binary or hexadecimal
237*92f7a4abSThomas Cortkeys on the command line, and if this is done, the parity bits are
238*92f7a4abSThomas Cort.Em not
239*92f7a4abSThomas Cortreset.
240*92f7a4abSThomas CortThis allows testing using arbitrary bit patterns as keys.
241*92f7a4abSThomas Cort.Pp
242*92f7a4abSThomas CortThe Sun implementation always uses an initialization vector of 0
243*92f7a4abSThomas Cort(that is, all zeroes).
244*92f7a4abSThomas CortBy default,
245*92f7a4abSThomas Cort.Nm
246*92f7a4abSThomas Cortdoes too, but this may be changed from the command line.
247*92f7a4abSThomas Cort.Sh SEE ALSO
248*92f7a4abSThomas Cort.Xr crypt 3 ,
249*92f7a4abSThomas Cort.Xr getpass 3
250*92f7a4abSThomas Cort.Rs
251*92f7a4abSThomas Cort.%T Data Encryption Standard
252*92f7a4abSThomas Cort.%R Federal Information Processing Standard #46
253*92f7a4abSThomas Cort.%Q National Bureau of Standards, U.S. Department of Commerce
254*92f7a4abSThomas Cort.\" should be .%C as soon as it's supported.
255*92f7a4abSThomas Cort.%O Washington DC
256*92f7a4abSThomas Cort.%D January 1977
257*92f7a4abSThomas Cort.Re
258*92f7a4abSThomas Cort.Rs
259*92f7a4abSThomas Cort.%T DES Modes of Operation
260*92f7a4abSThomas Cort.%R Federal Information Processing Standard #81
261*92f7a4abSThomas Cort.%Q National Bureau of Standards, U.S. Department of Commerce
262*92f7a4abSThomas Cort.\" should be .%C as soon as it's supported.
263*92f7a4abSThomas Cort.%O Washington DC
264*92f7a4abSThomas Cort.%D December 1980
265*92f7a4abSThomas Cort.Re
266*92f7a4abSThomas Cort.Rs
267*92f7a4abSThomas Cort.%A Dorothy Denning
268*92f7a4abSThomas Cort.%T Cryptography and Data Security
269*92f7a4abSThomas Cort.%I Addison-Wesley Publishing Co.
270*92f7a4abSThomas Cort.\" should be .%C as soon as it's supported.
271*92f7a4abSThomas Cort.%O Reading, MA
272*92f7a4abSThomas Cort.%D 1982
273*92f7a4abSThomas Cort.Re
274*92f7a4abSThomas Cort.Rs
275*92f7a4abSThomas Cort.%A Matt Bishop
276*92f7a4abSThomas Cort.%T Implementation Notes on bdes(1)
277*92f7a4abSThomas Cort.%R Technical Report PCS-TR-91-158
278*92f7a4abSThomas Cort.%Q Department of Mathematics and Computer Science, Dartmouth College
279*92f7a4abSThomas Cort.\" should be .%C as soon as it's supported.
280*92f7a4abSThomas Cort.%O Hanover, NH 03755
281*92f7a4abSThomas Cort.%D April 1991
282*92f7a4abSThomas Cort.Re
283*92f7a4abSThomas Cort.Rs
284*92f7a4abSThomas Cort.%A M.J. Wiener
285*92f7a4abSThomas Cort.%T Efficient DES Key Search
286*92f7a4abSThomas Cort.%R Technical Report 244
287*92f7a4abSThomas Cort.%Q School of Computer Science, Carleton University
288*92f7a4abSThomas Cort.%D May 1994
289*92f7a4abSThomas Cort.Re
290*92f7a4abSThomas Cort.Rs
291*92f7a4abSThomas Cort.%A Bruce Schneier
292*92f7a4abSThomas Cort.%T Applied Cryptography (2nd edition)
293*92f7a4abSThomas Cort.%I John Wiley \*[Am] Sons, Inc.
294*92f7a4abSThomas Cort.%O New York, NY
295*92f7a4abSThomas Cort.\" should be .%C as soon as it's supported.
296*92f7a4abSThomas Cort.%D 1996
297*92f7a4abSThomas Cort.Re
298*92f7a4abSThomas Cort.Rs
299*92f7a4abSThomas Cort.%A M. Matsui
300*92f7a4abSThomas Cort.%T Linear Cryptanalysis Method for DES Cipher
301*92f7a4abSThomas Cort.%R Advances in Cryptology -- Eurocrypt '93 Proceedings
302*92f7a4abSThomas Cort.%I Springer-Verlag
303*92f7a4abSThomas Cort.%D 1994
304*92f7a4abSThomas Cort.Re
305*92f7a4abSThomas Cort.Rs
306*92f7a4abSThomas Cort.%A Blaze
307*92f7a4abSThomas Cort.%A Diffie
308*92f7a4abSThomas Cort.%A Rivest
309*92f7a4abSThomas Cort.%A Schneier
310*92f7a4abSThomas Cort.%A Shimomura
311*92f7a4abSThomas Cort.%A Thompson
312*92f7a4abSThomas Cort.%A Wiener
313*92f7a4abSThomas Cort.%T Minimal Key Lengths for Symmetric Ciphers To Provide Adequate Commercial Security
314*92f7a4abSThomas Cort.%I Business Software Alliance
315*92f7a4abSThomas Cort.%U http://www.bsa.org/policy/encryption/cryptographers.html
316*92f7a4abSThomas Cort.%D January 1996
317*92f7a4abSThomas Cort.Re
318*92f7a4abSThomas Cort.Sh BUGS
319*92f7a4abSThomas CortWhen this document was originally written, there was a controversy
320*92f7a4abSThomas Cortraging over whether the DES would still be secure in a few years.
321*92f7a4abSThomas CortThere is now near-universal consensus in the cryptographic community
322*92f7a4abSThomas Cortthat the key length of the DES is far too short.
323*92f7a4abSThomas CortThe advent of
324*92f7a4abSThomas Cortspecial-purpose hardware could reduce the cost of any of the methods
325*92f7a4abSThomas Cortof attack named above so that they are no longer computationally
326*92f7a4abSThomas Cortinfeasible; in addition, the explosive growth in the number and speed
327*92f7a4abSThomas Cortof modern microprocessors as well as advances in programmable logic
328*92f7a4abSThomas Cortdevices has brought an attack using only commodity hardware into the
329*92f7a4abSThomas Cortrealm of possibility.
330*92f7a4abSThomas CortSchneier and others currently recommend using
331*92f7a4abSThomas Cortcryptosystems with keys of at least 90 bits when long-term security is
332*92f7a4abSThomas Cortneeded.
333*92f7a4abSThomas Cort.Pp
334*92f7a4abSThomas CortAs the key or key schedule is stored in memory, the encryption can be
335*92f7a4abSThomas Cortcompromised if memory is readable.
336*92f7a4abSThomas CortAdditionally, programs which display programs' arguments may compromise the
337*92f7a4abSThomas Cortkey and initialization vector, if they are specified on the command line.
338*92f7a4abSThomas CortTo avoid this
339*92f7a4abSThomas Cort.Nm
340*92f7a4abSThomas Cortoverwrites its arguments, however, the obvious race cannot currently be
341*92f7a4abSThomas Cortavoided.
342*92f7a4abSThomas Cort.Pp
343*92f7a4abSThomas CortCertain specific keys should be avoided because they introduce potential
344*92f7a4abSThomas Cortweaknesses; these keys, called the
345*92f7a4abSThomas Cort.Em weak
346*92f7a4abSThomas Cortand
347*92f7a4abSThomas Cort.Em semiweak
348*92f7a4abSThomas Cortkeys, are (in hex notation, where p is either 0 or 1, and P is either
349*92f7a4abSThomas Corte or f):
350*92f7a4abSThomas Cort.Bd -literal -offset indent
351*92f7a4abSThomas Cort0x0p0p0p0p0p0p0p0p	0x0p1P0p1P0p0P0p0P
352*92f7a4abSThomas Cort0x0pep0pep0pfp0pfp	0x0pfP0pfP0pfP0pfP
353*92f7a4abSThomas Cort0x1P0p1P0p0P0p0P0p	0x1P1P1P1P0P0P0P0P
354*92f7a4abSThomas Cort0x1Pep1Pep0Pfp0Pfp	0x1PfP1PfP0PfP0PfP
355*92f7a4abSThomas Cort0xep0pep0pfp0pfp0p	0xep1Pep1pfp0Pfp0P
356*92f7a4abSThomas Cort0xepepepepepepepep	0xepfPepfPfpfPfpfP
357*92f7a4abSThomas Cort0xfP0pfP0pfP0pfP0p	0xfP1PfP1PfP0PfP0P
358*92f7a4abSThomas Cort0xfPepfPepfPepfPep	0xfPfPfPfPfPfPfPfP
359*92f7a4abSThomas Cort.Ed
360*92f7a4abSThomas Cort.Pp
361*92f7a4abSThomas CortThis is inherent in the DES algorithm (see Moore and Simmons,
362*92f7a4abSThomas Cort.Do
363*92f7a4abSThomas CortCycle structure of the DES with weak and semi-weak keys
364*92f7a4abSThomas Cort.Dc ,
365*92f7a4abSThomas Cort.Em "Advances in Cryptology \- Crypto '86 Proceedings" ,
366*92f7a4abSThomas CortSpringer-Verlag New York, \(co1987, pp. 9-32.)
367