⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 des.1

📁 DES( Data Encryption Standard)算法
💻 1
字号:
.ds ]T 15 Nov 90.ds CP \s-2\(co\f3 Copyright 1990 by David G. Koontz\f1\s+2.de}F.ev1.}E.if\n()s 'sp |\n(.pu-1v-1p.if\n()t 'sp |\n(.pu-3v.ifn 'sp |\n(.pu-4v.ifn .tl Page %\*(]T.if\n()s .tl - % -.if\n()t \{.if o .tl Page %\*(CP\*(]T.ife .tl \*(]T\*(CPPage % \}'bp.ev...de}C...po 1.0i.nrIN 0.5i.nr)S 12.TH \f3DES 1 "" "\s+1\f6/dev/ktz\f1\s-1".SH \f3NAMEdes \- encrypt/decrypt using verified NBS DES algorithm.SH \f3SYNOPSIS.B des-e \|\(bv \|-d [-k key \|\(bv \|-K hex_key] [-p pad_character], or.br.B des-t [-v].SH \f3DESCRIPTION.I Des\^encrypts or decrypts according to the.B -e (encrypt) and .B -d (decrypt) flags reading from standard input and writing to standard output.The.B -kflag passes a string of 8 characters to be used as key.  The.B -Kflag passes a 16 character hexidecimal key.  The DES algorithmproduces a 64 bit cipher product using a 56 bit key and 64 bit plaintext value..PPIf no key is passed .I des\^uses the routine getpass("key: ") to demand an 8 character key from standard input.  All key inputs must be ofthe correct length or.I des\^ will  terminate..PPCharacter string keys (.B -k and.B getpass()) have each byte shifted left one bit, to leave bit[0] undefined.  Bit[0] isused as a parity bit, and is otherwise uninvolved in DES keys.  Shiftingcharacter string keys provides retention of all ascii defined bits andresults in a 56 bit key.  Hex key strings, such as from the .B -Koption or from the test vector, are not shifted.  It is the hex key provider'sresponsibility to properly position 7 bits of key into the upper 7 bits of eachhex byte..PPThe .B -pflag passes a hexidecimal value of the range 0x0 - 0xFF to be used in placeof the default pad character (0x20).The pad character is used to fill out the last 8 byte block if the inputstream does not supply muliples of 8 bytes..SH \f3TESTMODEThe .B -tand .B -vflags are used to toggle .I test\^and .I verbose\^modes.  Testmode switches input format to test vectors used in DES algorithmverification.  Each vector includes a 16 hexdigit key, a 16 hexdigit data value and a 16 hexdigit result value.  All output during testmode operation is made to standard error output.  A summary of tests is output irregardless ofthe .I -v\^ flag.  Verbose mode outputs the test source and error locations..SH \f3TEST VECTOR FORMAT An input line must contain less than 127 characters.  A line containinga leading space is considered a vector.  A line without a leadingspace is a comment.  The .I des\^mode is set for vectors following a comment line that contains either.B encryptor.B decryptas the first 7 characters.A line containing a vector is comprisedof a leading space and three 16 hexdigit values..PPA trailing comment line in the vector file forces output of the errortotal.  .SH \f3NORMAL OPERATION.I Des\^encrypts and decrypts with the same key:.PP.RSdes -e -k key < clear >cypher.brdes -d -k key < cypher.RE.PPwill output a stream identical to that contained in clear, with the execeptionof the possibility of up to 7 pad characters being appended to the decodedstream. .PPFiles encrypted by.I des\^are compatible with the National Bureau of Standards Digital EncryptionStandard in an electronic code book (ECB) implementation..PP.I Des\^utilizes the libcrypt library used by the passwd and makekey programs..I Des\^ is slower than the .B cryptcommand it is intended to replace, a trade off forhigher security..I Des\^ also has the capabilty of decrypting concatenated files, ifall used the same key schedule and key..bp.SH \f3EXAMPLE.IPdes -e -k abcdefgh < foo.c > fum.PPwill use the string "abcdefgh" as keyto encrypt the contents of "foo.c", and place the encryptedoutput in file "fum".  File "fum" at this point will be unreadable..SM \f3NOTE:\f1 that the original file, "foo.c", remains in readable form.To obtain readable print-out of the file "fum", itcould be decoded as follows:.IPdes -d < fum.PPAfter the response:.IPkey:.PPthe user types in "abcdefgh"..SH \f3FILES.ta \w'des.test\ \ \ \ 'udes.test	test vector file, derived from \f2NBS Special Pub 500-20.br.DT.SH \f3SEE ALSOcrypt(1),makekey(1)..SH \f3BUGSEncryption of large files is time consuming.  Some implementations of libcrypt do not allow the.I edflag\^in the routine encrypt(block,edflag) to be set to decode (TRUE).This is done in compliance with export restrictions on cryptographicsystems.  This may be defeated by clever programming in some cases..PP.I Des\^also uses padding of the input to assemble the last block of data.  This canresult in up to 7 characters added to the decoded data.  If having the padcharacter selectable is not flexible enough, a pipeline filter can be writtento protect and stuff a pad value in the plaintext domain, and strip padcharacters from the decoded output..brSee .I crypt\^ for additional bugs.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -