![]() | ![]() | ![]() | ![]() |
des(n) 1.1 des "Data Encryption Standard (DES)"Namedes - Implementation of the DES and triple-DES ciphers Synopsis
DescriptionThis is an implementation in Tcl of the Data Encryption Standard (DES) as published by the U.S. National Institute of Standards and Technology (NIST) [1]. This implementation also supports triple DES (3DES) extension to DES. DES is a 64-bit block cipher that uses a 56-bit key. 3DES uses a 168-bit key. DES has now officially been superceeded by AES but is in common use in many protocols. The tcllib implementation of DES and 3DES uses an implementation by Mac Cody and is available as a separate download from [2]. For anyone concerned about the details of exporting this code please see the TclDES web pages. The tcllib specific code is a wrapper to the TclDES API that presents same API for the DES cipher as for other ciphers in the library. COMMANDS
PROGRAMMING INTERFACEInternal state is maintained in an opaque structure that is returned from the Init function. In ECB mode the state is not affected by the input but for other modes some input dependent state is maintained and may be reset by calling the Reset function with a new initialization vector value.
MODES OF OPERATION
EXAMPLES% set ciphertext [DES::des -mode cbc -dir encrypt -key $secret $plaintext] % set plaintext [DES::des -mode cbc -dir decrypt -key $secret $ciphertext] set iv [string repeat \\0 8] set Key [DES::Init cbc \\0\\1\\2\\3\\4\\5\\6\\7 $iv] set ciphertext [DES::Encrypt $Key "somedata"] append ciphertext [DES::Encrypt $Key "moredata"] DES::Reset $Key $iv set plaintext [DES::Decrypt $Key $ciphertext] DES::Final $Key REFERENCES
AUTHORSJochen C Loewer, Mac Cody, Pat Thoyts BUGS, IDEAS, FEEDBACKThis document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category des of the Tcllib SF Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation. See Alsoaes(n), blowfish(n), md5(n), rc4(n), sha1(n) Keywords3DES, DES, block cipher, data integrity, encryption, security CopyrightCopyright © 2005, Pat Thoyts <patthoyts@users.sourceforge.net> |