des_crypt.3 (108037) | des_crypt.3 (108087) |
---|---|
1.\" @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI; | 1.\" @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI; |
2.\" $FreeBSD: head/lib/libc/rpc/des_crypt.3 108037 2002-12-18 12:45:11Z ru $ | 2.\" $FreeBSD: head/lib/libc/rpc/des_crypt.3 108087 2002-12-19 09:40:28Z ru $ |
3.\" 4.Dd October 6, 1987 5.Dt DES_CRYPT 3 6.Os 7.Sh NAME 8.Nm des_crypt , ecb_crypt , cbc_crypt , des_setparity 9.Nd "fast DES encryption" 10.Sh LIBRARY --- 38 unchanged lines hidden (view full) --- 49successive blocks. 50.Tn CBC 51mode protects against insertions, deletions and 52substitutions of blocks. 53Also, regularities in the clear text will 54not appear in the cipher text. 55.Pp 56Here is how to use these routines. | 3.\" 4.Dd October 6, 1987 5.Dt DES_CRYPT 3 6.Os 7.Sh NAME 8.Nm des_crypt , ecb_crypt , cbc_crypt , des_setparity 9.Nd "fast DES encryption" 10.Sh LIBRARY --- 38 unchanged lines hidden (view full) --- 49successive blocks. 50.Tn CBC 51mode protects against insertions, deletions and 52substitutions of blocks. 53Also, regularities in the clear text will 54not appear in the cipher text. 55.Pp 56Here is how to use these routines. |
57The first parameter, | 57The first argument, |
58.Fa key , 59is the 8-byte encryption key with parity. 60To set the key's parity, which for 61.Tn DES 62is in the low bit of each byte, use 63.Fn des_setparity . | 58.Fa key , 59is the 8-byte encryption key with parity. 60To set the key's parity, which for 61.Tn DES 62is in the low bit of each byte, use 63.Fn des_setparity . |
64The second parameter, | 64The second argument, |
65.Fa data , 66contains the data to be encrypted or decrypted. 67The | 65.Fa data , 66contains the data to be encrypted or decrypted. 67The |
68third parameter, | 68third argument, |
69.Fa datalen , 70is the length in bytes of 71.Fa data , 72which must be a multiple of 8. | 69.Fa datalen , 70is the length in bytes of 71.Fa data , 72which must be a multiple of 8. |
73The fourth parameter, | 73The fourth argument, |
74.Fa mode , 75is formed by 76.Em OR Ns 'ing 77together some things. 78For the encryption direction 79.Em OR 80in either 81.Dv DES_ENCRYPT --- 8 unchanged lines hidden (view full) --- 90.Dv DES_SW . 91If 92.Dv DES_HW 93is specified, and there is no hardware, then the encryption is performed 94in software and the routine returns 95.Er DESERR_NOHWDEVICE . 96For 97.Fn cbc_crypt , | 74.Fa mode , 75is formed by 76.Em OR Ns 'ing 77together some things. 78For the encryption direction 79.Em OR 80in either 81.Dv DES_ENCRYPT --- 8 unchanged lines hidden (view full) --- 90.Dv DES_SW . 91If 92.Dv DES_HW 93is specified, and there is no hardware, then the encryption is performed 94in software and the routine returns 95.Er DESERR_NOHWDEVICE . 96For 97.Fn cbc_crypt , |
98the parameter | 98the |
99.Fa ivec | 99.Fa ivec |
100argument |
|
100is the 8-byte initialization 101vector for the chaining. 102It is updated to the next initialization 103vector upon return. 104.Sh ERRORS 105.Bl -tag -width [DESERR_NOHWDEVICE] -compact 106.It Bq Er DESERR_NONE 107No error. 108.It Bq Er DESERR_NOHWDEVICE 109Encryption succeeded, but done in software instead of the requested hardware. 110.It Bq Er DESERR_HWERR 111An error occurred in the hardware or driver. 112.It Bq Er DESERR_BADPARAM | 101is the 8-byte initialization 102vector for the chaining. 103It is updated to the next initialization 104vector upon return. 105.Sh ERRORS 106.Bl -tag -width [DESERR_NOHWDEVICE] -compact 107.It Bq Er DESERR_NONE 108No error. 109.It Bq Er DESERR_NOHWDEVICE 110Encryption succeeded, but done in software instead of the requested hardware. 111.It Bq Er DESERR_HWERR 112An error occurred in the hardware or driver. 113.It Bq Er DESERR_BADPARAM |
113Bad parameter to routine. | 114Bad argument to routine. |
114.El 115.Pp 116Given a result status 117.Va stat , 118the macro 119.Fn DES_FAILED stat 120is false only for the first two statuses. 121.Sh SEE ALSO 122.\" .Xr des 1 , 123.Xr crypt 3 124.Sh RESTRICTIONS 125These routines are not available in RPCSRC 4.0. 126This information is provided to describe the 127.Tn DES 128interface expected by 129Secure RPC. | 115.El 116.Pp 117Given a result status 118.Va stat , 119the macro 120.Fn DES_FAILED stat 121is false only for the first two statuses. 122.Sh SEE ALSO 123.\" .Xr des 1 , 124.Xr crypt 3 125.Sh RESTRICTIONS 126These routines are not available in RPCSRC 4.0. 127This information is provided to describe the 128.Tn DES 129interface expected by 130Secure RPC. |