home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 144.lha / crypt.doc < prev    next >
Text File  |  1986-11-21  |  1KB  |  46 lines

  1. I'm putting this on CompuServe since someone was asking about encryption
  2. programs.
  3.  
  4. Distribution is UNLIMITED - the main reason I put this together was to
  5. try the idea out for something else I am working on.
  6.  
  7.  
  8. Purpose: A simple encryption/decryption program. It is VERY
  9. unsophisticated (simply using exclusive-or together with one of C's
  10. random-number generators), but has two features: a) the same character
  11. occuring two different places in the file (even right after each other) will
  12. end up being encrypted into two different characters, and b) because of the
  13. use of exclusive-or there is no need for a separate decryption program; 
  14. if you run crypt twice with the same cryption key, you will get back what
  15. you started with. For instance:
  16.  
  17. crypt file1 file2
  18. Enter encryption/decryption key
  19. wazoo
  20.  
  21. crypt file2 file3
  22. Enter encryption/decryption key 
  23. wazoo
  24.  
  25. After the above two commands, file3 will be the same as file1.
  26.  
  27.  
  28.  
  29.  
  30. Use:
  31.     crypt infile outfile
  32.  
  33.     Where infile is the file to be encrypted or decrypted. You will be 
  34. prompted for a cryption key. It can be up to 20 characters of anything
  35. you want, but GET IT RIGHT. Case matters - Tweedle Dum is different 
  36. from TWEEDLE DUM or tweedle dum. If you give more than 20 characters, they
  37. will be truncated at 20 characters.
  38.  
  39.  
  40.  
  41.  
  42. Source:
  43.     The Lattice 4.0 source is provided in crypt.c. Due the use of mrand and
  44. srand, the math library must be provided during linking. The following
  45. command works to compile and link:
  46. lc -Lm crypt.c