home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / sci / crypt / 5949 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.3 KB

  1. Path: sparky!uunet!ogicse!qiclab!leonard
  2. From: leonard@qiclab.scn.rain.com (Leonard Erickson)
  3. Newsgroups: sci.crypt
  4. Subject: Re: GWBASIC Encryption
  5. Message-ID: <1992Dec19.121958.13079@qiclab.scn.rain.com>
  6. Date: 19 Dec 92 12:19:58 GMT
  7. Article-I.D.: qiclab.1992Dec19.121958.13079
  8. References: <1992Dec8.022439.24913@newton.ccs.tuns.ca> <1992Dec8.210812.14420@leland.Stanford.EDU> <1992Dec9.160113.6099@newton.ccs.tuns.ca>
  9. Reply-To: Leonard.Erickson@f51.n105.z1.fidonet.org
  10. Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
  11. Lines: 45
  12.  
  13. frasertw@newton.ccs.tuns.ca (Terrance W Fraser) writes:
  14.  
  15. >kocherp@leland.Stanford.EDU (Paul Carl Kocher) writes:
  16.  
  17. >>In article <1992Dec8.022439.24913@newton.ccs.tuns.ca> frasertw@newton.ccs.tuns.ca (Terrance W Fraser) writes:
  18. >>>Does anyone know what GWBASIC for msdos uses to 'encrypt' a program
  19.  
  20. >>It's a substitution cipher with period 143, probably meaning that there
  21. >>is an 11-byte key and a 13-byte key that get xored/added/etc in some
  22. >>combintation, though after a ten-minute look at it wasn't immediately
  23. >>obvious what steps were used.  It also looks possible that the plaintext
  24. >>might be multiplied by an odd number as part of the encryption.
  25.  
  26. >I played with it for a while. Your right about the 143 byte period. It
  27. >appears that
  28. >  1) each byte gets encypted separately.
  29. >  2) it's not self-reversing.
  30. >  3) the substitution table changes from byte to byte but repeats
  31. >     every 143 bytes.
  32. >Probably the easiest thing to do is find the code that does it, but
  33. >BASIC is a *big* program.
  34.  
  35. >Anyone know of one of those PC books that goes into this?
  36.  
  37. The "back door" approach is *much* faster. You create a short binary file.
  38. (I'd have to look up the exact contents, but it's something like 3 bytes
  39. long). You name it UNPROT.BAS.
  40.  
  41. Then you load *any* "protected" BASIC file. It won't be LISTable nor can you
  42. SAVE it. 
  43.  
  44. Now load UNPROT.BAS. 
  45.  
  46. Voila! You can now LIST the file, or SAVE it or whatever.
  47.  
  48. UNPROT is the "header" for an *unprotected* BASIC program. But there's
  49. no program attached. BASIC cheerfully loads it into RAM over the header
  50. for the current program....
  51.  
  52.  
  53. -- 
  54. Leonard Erickson              leonard@qiclab.scn.rain.com
  55. CIS: [70465,203]             70465.203@compuserve.com
  56. FIDO:   1:105/51     Leonard.Erickson@f51.n105.z1.fidonet.org
  57. (The CIS & Fido addresses are preferred)
  58.