home *** CD-ROM | disk | FTP | other *** search
/ PCMania 10 / Pcmania_Ep2_10_CD-01.iso / ARTICULOS / tecnologia / DLOCK2.ZIP / DLOCK2.TXT < prev    next >
Encoding:
Text File  |  1995-12-21  |  11.5 KB  |  286 lines

  1. DLOCK.TXT -- DOCUMENTATION FOR DLOCK2.EXE AND ITS SOURCE FILES
  2.  
  3.  
  4. INTRODUCTION
  5.  
  6. DLOCK2 is a Data LOCK program that uses the Diamond2 Block Cipher.  It also
  7. tests the correct implementation of the Diamond2 and Diamond2 Lite encryption
  8. algorithms in the enclosed library files.
  9.  
  10. Although DLOCK2 is useful as it stands, it is probably of more use as a
  11. library of source code to use to build encryption into other applications. 
  12. Diamond2 and Diamond2 Lite are 100% roylty free algorithms, derived from the
  13. MPJ, MPJ2, and Diamond encryption algorithms.
  14.  
  15. I've studied too much cryptography to make a brash claim of security for any
  16. algorithm, but my confidence level in Diamond2 and Diamond2 Lite is very high
  17. because of the failure of anyone I've dared to break MPJ or Diamond to do so
  18. for several years.  See the challenge section below.
  19.  
  20. When used to encrypt or decrypt files, DLOCK2 places no special headers or
  21. other identification on the ciphertext files.  This is good for security, but
  22. bad for user friendliness.  It always processes from one file to another, so
  23. that you can verify that the encryption or decryption is good before deleting
  24. the original.  This is very important, since a single character typo in the
  25. pass phrase is enough to render a file total garbage.
  26.  
  27.  
  28. LEGAL NOTICES
  29.  
  30. Documentation files, executable files, and source code files not marked
  31. otherwise are Copyright (C) 1994-1995 Michael Paul Johnson.  All rights
  32. reserved. There is NO WARRANTY expressed or implied for any of this. 
  33. Diamond2 and Diamond2 Lite are Trade Marks of Michael Paul Johnson.  Other
  34. trade marks mentioned herein belong to their owners and are mentioned for
  35. identification purposes only.
  36.  
  37. Some cryptographic, cryptanalytic, and key management software and technical
  38. data is subject to export controls and other legal restrictions.  Contact
  39. competent legal authority for more information.  It is your responsibility to
  40. comply with all currently valid laws and treaties that apply to you.  Do not
  41. use this software or technical data for any illegal activity.
  42.  
  43. As far as is permitted by law, permission is hereby granted to copy and use
  44. the copyrighted portions of this distribution for any legal use, provided
  45. that you don't misrepresent its source or modify the documentation without my
  46. permission.
  47.  
  48. CRC.H, CRC.CPP, DIAMOND.H, and DIAMOND.CPP are in the Public Domain.
  49.  
  50.  
  51. SYSTEM REQUIREMENTS
  52.  
  53. An MS-DOS executable is supplied.  To use this code on a Unix system,
  54. recompile it.
  55.  
  56.  
  57. COMMAND LINE SYNTAX
  58.  
  59. To test Diamond2 and Diamond2 Lite against the validation data in
  60. DIAMOND2.DAT:
  61.   DLOCK2 /T
  62.  
  63. To encrypt a file:
  64.   DLOCK2 /E [/S] infilename outfilename [/Ppass phrase | /Kkeyfile]
  65.  
  66. /E = Encrypt.
  67.  
  68. /S = Silent mode (minimal screen output).
  69.  
  70. /P = Pass phrase follows on the command line.  The pass phrase is case
  71. sensitive, and every character counts.  Embedded spaces are OK.  /P, if used,
  72. MUST be the lase command line parameter, since all characters after it are
  73. considered to be part of the passphrase.
  74.  
  75. /K = Get the pass phrase from the file name provided.  The passphrase in a
  76. key file may include ANY binary data, up to 256 bytes.
  77.  
  78. Note that if /P or /K is not used, then DLOCK2 looks for the passphrase in
  79. the environment variable DLOCK_KEY.  If no passphrase is found there, then
  80. DLOCK2 will prompt you to enter the passphrase at the keyboard.  Spaces and
  81. other special characters are allowed in the passphrase.  If you are
  82. encrypting and entering a passphrase at the keyboard, you will be asked to
  83. type the passphrase twice to ensure that you actually typed what you thought
  84. you typed.  This is because it is not fun trying to figure out what you
  85. mis-typed when you are trying to decrypt the file, later.
  86.  
  87. For example,
  88. DLOCK2 /E MARCH.WK1 MARCH.ENC /PNone of YoUr BuSiness! Really!
  89. encrypts MARCH.WK1 with the passphrase "None of YoUr BuSiness! Really!",
  90. placing the results in MARCH.ENC.  If you wish to get rid of the plain text
  91. version, use another utility to overwrite and delete the original, such as my
  92. secure delete utility in del102.zip.
  93.  
  94. To decrypt a file:
  95.   DLOCK2 /D [/S] infilename outfilename [/Ppass phrase | /Kkeyfile]
  96.  
  97. Switches used here are the same as for encryption, except that the /D (for
  98. Decrypt) replaces /E.
  99.  
  100. For example,
  101. DLOCK2 /D MARCH.ENC MARCH.WK1 /PNone of YoUr BuSiness! Really!
  102. decrypts the file encrypted above.
  103.  
  104. Command line switches are not case sensitive, and may start with - or /. 
  105. There should be a space or tab between adjacent switches.  Except for /P,
  106. which must be last, the switches may occur in any order (before, between, or
  107. after the file names).
  108.  
  109.  
  110. HOW DLOCK2 WORKS
  111.  
  112. When encrypting or decrypting files, DLOCK2 uses a 10-round Diamond2 Block
  113. Cipher in cipher block chaining with ciphertext feedback mode (CBC).  This
  114. means that any regularities in the plain text are completely obscured in the
  115. cipher text.  The original file length is exactly preserved.  See the source
  116. code and the accompanying documents for details.
  117.  
  118.  
  119. ADVANTAGES OF DLOCK2
  120.  
  121. 1.  To the best of my knowledge, no one has broken Diamond2 (or its
  122. predecessors, MPJ and MPJ2), yet.  See the US$314.16 challenge, below.
  123.  
  124. 2.  The block chaining mode is time-tested and well respected.
  125.  
  126. 3.  Complete source code is included for your examination and to facilitate
  127. porting to other platforms.
  128.  
  129. 4.  The cipher text is the same size as the plain text.
  130.  
  131. 5.  It is free.
  132.  
  133. 6.  You are free to use the algorithms and/or code in this distribution to
  134. incorporate encryption into your own applications, without payment of
  135. royalties or delays.
  136.  
  137. 7.  Diamond2 and Diamond2 Lite, when incorporated into a system that weakens
  138. the effective key length and resists modification by the user to the
  139. satisfaction of the NSA, may be exportable.  Contact the Department of State
  140. and the NSA for details and additional requirements.
  141.  
  142. 8.  DLOCK2 allows easy validation of implementations of Diamond2 and Diamond2
  143. Lite.
  144.  
  145. 9.  If you don't like the way DLOCK2 works and you can program in C or C++,
  146. you can fix it to your liking.
  147.  
  148. 10.  The author is easy to contact via email (m.p.johnson@ieee.org).
  149.  
  150. 11.  The encryption is too strong to be generally exportable.  There are no
  151. intentional weaknesses or trap doors in the algorithm or the program.
  152.  
  153. 12.  Identical files, encrypted with identical keys, always yield identical
  154. ciphertext.  This is good for validating algorithms.
  155.  
  156.  
  157. DISADVANTAGES OF DLOCK2
  158.  
  159. 1.  Key management is all manual.
  160.  
  161. 2.  Encryption of multiple files is cumbersome unless you use an archiving
  162. utility (like PKZIP, LHA, ARJ, etc.) first.
  163.  
  164. 3.  No one is getting rich on your purchase of this product, so it doesn't
  165. help the economy, much.
  166.  
  167. 4.  The ciphertext reveals the size of the plain text (but not its contents).
  168.  
  169. 5.  Identical files, encrypted with identical keys, always yield identical
  170. ciphertext.  This is bad for resistance to traffic analysis.
  171.  
  172. 6.  No 7-bit ASCII armoring (uuencoding or radix-64 encoding) is built in for
  173. EMAIL purposes -- use another utility to do that.
  174.  
  175. 7.  The encryption is too strong to be exportable without a lot of hassles
  176. and controls on the destinations.
  177.  
  178. 8.  If you forget your passphrase, your encrypted data is as good as gone.  I
  179. can't get it back, no matter how important it was.
  180.  
  181.  
  182. DATA COMPRESSION
  183.  
  184. DLOCK2 doesn't compress data, but if you compress your data before encrypting
  185. it (i.e. with PKZIP, ARJ, etc.), you will decrease the size of the ciphertext
  186. and improve security.  Attempted compression after encryption does neither.
  187.  
  188.  
  189. RECOMPILING DLOCK2
  190.  
  191. You don't really need to recompile DLOCK2 unless you want to modify it or
  192. port it to another platform.  I compiled DLOCK2.EXE with Borland C++ 4.0,
  193. using the commands in MAKDLOCK.BAT.  This batch file also applies PKLITE
  194. compression, but that is optional.  I compiled the Unix version of DLOCK2 on
  195. a Netcom interactive host machine with the command:
  196.  
  197. c++ -DUNIX -o dlock2 dlock2.C diamond2.C crc.C
  198.  
  199.  
  200. VERIFYING THAT YOUR VERSION HASN'T BEEN TAMPERED WITH
  201.  
  202. You can verify that the files listed in DLOCK2.ASC have not been tampered
  203. with by issuing the command 
  204.  
  205. md5sum -cv dlock2.asc
  206.  
  207. Where md5sum.exe is the same utility distributed with Pretty Good Privacy
  208. (PGP) and QCRYPT11.ZIP, as well as with this set of files.  If a file has
  209. been altered, it will print an error message.  You can check to see if
  210. DLOCK2.ASC has been altered by adding my public key (MPJ8.ASC) to your PGP
  211. key ring and using PGP to check the digital signature on that file with the
  212. command
  213.  
  214. pgp dlock.asc
  215.  
  216. If you don't have a copy of PGP, you can buy a copy from Viacrypt or get the
  217. freeware version from numerous sites, including the Colorado Catacombs BBS
  218. (303-772-1062) or on the Internet, see ftp://ftp.csn.net/mpj/getpgp.asc or
  219. send mail to mpjohnso@nyx.cs.du.edu for an automatic list of sites where PGP
  220. can be found.
  221.  
  222.  
  223. OTHER DOCUMENTATION
  224.  
  225. DIAMOND2.DOC Explains the Diamond2 Encryption Algorithm (Microsoft Word for
  226.              Windows 6 format).
  227. DIAMOND2.PS  Same as Diamond2.DOC, but in PostScript format.
  228. THESIS.TXT   Is my Master's Thesis, and explains the MPJ encryption algorithm,
  229.              the predecessor of Diamond2.
  230.  
  231.  
  232. THE US$314.16 CHALLENGE
  233.  
  234. OK, US$314.16 is not enough to pay for the time it would take to do serious
  235. cryptanalysis of the Diamond2 Encryption Algorithm, but it is enough to prove
  236. that data encrypted with DLOCK2 is secure against the average hacker.  The
  237. file 31416.ENC was encrypted with DLOCK2.EXE.  If you are the first person to
  238. (1) decrypt 31416.ENC and (2) follow the instructions in the decrypted file
  239. to claim your prize before noon UTC, 20 September 2000, then you will get
  240. US$314.16 of my hard-earned money.  To claim this prize, you must reveal how
  241. you deciphered the ciphertext.  You must also not break the law (including
  242. any currently valid export laws) in the process of earning this prize.  If
  243. the ciphertext is not broken, I get to keep my money.
  244.  
  245. The plain text that 31416.ENC was encoded from is plain, uncompressed,
  246. 7-bit ASCII with both CR and LF at the ends of lines.  It contains English
  247. text, including instructions on how to claim the prize and contact the
  248. author.
  249.  
  250.  
  251. THE FAIR CHALLENGE
  252.  
  253. The US$314.16 challenge given above is probably unfair, unless I really
  254. goofed badly in the implementation of DLOCK2 or the invention of the Diamond2
  255. Encryption Algorithm.  On the other hand, if you find what you think is a
  256. weakness or error in either DLOCK2 or Diamond2 (other than the disadvantages
  257. listed above), please let me know.  There is no cash reward for such
  258. information, but I will use the information to help improve the encryption
  259. programs that I write.
  260.  
  261.  
  262. CONTACTING THE AUTHOR
  263.  
  264. You can reach me by email at m.p.johnson@ieee.org, CompuServe 71331,2332, or
  265. at Mike Johnson, PO BOX 1151, LONGMONT CO 80502-1151, USA.
  266.  
  267. Check for the latest version of this program and Mike Johnson's other
  268. shareware, (and some freeware) on the Colorado Catacombs BBS,
  269. 303-772-1062, or see ftp://ftp.csn.net/mpj/README or
  270. ftp://ftp.netcom.com/pub/mp/mpj/README.
  271.  
  272.  
  273. REGISTRATION
  274.  
  275. This program is free, so registration is not required.  However, if you would
  276. like to be added to my list of users to be notified of upgrades and related
  277. products, or if you would like to make a donation to advance the cause of
  278. free privacy protection software, feel free to contact me at the above
  279. address.  I also charge $20.00 for disk, time, and shipping if you want me to
  280. send you a copy of DLOCK2 by mail.  I regret that I cannot mail copies of
  281. DLOCK2 destinations in any country except the USA and Canada under current
  282. export regulations.
  283.  
  284.  
  285.  
  286.