Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-04 - 43,50331/dfcode.doc
There are no other files named dfcode.doc in the archive.




 



















                           DFCODE

                AUTHER:  ROBERT J.  FROHREICH

                DATE:    03-JUN-74

     WRITTEN AT STEVENS INSTITUTE OF TECH HOBKEN N. J.

dfcode - dectape file protection program            Page   2



     DFCODE IS A PDP-10 PROGRAM TO CODE OR DECODE  DECTAPE  FILES,  IN

SUCH  A  WAY  AS  TO MAKE THEM UNRECOGNIZABLE TO ANYONE BUT THE OWNER.

SINCE NORMAL MONITOR PROTECTION CAN BE BYPASSED,  AND  IS  INSTALATION

DEPENDENT, A BETTER PROTECTION SCHEME IS FREQUENTLY ADVANTAGEOUS.


     DFCODE WRITES CODED COPIES OF FILES FROM ANY "MAIN" DEVICE, TO  A

"STORAGE"  DECTAPE,  AND  WRITES  DECODED COPIES OF CODED FILES FROM A

DECTAPE TO ANY OTHER DEVICE.  ALTHOUGH THE PERIPHERAL DEVICE ON  WHICH

THE  UNCODED  FILE  RESIDES, OR IS TO RESIDE, MAY BE ANY DEVICE, IT IS

USUALLY DISK.



 * DEFINITION OF TERMS *



MAIN DEVICE - ANY  DEVICE  WHERE  THE  UNCODED  VERSION  OF  THE  FILE

RESIDES, OR WILL RESIDE WHEN IT IS DECODED.



STORAGE TAPE - ANY DECTAPE ON WHICH THE  CODED  VERSION  OF  THE  FILE

RESIDES, OR IS TO BE STORED.



CODE - THE PROCESS OF READING A FILE FROM THE MAIN DEVICE, AND WRITING

A SCRAMBLED VERSION OF IT ON THE STORAGE TAPE.



DECODE - THE PROCESS OF READING THE SCRAMBLED VERSION OF A  FILE  FROM

THE  STORAGE  TAPE,  AND  WRITING THE UNSCRAMBLED VERSION OF IT ON THE

MAIN DEVICE.

dfcode - dectape file protection program            Page   3



 * HOW TO USE DFCODE *


     AFTER THE USER HAS TYPED,

 .RUN DFCODE

THE FIRST QUESTION DFCODE WILL ASK IS,

CODE OR DECODE? (C OR D) :

THE USER SHOULD RESPOND WITH "C" IF HE WISHES TO CODE A FILE, OR A "D"

IF HE WANTS TO GET A FILE BACK (DECODED) FROM TAPE.


     DFCODE WILL THEN ASK,

NAME OF STORAGE DECTAPE DRIVE :

THE USER SHOULD TYPE IN EITHER THE PHYSICAL OR  LOGICAL  NAME  OF  THE

DECTAPE  DRIVE  ON  WHICH  HE  WANTS  THE CODED FILE TO BE WRITTEN, IF

CODING, OR ON WHICH THE CODED FILE IS, IF DECODING.


     THE NEXT QUESTION IS,

STANDARD CODE WITHOUT A PASSWORD? (Y OR CR) :

THE USER NOW HAS A CHOICE BETWEEN USING HIS OWN  PASSWORD,  OR  MAKING

USE  OF  A  BUILT  IN  "PASSWORD".  THE BUILT IN PASSWORD AFFORDS LESS

PROTECTION, BUT IT HAS THE ADVANTAGE THAT IT  CAN  NOT  BE  FORGOTTEN.

THE  USER  SHOULD  TYPE "Y" IF HE WANTS TO TAKE ADVANTAGE OF THIS, AND

CARRIAGE RETURN IF HE WISHES TO USE HIS OWN PASSWORD.

IF HE TYPES A CARRIAGE RETURN, DFCODE WILL ASK,

PASSWORD:

HE WOULD THEN TYPE IN A ONE TO SIX CHARACTER PASSWORD.   IT  WILL  NOT

ECHO.

dfcode - dectape file protection program            Page   4



 * HOW TO USE DFCODE (CONTINUED) *


     IF HE HAD TYPED A "Y" DFCODE WOULD HAVE ASKED IMMEDIATELY,

FILE NAMES :


     FILE NAMES HAVE THE FORMAT:

DEV1:FILE1.EXT<PROT>[PJ,PG],DEV2:FILE2.EXT<PROT>[PJ,PG], .......

"DEV" IS THE "MAIN" DEVICE ON WHICH THE UNCODED VERSION  OF  THE  FILE

IS, OR IS TO BE PUT.  "FILE.EXT" IS THE NAME AND EXTENTION OF THE FILE

TO BE WORKED ON.  "<PROT>" IS THE PROTECTION OF  THE  FILE  IF  IT  IS

