SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from PCLinuxOS lib64tirpc-devel-1.0.1-1pclos2017.x86_64.rpm

DES_CRYPT

Section: C Library Functions (3)
Index
BSD mandoc
 

NAME

des_crypt , ecb_crypt , cbc_crypt , des_setparity - fast DES encryption 

SYNOPSIS

In rpc/des_crypt.hFt intFn ecb_crypt char *key char *data unsigned datalen unsigned modeFt intFn cbc_crypt char *key char *data unsigned datalen unsigned mode char *ivecFt voidFn des_setparity char *key 

DESCRIPTION

TheFn ecb_cryptandFn cbc_cryptfunctionsimplement theNBSDES(Data Encryption Standard).These routines are faster and more general purpose thancrypt(3).They also are able to utilizeDEShardware if it is available.TheFn ecb_cryptfunctionencrypts inECB(Electronic Code Book)mode, which encrypts blocks of data independently.TheFn cbc_cryptfunctionencrypts inCBC(Cipher Block Chaining)mode, which chains togethersuccessive blocks.CBCmode protects against insertions, deletions andsubstitutions of blocks.Also, regularities in the clear text willnot appear in the cipher text.

Here is how to use these routines.The first argument,Fa key ,is the 8-byte encryption key with parity.To set the key's parity, which forDESis in the low bit of each byte, useFn des_setparity .The second argument,Fa data ,contains the data to be encrypted or decrypted.Thethird argument,Fa datalen ,is the length in bytes ofFa data ,which must be a multiple of 8.The fourth argument,Fa mode ,is formed byOR 'ingtogether some things.For the encryption directionORin eitherDES_ENCRYPTorDES_DECRYPT For software versus hardwareencryption,ORin eitherDES_HWorDES_SW IfDES_HWis specified, and there is no hardware, then the encryption is performedin software and the routine returnsEr DESERR_NOHWDEVICE .ForFn cbc_crypt ,theFa ivecargumentis the 8-byte initializationvector for the chaining.It is updated to the next initializationvector upon return. 

ERRORS

Bq Er DESERR_NONE
No error.
Bq Er DESERR_NOHWDEVICE
Encryption succeeded, but done in software instead of the requested hardware.
Bq Er DESERR_HWERR
An error occurred in the hardware or driver.
Bq Er DESERR_BADPARAM
Bad argument to routine.

Given a result statusstat the macroFn DES_FAILED statis false only for the first two statuses. 

AVAILABILITY

TheFn ecb_crypt ,Fn cbc_crypt ,andFn des_setparityfunctions are part of libtirpc. 

SEE ALSO

crypt(3) 

RESTRICTIONS

These routines are not available in RPCSRC 4.0.This information is provided to describe theDESinterface expected bySecure RPC.


 

Index

NAME
SYNOPSIS
DESCRIPTION
ERRORS
AVAILABILITY
SEE ALSO
RESTRICTIONS

This document was created byman2html,using the manual pages.