4.3BSD-Reno/src/usr.bin/des/des.1

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1989, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Phil Karn, derived from original work by Jim Gillogly and
.\" Richard Outerbridge.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"     @(#)des.1	5.4 (Berkeley) 7/24/90
.\"
.Dd July 24, 1990
.Dt DES 1
.Os BSD 4.4
.Sh NAME
.Nm des
.Nd DES file encryption
.Sh SYNOPSIS
.Pp
.Nm Des
.Fl e
.Op bh
.Op Fl k Ar key
.Nm des
.Fl f
.Op bh
.Op Fl k Ar key
.Sh DESCRIPTION
.Nm des
is a filter that encrypts or decrypts standard input to standard output
with the Data Encryption Standard (DES).
.Pp
Options:
.Dw Ds
.Di L
.Dp Fl e
(encrypt)
.Dp Fl d
(decrypt)
.br
Either
.Fl e
or
.Fl d
must be specified.
.Pp
.Dp Fl k
If the key is not
given on the command line with the
.Fl k
option the command will prompt for it
twice, suppressing echo and comparing the two responses to guard against
mistyping.
.Pp
.Dp Fl h
The
.Fl h
flag controls how the key string is to be interpreted.
Without the
.Fl h
flag, the key is an ASCII string.
Since DES ignores the low
order bit of each key byte, the
high order bit is set for odd parity, thus retaining the information contained
in the low order bit.
If the
.Fl h
flag is set, the key string is interpreted as
16 hex/ASCII characters; the low order bit of each byte is again ignored as per
the DES algorithm.
This allows the use of any arbitrary 56-bit key, including bytes representing
control characters that could not be typed if the -h option were not used.
.Pp
.Dp Fl b
Electronic Code
Book (ECB) mode is used.
By default, DES Cipher Block Chaining (CBC) mode is used, with an initial
vector (IV) of all zeros.
.Pp
Except for the
.Fl h
option, this command is compatible with the
.Nm des
command on the Sun Microsystems workstation.
.Dp
.Sh SEE ALSO
Sun Microsystems DES(1) manual page,
which describes in detail how
the length of the file is encoded in the last block of ciphertext.
.Sh AUTHOR
Phil Karn, KA9Q
.Sh HISTORY
4.3Reno BSD.