Implements Data Encryption Standard (DES) encryption routines.
DES library (libdes.a)
The ecb_crypt and cbc_crypt subroutines implement DES encryption routines, set by the National Bureau of Standards.
These subroutines are not available for export outside the United States.
| Item | Description |
|---|---|
| data | Specifies that the data is to be either encrypted or decrypted. |
| datalen | Specifies the length in bytes of data. The length must be a multiple of 8. |
| key | Specifies the 8-byte encryption key with parity. To set the parity for the key, which for DES is in the low bit of each byte, use the des_setparity subroutine. |
| ivec | Initializes the vector for the chaining in 8-byte. This is updated to the next initialization vector upon return. |
| mode | Specifies whether data is to be encrypted or decrypted. This parameter is formed by logically ORing the DES_ENCRYPT or DES_DECRYPT symbols. For software versus hardware encryption, logically OR the DES_HW or DES_SW symbols. These four symbols are defined in the /usr/include/des_crypt.h file. |
| Item | Description |
|---|---|
| DESERR_BADPARAM | Specifies that a bad parameter was passed to routine. |
| DESERR_HWERR | Specifies that an error occurred in the hardware or driver. |
| DESERR_NOHWDEVICE | Specifies that encryption succeeded, but was done in software instead of the requested hardware. |
| DESERR_NONE | Specifies no error. |
| Item | Description |
|---|---|
| /usr/include/des_crypt.h | Defines macros and needed symbols for the mode parameter. |