
                         Scram 1.2  03-AUG-92
                         ====================

Notice
======

"Scram"  is  copywrite  1991  by  Bill J.  Phillips.  It may be freely
distributed   as   long   as   the  "Scram12.doc"  documentation  file
accompany's  the  program.   I  claim no responsibility for the use or
implementation of "Scram."

Scram12.lha
===========

scram        - the executable
Scram12.doc  - documentation (what you're reading now)
ScrmDMII.doc - how to use with DiskMaster II


Description
===========

"Scram" is a program which reads in an ASCII file and outputs the same
file  in  a  scrambled (or encrypted ) form.  Scram uses a proprietary
algorhythm together with a user input password to render the text file
unreadable.   By  using  the same password, Scram can then read in the
scrambled (encrypted) text file and output the original (de-scrambled)
text  file.   Scram  affects only printable ASCII characters in a file
and  will  not  alter  tabs,  line-feeds,  etc.   or  binary  (8  bit)
characters.

The MAIN POINT:  ASCII in = ASCII out   (pure text in = pure text out)

A scrambled text file appears in the same format as the original input
file.   However there is a five character header of "QZSZQ" or "QZLZQ"
added to the beginning of the file and a five character footer "QZFZQ"
added at the end of the file.  There is also a "dummy" character added
as  the  first character in each line.  These features are implemented
for  on-line  use.  The dummy characters are upper case A - Z and will
repeat  if  there  are more  than 26 lines in the file.  When doing an
ASCII-send  the  dummy  character  assures that the first character in
each  line  is an alpha character and not a period or back-slash which
some  mail systems interpret as a command.  If a text file is captured
on-line  then the scrambled text may be imbedded in a large text file.
Scram  will search though the file until it finds the header.  It will
then  start  to de-scramble the text and continue until it reaches the
footer.   Only  the de-scrambled text will be sent to the output file.
If  the  header  is  not  found  a message will print this fact to the
screen  and  the  program  will  end.   If the header is found but the
footer is not found the de-scramble will work just fine but additional
text, if present, will also be sent to the output file.



Modes
=====

There  are  two scramble modes:  Standard (S) mode, and Line (L) mode.
In Standard mode the whole file must remain intact to be de-scrambled.
If a character is missing or added then the file will fail to properly
de-scramble  from that point on.  In Line mode each line is separately
scrambled.   So  a  discrepancy  in  one  line  will  only  affect the
de-scramble  of  that  line,  and  other  lines  may still de-scramble
properly.   The  header  for standard mode is "QZSZQ".  The header for
line mode is "QZLZQ".  When de-scrambling, the program detects the "S"
or  "L"  in the header to automatically de-scramble in the right mode.
Hence,  only  one  de-scramble switch.  When doing on-line ASCII-sends
where  a  character may be lost now and then, it is recommended to use
Line  mode  and  that  the  text file consist of lines of less then 79
characters.   This  is so lines do not wrap around.  Either mode will,
however, scramble any size text file with lines of any length.  And as
long  as  the  scrambled  file  remains  in  tact  it  can then be de-
scrambled successfuly with the orignal password.


Be Aware
========

I've used Scram on 100K textfiles that included some lines with 130 or
more characters, no problem - unless the scrambled textfile with these
130 character lines gets "wrapped" at 80 columns (by some word proc or
text  editor  or  E-mail system) at which point an extra line is added
without and extra "dummy" char at the beginning which can throw things
off at that point.  Just be aware.


Usage
=====

The password is not case sensitive.  That is, the password "DINGLE" is
the same as "dingle".  The program format is:

scram <s,l,d> <password> <input_file> <output_file>

     s or S = standard scramble
     l or L = line mode scramble
     d or D = de-scramble
   password = 5 to 15 alpha chars, case insensitive
 input_file = any standard file name, may include path
output_file = any standard file name, may include path


Typing: "scram" with no parameters (or less than 4) will produce
                the above usage template at the command line.


Example
=======

text file: "message.doc"    password: "killroy"
-----------------------------------------------

scram s killroy message.doc note.doc     (scrambles file)

scram l killroy message.doc note.doc     (scrambles file in line mode)


scram d killroy note.doc letter.doc      (de-scrambles either mode)


History
=======

06-AUG-92 - 1.2 - UNIX version, asks for password after it's run as
                  requested by Kenton Phillips, System Mgr at M.I.T

05-AUG-92 - 1.2 - MSDOS version compiled on Amiga 3000 running PC-TASK
                  v1.11 MSDOS emulator and C Ware Personal C v1.2c

03-AUG-92 - 1.2 - Added footer to signal end of scrambled text
                  Made Amiga & MSDOS versions compatable (Amiga v1.1 
                  will not work with MSDOS v1.2 scrambled files)

09-DEC-91 - 1.1 - 1st MSDOS version compiled on 286 machine, Turbo C++
                  (Thanks Robert Kirchhof, Deland, FL)

06-DEC-91 - 1.1 - Added line-mode option, (1st release version)
                  This source also compiles and runs on Sun SPARC

11-NOV-91 - 1.0 - Amiga only, compiled with SAS C 5.1 on Amiga 3000
                  (this version not released)
                        


Notes For Advanced (Fun) Use
============================

(1)  Files  that  have  been encoded with UUENCODE are perfect for use
with Scram.  A UUENCODE'd file is a pure ASCII file that is a block of
text  where  each  line is 60 characters.  Try using Scram with either
the  <S> or the <L> mode switch.  The file will then become a block of
text  that  has  61 charcaters in each line - perfect for sending over
E-mail  systems.   (UUENCODE  turns a binary file into ASCII, UUDECODE
gets back the original binary file.  Common on Amigas, UNIX, etc.)

(2) Once a textfile has been scrambled using an appropriot password it
can  then  be scrambled again using another password.  In other words,
you'll have a texfile that has been scrambled twice, each time using a
different  password.   The  original file can then only be obtained by
de-scrambling  the  double-scrambled textfile twice using the same two
passwords  in  reverse order.  Now you could send the double-scrambled
textfile to two different people and give each one of them only one of
the  two passwords needed to de-scramble the textfile.  Neither one of
the  two  people  will  be  able  to  read the textfile until they get
together and exchange passwords.  Neato!  Of course you could scramble
a  textfile  three or four times using a different password each time;
then get the original textfile back by de-srambling the final textfile
using the the same passwords in reverse order.  Go ahead, experiment.


                 ============================
                       Bill Jay Phillips       
                        9305 N. Oakleaf        
                        Tampa, FL 33612        
                 ----------------------------
                     Genie: B.Phillips.13      
                 USENET: tbag!jayson@tscs.com
                 ============================
