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

📄 dlock.txt

📁 DIAMOND2加密算法的原代码
💻 TXT
字号:
DLOCK.TXT -- DOCUMENTATION FOR DLOCK.EXE AND ITS SOURCE FILESINTRODUCTIONDLOCK is a Data LOCK program that uses the Diamond encryption algorithm.  Italso tests the correct implementation of the Diamond and Diamond Liteencryption algorithms in the enclosed library files.Although DLOCK is useful as it stands, it is probably of more use as alibrary of source code to use to build encryption into other applications. Diamond and Diamond Lite are 100% roylty free algorithms, derived from theMPJ and MPJ2 encryption algorithms.I've studied too much cryptography to make a brash claim of security for anyalgorithm, but my confidence level in Diamond and Diamond Lite is very highbecause of the failure of anyone I've dared to break MPJ to do so for severalyears.  See the challenge section below.When used to encrypt or decrypt files, DLOCK places no special headers orother identification on the ciphertext files.  This is good for security, butbad for user friendliness.  It always processes from one file to another, sothat you can verify that the encryption or decryption is good before deletingthe original.  This is very important, since a single character typo in thepass phrase is enough to render a file total garbage.LEGAL NOTICESDocumentation files, executable files, and source code files not markedotherwise are Copyright (C) 1994 Michael Paul Johnson.  All rights reserved. There is NO WARRANTY expressed or implied for any of this.  Diamond andDiamond Lite are Trade Marks of Michael Paul Johnson.  Other trade marksmentioned herein belong to their owners and are mentioned for identificationpurposes only.Some cryptographic, cryptanalytic, and key management software and technicaldata is subject to export controls and other legal restrictions.  Contactcompetent legal authority for more information.  It is your responsibility tocomply with all currently valid laws and treaties that apply to you.  Do notuse this software or technical data for any illegal activity.As far as is permitted by law, permission is hereby granted to copy and usethe copyrighted portions of this distribution for any legal use, providedthat the documentation is kept unmodified and the software is used inaccordance with the GNU Library General Public License as published by theFree Software Foundation, version 2.CRC.H, CRC.CPP, DIAMOND.H, and DIAMOND.CPP are in the Public Domain.SYSTEM REQUIREMENTSTwo compiled versions are included in this distribution:  MS-DOS executableand Sun SparcStation binary.  If you wish to use this program on anotherplatform, you may recompile the provided source code for that platform.COMMAND LINE SYNTAXTo test Diamond and Diamond Lite against the validation data in DIAMOND.DAT:  DLOCK /TTo encrypt a file:  DLOCK /E [/S] infilename outfilename [/Ppass phrase | /Kkeyfile]/E = Encrypt./S = Silent mode (minimal screen output)./P = Pass phrase follows on the command line.  The pass phrase is casesensitive, and every character counts.  Embedded spaces are OK.  /P, if used,MUST be the lase command line parameter, since all characters after it areconsidered to be part of the passphrase./K = Get the pass phrase from the file name provided.  The passphrase in akey file may include ANY binary data, up to 256 bytes.Note that if /P or /K is not used, then DLOCK looks for the passphrase in theenvironment variable DLOCK_KEY.  If no passphrase is found there, then DLOCKwill prompt you to enter the passphrase at the keyboard.  Spaces and otherspecial characters are allowed in the passphrase.For example,DLOCK /E MARCH.WK1 MARCH.ENC /PNone of YoUr BuSiness! Really!encrypts MARCH.WK1 with the passphrase "None of YoUr BuSiness! Really!",placing the results in MARCH.ENC.  If you wish to get rid of the plain textversion, use another utility to overwrite and delete the original.To decrypt a file:  DLOCK /D [/S] infilename outfilename [/Ppass phrase | /Kkeyfile]Switches used here are the same as for encryption, except that the /D (forDecrypt) replaces /E.For example,DLOCK /D MARCH.ENC MARCH.WK1 /PNone of YoUr BuSiness! Really!decrypts the file encrypted above.Command line switches are not case sensitive, and may start with - or /. There should be a space or tab between adjacent switches.  Except for /P,which must be last, the switches may occur in any order (before, between, orafter the file names).HOW DLOCK WORKSWhen encrypting or decrypting files, DLOCK uses a 10-round Diamond blockcipher in cipher block chaining with ciphertext feedback mode (CBC).  Thismeans that any regularities in the plain text are completely obscured in thecipher text.  The original file length is exactly preserved.  See the sourcecode and the accompanying documents for details.ADVANTAGES OF DLOCK1.  To the best of my knowledge, no one has broken Diamond (or itspredecessors, MPJ and MPJ2), yet.  See the US$271.82 challenge, below.2.  The block chaining mode is time-tested and well respected.3.  Complete source code is included for your examination and to facilitateporting to other platforms.4.  The cipher text is the same size as the plain text.5.  It is free.6.  You are free to use the algorithms and/or code in this distribution toincorporate encryption into your own applications, without payment ofroyalties or delays.7.  Diamond and Diamond Lite, when incorporated into a system that weakensthe effective key length and resists modification by the user to thesatisfaction of the NSA, may be exportable.  Contact the Department of Stateand the NSA for details and additional requirements.8.  DLOCK allows easy validation of implementations of Diamond and DiamondLite.9.  If you don't like the way DLOCK works and you can program in C or C++,you can fix it to your liking.10.  The author is easy to contact via email (m.p.johnson@ieee.org).11.  The encryption is too strong to be generally exportable.  There are nointentional weaknesses or trap doors in the algorithm or the program.12.  Identical files, encrypted with identical keys, always yield identicalciphertext.  This is good for validating algorithms.DISADVANTAGES OF DLOCK1.  Key management is all manual.2.  Encryption of multiple files is cumbersome unless you use an archivingutility (like PKZIP, LHA, ARJ, etc.) first.3.  No one is getting rich on your purchase of this product, so it doesn'thelp the economy, much.4.  The ciphertext reveals the size of the plain text (but not its contents).5.  Identical files, encrypted with identical keys, always yield identicalciphertext.  This is bad for resistance to traffic analysis.6.  No 7-bit ASCII armoring (uuencoding or radix-64 encoding) is built in forEMAIL purposes -- use another utility to do that.7.  The encryption is too strong to be exportable without a lot of hasslesand controls on the destinations.8.  If you forget your passphrase, your encrypted data is as good as gone.  Ican't get it back, no matter how important it was.DATA COMPRESSIONDLOCK doesn't compress data, but if you compress your data before encryptingit (i.e. with PKZIP, ARJ, etc.), you will decrease the size of the ciphertextand improve security.  Attempted compression after encryption does neither.RECOMPILING DLOCKYou don't really need to recompile DLOCK unless you want to modify it or portit to another platform.  I compiled DLOCK.EXE with Borland C++ 4.0, using thecommands in MAKDLOCK.BAT.  This batch file also applies PKLITE compression,but that is optional.  I compiled the Unix version of DLOCK on a Netcominteractive host machine with the command:c++ -DUNIX -o dlock dlock.c diamond.c crc.cVERIFYING THAT YOUR VERSION HASN'T BEEN TAMPERED WITHIf you have PGP, you can check my detached signatures on the files in thisdistribution with the file VALIDATE.BAT, which should look like:pgp challeng.sig challeng.encpgp copying.sig copying.txt pgp crc_cpp.sig crc.cpp     pgp crc_h.sig crc.h       pgp def.sig def.hpgp diamondc.sig diamond.cpppgp diamondd.sig diamond.dat pgp diamondh.sig diamond.hpgp diamondp.sig diamond.pspgp diamondt.sig diamond.txtpgp dlocksun.sig dlock       pgp dlockcpp.sig dlock.cpp   pgp dlockexe.sig dlock.exe   pgp dlocktxt.sig dlock.txt   pgp makdlock.sig makdlock.batpgp thesis.sig thesis.txtIf you don't have a copy of PGP, you can buy a copy from Viacrypt or get thefreeware version from numerous sites, including the Colorado Catacombs BBS(303-938-9654) or ftp, see ftp:csn.org//mpj/README.MPJ.THE US$271.82 CHALLENGEOK, US$271.82 is not enough to pay for the time it would take to do seriouscryptanalysis of the Diamond Encryption Algorithm, but it is enough to provethat data encrypted with DLOCK is secure against the average hacker.  Thefile CHALLENG.ENC was encrypted with DLOCK.EXE.  If you are the first personto (1) decrypt CHALLENGE.ENC and (2) follow the instructions in the decryptedfile to claim your prize before midnight UTC, 29 April 1997, then you willget US$271.82 of my hard-earned money.  To claim this prize, you must revealhow you deciphered the ciphertext.  You must also not break the law(including any currently valid export laws) in the process of earning thisprize.  If the ciphertext is not broken, I get to keep my money.The plain text that CHALLENGE.ENC was encoded from is plain, uncompressed,7-bit ASCII with both CR and LF at the ends of lines.  It contains Englishtext, including instructions on how to claim the prize and contact theauthor.THE FAIR CHALLENGEThe US$271.82 challenge given above is probably unfair, unless I really goofedbadly in the implementation of DLOCK or the invention of the DiamondEncryption Algorithm.  On the other hand, if you find what you think is aweakness or error in either DLOCK or Diamond (other than the disadvantageslisted above), please let me know.  There is no cash reward for suchinformation, but I will use the information to help improve the encryptionprograms that I write.CONTACTING THE AUTHORYou can reach me by email at m.p.johnson@ieee.org, CompuServe 71331,2332, orat Mike Johnson, PO BOX 1151, LONGMONT CO 80502-1151, USA.Check for the latest version of this program on the Colorado Catacombs BBS,303-938-9654, or for ftp from csn.org//mpj or ftp.netcom.com//pub/mpj.REGISTRATIONThis program is free, so registration is not required.  However, if you wouldlike to be added to my list of users to be notified of upgrades and relatedproducts, or if you would like to make a donation to advance the cause offree privacy protection software, feel free to contact me at the aboveaddress.

⌨️ 快捷键说明

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