Home | Forum | MAN Pages | Tutorials | Directory | HOWTOs | About Me | Contact
 
FAQS
» Advanced Routing & Traffic Control
» General FAQ
» Squid Proxy Server
» Sendmail
» Fetchmail
» Postfix
» Connecting Mobile Phone
» Paging from Linux
» Standard Commands
» Some common terms
Linux HOWTOs
- Single List of HOWTOs
- Apache+SSL+PHP+fp
- Bash-Prog-Intro-HOWTO
- Disk-Encryption-HOTO
- Encourage Women Linux HOWTO
- Infrared HOWTO
- Howtos with LinuxDoc
- Italian-HOWTO
- KickStart-HOWTO
- Majordomo-MajorCool-HOWTO
- Multiboot-with-GRUB
- Pager
- Program-Library-HOWTO
- Remote-Bridging
- Shadow-Password-HOWTO
- Token-Ring
- Usenet-News-HOWTO
- VideoLAN-HOWTO
- Wireless-Sync-HOWTO
- XFree86-Touch-Screen-HOWTO
- ADSL Bandwidth Management
- Compile Apache
- Make a Bootdisk
- Linux-Windows9x-Grub
- Linux-Windows
- Linux Crash Recovery
- Optimise Squid
- Block websites in Squid
- Broadcast webcam in linux
- Compile RedHat Linux kernel
- Implement Firewall Security
- Increase Harddrive Performance
- Mount NTFS filesystem
- Patch / rebuild SRPM
- Secure Linux
- Set up a DHCP Server
- Set up an FTP server
- Set up Linux as a Router
- Use Cron
- Samba
Miscellaneous
» All Ports
» Spammers fetch email addresses
» Mounting NTFS in linux
» Linux Gazette
» Linux Man Pages
» Linux Directory
Linux Man Pages
- Section 1
- Section 2
- Section 3
- Section 4
- Section 5
- Section 6
- Section 7
- Section 8
Linux Directory
- General Information
- Linux Hardware
- Software / Applications
- Web Technology
- Software Development
- Linux Distributions
- Linux Publications
- Linux Beginners

linux,man,pages,linux man pages,squid,ntfs,mount
 

Name

des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED — fast DES encryption

Synopsis

#include <rpc/des_crypt.h>
int ecb_crypt( char *  key,
  char *  data,
  unsigned   datalen,
  unsigned   mode);
int cbc_crypt( char *  key,
  char *  data,
  unsigned   datalen,
  unsigned   mode,
  char *  ivec);
void des_setparity( char *  key);
int DES_FAILED( int   status);

DESCRIPTION

ecb_crypt() and cbc_crypt() 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 available. ecb_crypt() encrypts in ECB (Electronic Code Book) mode, which encrypts blocks of data independently. cbc_crypt() 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 parameter, 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 des_setparity(). The second parameter, data, contains the data to be encrypted or decrypted. The third parameter, datalen, is the length in bytes of data, which must be a multiple of 8. The fourth parameter, mode, is formed by OR'ing together some things. For the encryption direction 'or' in either DES_ENCRYPT or DES_DECRYPT. For software versus hardware encryption, 'or' in either DES_HW or DES_SW. If DES_HW is specified, and there is no hardware, then the encryption is performed in software and the routine returns DESERR_NOHWDEVICE. For cbc_crypt(), the parameter ivec is the 8-byte initialization vector for the chaining. It is updated to the next initialization vector upon return.

RETURN VALUE

DESERR_NONE

No error.

DESERR_NOHWDEVICE

Encryption succeeded, but done in software instead of the requested hardware.

DESERR_HWERROR

An error occurred in the hardware or driver.

DESERR_BADPARAM

Bad parameter to routine.

Given a result status stat, the macro DES_FAILED(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.

CONFORMING TO

4.3BSD. Not in POSIX.1-2001.

SEE ALSO

des(1), crypt(3) and xcrypt(3)


  @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI;

Taken from libc4 sources, which say:
Copyright (C) 1993 Eric Young - can be distributed under GPL.

However, the above header line suggests that this file in fact is
Copyright Sun Microsystems, Inc (and is provided for unrestricted use,
see other Sun RPC sources).

 
Random Linux Commands
WINE
Wine Is Not an Emulator. Wine is an implementation of the Windows 3.x and Win32 API's on top of X and Linux/Unix. Think of Wine as a Windows compatibility layer. Wine has been in development by a group of voluntary programmers since 1993 and is expected to release the first non-beta version 1.0 sometime in the first quarter of 2002. Wine 1.0 is expected to allow Linux users to run such applications as Internet Explorer, Outlook, Office, etc.... Wine can be downloaded from winehq.com and wine.codeweavers.com. You can also download a version tweaked for running games from transgaming.com.

Common Linux terms
Linux-FAQs Forum Categories
» About Forum
» Hardware Troubleshooting in Linux
» Linux Entertainment
» Resources
» Software toubleshooting and configuration
All Linux-FAQs Forums
» Crash Recovery
» FAQs
» Forum Talk
» Games
» General
» Linux Audio Support
» Linux Hardware / Driver
» Linux Installation Support
» Linux misc.
» Linux Networking
» Linux Newbies
» Linux Printing Support
» Linux Security
» Linux Video Support
» Mail Server
» Multimedia
» Tutorials
» Web Proxy Server
» Web Server

linux,man,man pages,faqs,howtos,forum
 
Powered by HTML
Linux-faqs.com Copyright, All rights reserved www.linux-faqs.com. Peeyush Maurya.