home *** CD-ROM | disk | FTP | other *** search
/ PCMania 10 / Pcmania_Ep2_10_CD-01.iso / ARTICULOS / tecnologia / SUPIDEA1.ZIP / supridea.doc < prev    next >
Encoding:
Text File  |  1997-01-19  |  5.4 KB  |  109 lines

  1. Super IDEA v1.0
  2.         Freebee encypherment for the paranoid cheapos (that's me!) and other 
  3.         cool people.
  4.  
  5. IDEA stands for International Data Encryption Algorithm
  6.         It was invented by Xuejia Lai and James Massey in Switzerland
  7.         It's a private key symmetric block algorithm, and is thought to be 
  8.         very secure, although it is still too new to have undergone the
  9.         scrutiny that other algorithms, notably DES, have endured.
  10.  
  11. This manifestation of the algorithm is adapted pretty much wholesale from 
  12. Dr. Dobbs Journal #208 December 1993
  13.  
  14.  
  15. OVERVIEW OF IDEA
  16.  
  17. The algorithm operates on 64-bit data blocks, divided into 4 16-bit 
  18. subblocks.  For DOS files, it packs two characters into a 16-bit word
  19. and treats 4 such words as the subblocks. Since not all files have the right
  20. length for this, a header is used to tell IDEA's decrypter how long the file
  21. will be.  Thus encrypted files are a few bytes longer than they started.  They
  22. are of course put back to normal when decrypted.
  23.  
  24.  
  25. SIMPLIFIED EXPLANATION OF PROGRAM OPERATION
  26.  
  27. The key is a 128-bits.  This program uses an algorithym to generate the key.  
  28. It takes the key the user inputs and creates the following:
  29. (all letters herein are representations, one letter for each byte.  This is 
  30. not to say that the actual XOR of a and h is i)
  31. ____________________________________________________
  32. | usrkey   | shftkey  | modkey      | modshftkey   |
  33. | abcdefgh | habcdefg | (see below) | (see below)<-+- final key
  34. +----------+----------+-------------+--------------+
  35.  
  36. MODKEY MAKEUP:              MODSHFTKEY MAKEUP:
  37. a ^ h = i                   The eight bits in each character
  38. b ^ a = j  Hence, modkey    are shifted such that, if the bitcode
  39. c ^ b = k  is equal to      was 01011011 (random example--not an actual piece of code)
  40. d ^ c = l  ijklmnop         it would be shifted to 10101101.  This yields
  41. e ^ d = m                   qrstuvwx (an identifier for the new pw, not what it actually
  42. f ^ e = n                   would be).
  43. g ^ f = o
  44. h ^ g = p
  45.  
  46. usrkey : the key the user put in.  Written as abcdefgh because all are 8 chars.
  47.          if the user's key is shorter than eight chars, zeros are used to pad it.
  48.          this does not make the user need to change the key--it is automatically padded.
  49.          if a key is too long, it is truncated in the same way.  You can encrypt a file with
  50.          abcdefghijk, but only abcdefgh will be used.  You can even enter abcdefghijk when
  51.          decrypting it, because it is also truncated then.
  52.  
  53. shftkey: the key after it is shifted to the right
  54.  
  55. modkey : found by XORing the shftkey and the usrkey together.
  56.  
  57. modshftkey :  the modkey is shifted again to the right.
  58.  
  59.  
  60. OTHER INFORMATION
  61.  
  62. I have also included the source code in the file called source.zip.  Please feel free to 
  63. make your own modifications of this and distribute it if you desire.  Remember--trying to 
  64. keey the algorithm you use secret is worse for you in the long run--the more people that 
  65. see it, the faster it will be analyzed and errors that you overlooked will be found.
  66.  
  67.  
  68. USAGE
  69.  
  70. usage is "idea <filename.ext> <e|d[w]> <key>"
  71.         <e|d[w]> stands for either an "e" or a "d", instructing whether to  
  72.                 e-ncypher or d-ecypher, plus an optional "w", which tells
  73.                 IDEA to overwrite the original file with the encyphered
  74.                 data.  Leaving "w" off creates a new file called "filename.enc" or 
  75.                 "filename.dec" (if decyphering) where "filename" is the same as the
  76.                 input file.  Overwriting is more secure--it destroys old data--but may
  77.                 not be what you want.
  78.         key is a word up to 8 characters BUT NOT MORE!!! extra characters
  79.                 will be truncated off of the key, and a warning will be displayed.
  80.                 Note that the truncated key will be used, and you can enter the long
  81.                 key when the time comes to decrypt the file.  It will just be truncated
  82.                 again.
  83.  
  84. Its not my code so don't send me money.  This is freeware.  (The IDEA algorithm is in 
  85. fact patented, but it can be freely used and distributed for non-commercial 
  86. use.  The patent is held by Ascom-Tech AG in switzerland, tel: +41 65 242-885) 
  87. If you need to contact me, I can be found at <kwantam@mailhost.net>.
  88.  
  89. Please note that use of this program is done with no insurance from me that 
  90. it will work or anything----use it at your own risk. I've bug checked it
  91. and everything and it looks good, and the algorithm is straight out of 
  92. Dr Dobbs Journal (#208), but I'm not gonna be responsible for failure.  If 
  93. you have a real and serious need for cryptography, please at the very least 
  94. look over the source code---you'd be better advised to get a professional 
  95. program. While we're on this topic, please do not forget your key!!! a 
  96. brute-force attack on this algorithm "requires 2^128 encryptions to recover 
  97. the key.....a billion chips testing a billion keys a second would take 10^13 
  98. years (the universe has only existed for 1/100th of that time) to break IDEA,"
  99. according to Dr. Dobbs Journal #208 p.54.  For even greater security compress
  100. the file(s) you are encrypting with PKZIP (NO PASSWORD) and then use this program
  101. to encrypt the zip file.  This limits a cryptanalyst's ability to look for 
  102. repetition in the cyphertext.
  103.  
  104.  
  105. Thanks for choosing Super IDEA v1.0
  106. Regards,
  107. KwAnTAM_PoZeEtroN
  108. <kwantam@mailhost.net>
  109. 01/19/96