BEING  WRITTEN  ONTO DISK.  "[PJ,PG]" IS THE PROJECT-PROGRAMMER NUMBER

OF THE FILE IF IT IS BEING READ FROM, OR BEING WRITTEN TO DISK.


     IF THE "MAIN" DEVICE IS OMITTED, DISK IS ASSUMED.  IF THE  DEVICE

IS  SPECIFIED,  IT  BECOMES  THE  DEFAULT  DEVICE  FOR ALL FILES UNTIL

ANOTHER DEVICE IS INDICATED.


     IF THE PROTECTION IS OMITTED, <177> IS ASSUMED.  IF THE  THE  PPN

IS OMITTED, DFCODE ASSUMES THE USERS OWN PPN.


     NOTE - WILDCARDS ARE NOT RECOGNIZED.


     THE DIRECTORY OF THE DECTAPE AND THE MAIN DEVICE WILL BE  OF  THE

SAME  FORMAT  AS IT WOULD HAVE BEEN IF ANY OTHER STANDARD I-O HAD BEEN

DONE.

dfcode - dectape file protection program            Page   5



 * HOW TO USE DFCODE (CONTINUED) *


     AFTER THE PROGRAM HAS FINISHED PROCESSING ALL THE FILES, IT  WILL

TYPE THE NUMBER OF DECTAPE BLOCKS IT HAS PROCESSED, AND ASK:

MORE TO DO? (Y OR CR) :

IF THE USER TYPES A "Y" DFCODE WILL RESTART ITSELF BY ASKING,

CODE OR DECODE? (C OR D) :

IF HE HAD TYPED A CARIAGE RETURN IT WOULD HAVE EXITED.

dfcode - dectape file protection program            Page   6



 * EXAMPLE *


     A RUN THAT WRITES CODED COPIES OF FOO1.BAR,  SYS:FORTRA.HLP,  AND

FOO2.MAC[123,456],  ONTO  DTA1,  WITH  A  PASSWORD  "MYCODE", AND THEN

WRITES A DECODED COPY OF FOO2.MAC ONTO  THE  USERS  DISK  AREA,  LOOKS

LIKE,

 .RUN DFCODE

 CODE OR DECODE? (C OR D) : C
 NAME OF STORAGE DECTAPE DRIVE : DTA1
 STANDARD CODE WITHOUT A PASSWORD? (Y OR CR) :
 PASSWORD: MYCODE                         ; WILL NOT ECHO
 FILE NAMES : FOO1.BAR,SYS:FORTRA.HLP,DSK:FOO2.MAC[123,456]

 TOTAL OF 96 DECTAPE BLOCKS PROCESSED

 MORE TO DO? (Y OR CR) : Y

 CODE OR DECODE? (C OR D) : D
 NAME OF STORAGE DECTAPE DRIVE : DTA1:
 STANDARD CODE WITHOUT A PASSWORD? (Y OR CR) :
 PASSWORD: MYCODE
 FILE NAMES : FOO2.MAC

 TOTAL OF 9 DECTAPE BLOCKS PROCESSED

 MORE TO DO? (Y OR CR) :

 EXIT

 .

dfcode - dectape file protection program            Page   7



TECHNICAL DATA:


     DFCODE IS A SHARABLE PROGRAM, CAPABLE OF RUNING IN ONE  (2+0)  OR

TWO  (1+1) SEGMENTS, DEPENDING ON A CONDITIONAL ASSEMBLY SWITCH "PURE"

THAT IS NOT DEFINED IF THE PROGRAM IS TO RUN IN THE HIGH SEGMENT,  AND

DEFINED TO BE 0 IF IT IS TO RUN IN THE LOW SEGMENT.


     DFCODE USES A COMBINATION OF XOR, AND ROTATION OF EACH  WORD  AND

EACH  BLOCK,  ACCORDING  TO THE PASSWORD AND A KEY WORD IN EACH BLOCK,

TOGETHER WITH A CONDITIONAL SWAP OF HALVES,  ALL  OF  WHICH  MAKE  THE

CODING OF EACH BLOCK INDEPENDENT OF THE OTHER.


     THE KEY WORD IN EACH BLOCK IS NORMALLY  THE  FIRST  WORD  IN  THE

DECTAPE  BLOCK.   IT  MAY  BE CHANGED TO THE LAST WORD IN THE BLOCK BY

REASSEMBLING DFCODE, WITH "KWORD= 1".

THAT IS,
 .R MACRO
 *DFCODE,DFCODE/C_TTY:,DSK:DFCODE.MAC
 KWORD= 1
 ^Z
 END OF PASS 1
 KWORD= 1
 ^Z


     RUN TIME APPROXIMATLY = 1.2 SEC. PER 100 DECTAPE BLOCKS.











              ****** END OF DFCODE.DOC ******