Manual Pages for Linux CentOS command on man DES_FAILED
MyWebUniversity

Manual Pages for Linux CentOS command on man DES_FAILED

DESCRYPT(3) Linux Programmer's Manual DESCRYPT(3)

NAME

descrypt, ecbcrypt, cbccrypt, dessetparity, DESFAILED - fast DES encryption SYNOPSIS

#include int ecbcrypt(char *key, char *data, unsigned datalen, unsigned mode); int cbccrypt(char *key, char *data, unsigned datalen, unsigned mode, char *ivec); void dessetparity(char *key); int DESFAILED(int status); DESCRIPTION ecbcrypt() and cbccrypt() implement the NBS DES (Data Encryption Standard). These routines are faster and more general purpose than crypt(3). They also are able to utilize DES hardware if it is avail‐ able. ecbcrypt() encrypts in ECB (Electronic Code Book) mode, which encrypts blocks of data independently. cbccrypt() encrypts in CBC (Cipher Block Chaining) mode, which chains together successive blocks. CBC mode protects against insertions, deletions and substitutions of blocks. Also, regularities in the clear text will not appear in the cipher text. Here is how to use these routines. The first argument, key, is the

8-byte encryption key with parity. To set the key's parity, which for DES is in the low bit of each byte, use dessetparity(). The second argument, data, contains the data to be encrypted or decrypted. The third argument, datalen, is the length in bytes of data, which must be a multiple of 8. The fourth argument, mode, is formed by ORing together some things. For the encryption direction OR in either DESENCRYPT or DESDECRYPT. For software versus hardware encryption, OR in either DESHW or DESSW. If DESHW is specified, and there is no hardware, then the encryption is performed in software and the routine returns DESERRNOHWDEVICE. For cbccrypt(), the argument ivec is the

8-byte initialization vector for the chaining. It is updated to the next initialization vector upon return. RETURN VALUE DESERRNONE No error. DESERRNOHWDEVICE Encryption succeeded, but done in software instead of the requested hardware. DESERRHWERROR An error occurred in the hardware or driver. DESERRBADPARAM Bad argument to routine. Given a result status stat, the macro DESFAILED(stat) is false only for the first two statuses. VERSIONS These routines are present in libc 4.6.27 and later, and in glibc 2.1 and later. ATTRIBUTES For an explanation of the terms used in this section, see attributes(7). ┌─────────────────────────┬───────────────┬─────────┐ │Interface │ Attribute │ Value │ ├─────────────────────────┼───────────────┼─────────┤

│ecbcrypt(), cbccrypt() │ Thread safety │ MT-Safe │ │dessetparity() │ │ │ └─────────────────────────┴───────────────┴─────────┘ CONFORMING TO

4.3BSD. Not in POSIX.1-2001. SEE ALSO des(1), crypt(3), xcrypt(3) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

2007-05-18 DESCRYPT(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™