home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 1112.dms / 1112.adf / Encrypt / Encrypt.doc < prev    next >
Text File  |  1988-07-25  |  3KB  |  87 lines

  1. Encryption by Steve I. Meredith
  2. -------------------------------
  3.  
  4. How the program Works
  5.  
  6. The idea behind the actual encryption is simple.  Take a number, eg. $7C, we'll take this number as being a secret message (Hmm?).  Take another number, $66, we'll call this the passcode.
  7.  
  8. Now XOR $7C and $66 to produce $1A.  Now NOT $1A to give -$E5 (or $FFFFFFE5) ones comp.  So, we have combined our secret message and a passcode along with the XOR and NOT functions to produce a new code altogether.  We'll call this our FileCode.
  9.  
  10. Now note the following ;
  11.  
  12.     [NOT] $FFFFFFE5 = $1A
  13.     $1A [XOR] $66   = $7C (back to our original code)
  14.  
  15. and likewise ;
  16.  
  17.     $1A [XOR] $7C   = $66
  18.  
  19. Thus, given number A and B. XORing these two numbers gives C.  If we know one number, B we can always get back to A by XORing with C.
  20. This is the principle applied to many protection packages on the market.  The program Encryption uses this method and a little more for the users convenience.
  21.  
  22. The program is invoked from AmigaDOS by the command :
  23.  
  24.     "CRYPT passCode1 PassCode2 Filename"
  25.  
  26. eg.
  27.  
  28.     "CRYPT 123 hello MyFile"
  29.  
  30. The program then checks 'MyFile' to see if it is already encrypted.  If it isn't, then the Two passCodes are combined to produce a unique DiskCode.  This code is then used to XOR and NOT every WORD in the stipulated file.
  31.  
  32. Example take an ASCII text file before encryption ;    
  33.  
  34. 0000: 68656C6C 6F2C2074 68697320 69732073    hello, this is s
  35. 0010: 6F6D6520 73616D70 6C652064 61746120    ome sample data 
  36. 0020: 28612074 65787420 66696C65 29206265    (a text file) be
  37. 0030: 666F7265 20490A45 6E637279 70742069    fore I.Encrypt i
  38. 0040: 742E2020 41732079 6F752063 616E206F    t.  As you can o
  39. 0050: 6276696F 75736C79 20736565 2C206974    bviously see, it
  40. 0060: 27732072 65616461 626C6520 286F720A    's readable (or.
  41. 0070: 6973206D 7920456E 676C6973 68207468    is my English th
  42. 0080: 61742062 61643F29 2E0A                 at bad?)..
  43.  
  44. we invoke the Encryption with "Crypt fred 123b Myfile.txt"
  45. - The program works and overwrites the file with the new Encrypted version of the file.
  46.  
  47. After encryption ;
  48.  
  49. 0000: 43727970 742D3220 28632920 A9AEB4A9    Crypt-2 (c) ....
  50. 0010: F3FFE1F5 F4B6ADED F3F3FEB9 F2E9ADEA    ................
  51. 0020: F4F7E8B9 E8FBE0E9 F7FFADFD FAEEECB9    ................
  52. 0030: B3FBADED FEE2F9B9 FDF3E1FC B2BAEFFC    ................
  53. 0040: FDF5FFFC BBD387DC F5F9FFE0 EBEEADF0    ................
  54. 0050: EFB4ADB9 DAE9ADE0 F4EFADFA FAF4ADF6    ................
  55. 0060: F9ECE4F6 EEE9E1E0 BBE9E8FC B7BAE4ED    ................
  56. 0070: BCE9ADEB FEFBE9F8 F9F6E8B9 B3F5FF93    ................
  57. 0080: F2E9ADF4 E2BAC8F7 FCF6E4EA F3BAF9F1    ................
  58. 0090: FAEEADFB FAFEB2B0 B590                 ..........
  59.  
  60. When you want the file back to its original state, simply use the same passwords ;
  61.  
  62.     "Crypt fred 123b Myfile.txt"
  63.  
  64. If however you use the wrong passCodes, then the program will abort telling you that you're using incorrect keys to gain access.  This is done by comparing various file-stored infomation embeded within the encrypted file.
  65.  
  66. What the program can cater for ;
  67.  
  68.     * Will do all files EXE or text etc.
  69.     * Will detect write protected disk
  70.     * Will detect lack of parameters
  71.     * Will detect incorrect pass words
  72.     * Will cope with lack of memory (although not tried with meg
  73.       up grade.
  74.  
  75. Any letters/Alterations and general stuff to me at ... 
  76.  
  77. 74 Pemberton Road
  78. Winstanley
  79. Wigan
  80. WN3 6DA
  81.  
  82. or
  83.  
  84. 28 Seaton Street
  85. Middlesbrough
  86. Clevelnd
  87. TS1 3NQ