DES(1) DES(1) NAME des - encrypt or decrypt data using Data Encryption Standard SYNOPSIS ddeess ( --ee | --EE ) | ( --dd | --DD ) | ( --[ccCC][cckknnaammee] ) | [ --bb33hhffss ] [ --kk _k_e_y ] ] [ --uu[_u_u_n_a_m_e] [ _i_n_p_u_t_-_f_i_l_e [ _o_u_t_p_u_t_-_f_i_l_e ] ] DESCRIPTION ddeess encrypts and decrypts data using the Data Encryption Standard algo- rithm. One of --ee,, --EE (for encrypt) or --dd,, --DD (for decrypt) must be speci- fied. It is also possible to use --cc or --CC in conjunction or instead of the a encrypt/decrypt option to generate a 16 character hexadecimal checksum, generated via the _d_e_s___c_b_c___c_k_s_u_m_. Two standard encryption modes are supported by the ddeess program, Cipher Block Chaining (the default) and Electronic Code Book (specified with --bb ). The key used for the DES algorithm is obtained by prompting the user unless the ``--kk _k_e_y_' option is given. If the key is an argument to the ddeess com- mand, it is potentially visible to users executing ppss(1) or a derivative. To minimise this possibility, ddeess takes care to destroy the key argument immediately upon entry. If your shell keeps a history file be careful to make sure it is not world readable. Since this program attempts to maintain compatibility with SunOS's des(1) command, there are 2 different methods used to convert the user supplied key to a des key. Whenever and one or more of --EE,, --DD,, --CC or --33 options are used, the key conversion procedure will not be compatible with the SunOS des(1) version but will use all the user supplied character to generate the des key. ddeess command reads from standard input unless _i_n_p_u_t_-_f_i_l_e is speci- fied and writes to standard output unless _o_u_t_p_u_t_-_f_i_l_e is given. OPTIONS --bb Select ECB (eight bytes at a time) encryption mode. --33 Encrypt using triple encryption. By default triple cbc encryption is used but if the --bb option is used then triple ecb encryption is per- formed. If the key is less than 8 characters long, the flag has no effect. --ee Encrypt data using an 8 byte key in a manner compatible with SunOS des(1). --EE Encrypt data using a key of nearly unlimited length (1024 bytes). This will product a more secure encryption. --dd Decrypt data that was encrypted with the -e option. --DD Decrypt data that was encrypted with the -E option. --cc Generate a 16 character hexadecimal cbc checksum and output this to stderr. If a filename was specified after the --cc option, the checksum is output to that file. The checksum is generated using a key gener- ated in a SunOS compatible manner. --CC A cbc checksum is generated in the same manner as described for the --cc option but the DES key is generated in the same manner as used for the --EE and --DD options --ff Does nothing - allowed for compatibility with SunOS des(1) command. --ss Does nothing - allowed for compatibility with SunOS des(1) command. --kk _k_e_y Use the encryption _k_e_y specified. --hh The _k_e_y is assumed to be a 16 character hexadecimal number. If the --33 option is used the key is assumed to be a 32 character hexadecimal number. --uu This flag is used to read and write uuencoded files. If decrypting, the input file is assumed to contain uuencoded, DES encrypted data. If encrypting, the characters following the -u are used as the name of the uuencoded file to embed in the begin line of the uuencoded output. If there is no name specified after the -u, the name text.des will be embedded in the header. SEE ALSO ppss ((11)) ddeess__ccrryypptt((33)) BUGS The problem with using the --ee option is the short key length. It would be better to use a real 56-bit key rather than an ASCII-based 56-bit pattern. Knowing that the key was derived from ASCII radically reduces the time nec- essary for a brute-force cryptographic attack. My attempt to remove this problem is to add an alternative text-key to DES-key function. This alter- native function (accessed via --EE,, --DD,, --SS and --33 ) uses DES to help generate the key. Be carefully when using the -u option. Doing des -ud will not decrypt filename (the -u option will gobble the d option). The VMS operating system operates in a world where files are always a mul- tiple of 512 bytes. This causes problems when encrypted data is send from unix to VMS since a 88 byte file will suddenly be padded with 424 null bytes. To get around this problem, use the -u option to uuencode the data before it is send to the VMS system. AUTHOR Eric Young (eay@mincom.oz.au or eay@psych.psy.uq.oz.au)