1 .\" @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI;
4 .TH DES_CRYPT 3 "6 October 1987"
6 des_crypt, ecb_crypt, cbc_crypt, des_setparity \- fast DES encryption
9 .B #include <des_crypt.h>
11 .B int ecb_crypt(key, data, datalen, mode)
17 .B int cbc_crypt(key, data, datalen, mode, ivec)
24 .B void des_setparity(key)
28 .IX encryption cbc_crypt "" \fLcbc_crypt\fP
29 .IX "des encryption" cbc_crypt "DES encryption" \fLcbc_crypt\fP
30 .IX encryption des_setparity "" \fLdes_setparity\fP
31 .IX "des encryption" des_setparity "DES encryption" \fLdes_setparity\fP
38 (Data Encryption Standard).
39 These routines are faster and more general purpose than
41 They also are able to utilize
43 hardware if it is available.
47 (Electronic Code Book)
48 mode, which encrypts blocks of data independently.
52 (Cipher Block Chaining)
53 mode, which chains together
56 mode protects against insertions, deletions and
57 substitutions of blocks.
58 Also, regularities in the clear text will
59 not appear in the cipher text.
61 Here is how to use these routines. The first parameter,
63 is the 8-byte encryption key with parity.
64 To set the key's parity, which for
66 is in the low bit of each byte, use
70 contains the data to be encrypted or decrypted.
74 is the length in bytes of
76 which must be a multiple of 8. The fourth parameter,
80 together some things. For the encryption direction 'or' in either
84 For software versus hardware
85 encryption, 'or' in either
91 is specified, and there is no hardware, then the encryption is performed
92 in software and the routine returns
93 .SM DESERR_NOHWDEVICE\s0.
98 is the the 8-byte initialization
99 vector for the chaining. It is updated to the next initialization
111 .SM DESERR_NOHWDEVICE
112 Encryption succeeded, but done in software instead of the requested hardware.
115 An error occurred in the hardware or driver.
118 Bad parameter to routine.
121 Given a result status
126 is false only for the first two statuses.
128 These routines are not available in RPCSRC 4.0.
129 This information is provided to describe the DES interface expected by