Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/./ecb_crypt.3c
Real path: /usr/share/man/man3c/ecb_crypt.3c
Zurück
'\" te .\" Copyright (c) 2008, 2020, Oracle and/or its affiliates. .TH ecb_crypt 3C "9 Mar 2020" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- fast DES encryption .SH SYNOPSIS .LP .nf #include <rpc/des_crypt.h> \fBint\fR \fBecb_crypt\fR(\fBchar *\fR\fIkey\fR, \fBchar *\fR\fIdata\fR, \fBunsigned\fR \fIdatalen\fR, \fBunsigned\fR \fImode\fR); .fi .LP .nf \fBint\fR \fBcbc_crypt\fR(\fBchar *\fR\fIkey\fR, \fBchar *\fR\fIdata\fR, \fBunsigned\fR \fIdatalen\fR, \fBunsigned\fR \fImode\fR, \fBchar *\fR\fIivec\fR); .fi .LP .nf \fBvoid\fR \fBdes_setparity\fR(\fBchar *\fR\fIkey\fR); .fi .LP .nf \fBint\fR \fBDES_FAILED\fR(\fBint\fR \fIstat\fR); .fi .SH DESCRIPTION .sp .LP \fBecb_crypt()\fR and \fBcbc_crypt()\fR implement the NIST Data Encryption Standard (\fBDES\fR). These routines are faster and more general purpose than \fBcrypt\fR(3C). They also are able to utilize \fBDES\fR hardware if it is available. \fBecb_crypt()\fR encrypts in \fBECB\fR (Electronic Code Book) mode, which encrypts blocks of data independently. \fBcbc_crypt()\fR encrypts in \fBCBC\fR (Cipher Block Chaining) mode, which chains together successive blocks. \fBCBC\fR mode protects against insertions, deletions, and substitutions of blocks. Also, regularities in the clear text will not appear in the cipher text. .sp .LP The first parameter, \fIkey\fR, is the 8-byte encryption key with parity. To set the key's parity, which for \fBDES\fR is in the low bit of each byte, use \fBdes_setparity()\fR. The second parameter, \fIdata\fR, contains the data to be encrypted or decrypted. The third parameter, \fIdatalen\fR, is the length in bytes of \fIdata\fR, which must be a multiple of 8. The fourth parameter, \fImode\fR, is formed by \fBOR'ing\fR together the \fBDES_ENCRYPT\fR or \fBDES_DECRYPT\fR to specify the encryption direction and \fBDES_HW\fR or \fBDES_SW\fR to specify software or hardware encryption. If \fBDES_HW\fR is specified, and there is no hardware, then the encryption is performed in software and the routine returns \fBDESERR_NOHWDEVICE.\fR .sp .LP For \fBcbc_crypt()\fR, the parameter \fIivec\fR is the 8-byte initialization vector for the chaining. It is updated to the next initialization vector upon successful return. .SH RETURN VALUES .sp .LP Given a result status \fIstat\fR, the macro \fBDES_FAILED\fR is false only for the first two statuses. .sp .ne 2 .mk .na \fB\fBDESERR_NONE\fR\fR .ad .br .sp .6 .RS 4n No error. .RE .sp .ne 2 .mk .na \fB\fBDESERR_NOHWDEVICE\fR\fR .ad .br .sp .6 .RS 4n Encryption succeeded, but done in software instead of the requested hardware. .RE .sp .ne 2 .mk .na \fB\fBDESERR_HWERROR\fR\fR .ad .br .sp .6 .RS 4n An error occurred in the hardware or driver. .RE .sp .ne 2 .mk .na \fB\fBDESERR_BADPARAM\fR\fR .ad .br .sp .6 .RS 4n Bad parameter to routine. .RE .SH USAGE .sp .LP The DES standard was officially withdrawn by NIST in 2005, and the algorithm is no longer recommended for modern usage. Oracle Solaris may remove the remaining support for single-DES in a future update. Please upgrade your applications to use more modern ciphers and hashes and longer key lengths, such as those provided by \fBopenssl\fR(7). .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Obsolete Committed _ MT-Level MT-Safe .TE .sp .SH SEE ALSO .sp .LP \fBcrypt\fR(3C), \fBattributes\fR(7), \fBopenssl\fR(7)