Classic Computer Magazine Archive START VOL. 2 NO. 6 / SPECIAL ISSUE #3

LOCK & KEY
FILE SECURITY COMES to YOUR ST

by JESSE DEVINE

Ever wonder how you could keep your ST files safe from prying eyes? Concerned that your floppies might fall into the wrong hands? If you share a computer at work or at home, then you need Lock & Key-START's file protection system. The programs you need to keep sensitive information private and your personal files safely hidden away are on your START disk.

You'll find the program for this article, LOCKKEY.PRG, on your START disk. The source code is in the compressed file LOCKKEY.ARC.

One of the things I always admired about TRSDOS (the operating system for Radio Shack's TRS-80 computers) was its built-in ability to use passwords. If you had a file you wanted to keep secret you simply added a password to the end of the filename. As old as that system is, and as primitive as computers were in those days, you have to give the people at Tandy credit for their built-in file security system.

Over the years, I haven't seen many other computers that have password protection built into their disk operating systems. Nevertheless, the computer users of the world have found convenient ways to protect their most sensitive files from prying eyes. On systems such as the Commodore 64, for instance, you can simply slip a control character into a filename, and no one will ever be the wiser. The file will be there, but virtually inaccessible. Unfortunately, on the Atari ST, things are not so convenient. There is neither built-in password protection nor the ability to sneak a control character into a filename, so up until now there has been no way to keep people from peeking around your personal files.

Enter The Secret Word
As a remedy for the lack of security on the ST, I devised a simple yet efficient system for limiting access to certain files. Lock & Key when provided with the correct password, will lock a folder in the root directory of a floppy disk by changing the folder's attribute from "folder" to "hidden" status. As a result, the folder does not show up in the directory and the system no longer recognizes the folder's name. Still, all the information concerning the folder's directory is left intact, and the space occupied by the folder's files is safe from being reused by the system. To unlock the folder, you supply Lock & Key with the correct password again, and the folder's attribute will be changed back to "folder."

The Lock & Key system is made up of two separate programs. The most important program, the key, locks and unlocks a folder if the right password is entered. The program you'll find on your START Disk, LOCKKEY.PRG, creates the key and customizes it. For convenience, you'll probably want to copy both LOCKKEY.PRG and LOCKKEY.DAT to a new disk before using them. (Be sure to copy both LOCKKEY.PRG and LOCKKEY.DAT, and if you put them in a folder make sure it's the same folder. When you double-click on LOCKKEY.PRG, it begins by trying to load LOCKKEY.DAT; if it can't find the file, an appropriate alert box will appear and you will return to the Desktop.)


Lock & Key
doesn't alter your
files-it simply hides
the folder they're
In.

To use Lock & Key, first copy the files you want to protect into a folder on a floppy disk. (The folder must be in the root directory- that is, not a folder-inside-a-folder) Now run LOCKKEY.PRG. The first thing you should see is the title box, after which the program will ask you for the name of the folder you wish to make a key for. Enter the name and click on OK, and the program will ask for the password you'll use to lock and unlock the folder. Enter your password - and be sure it's one you'll remember later!

After you enter the folder name and password, Lock & Key will ask you which disk drive contains the folder you wish to make a key for. (You can only choose drive A or B; Lock & Key won't work on a hard disk folder.) Once you click on the appropriate button, Lock & Key will create a file called KEY.TOS on the disk you selected.

(If a file by that name already exists, Lock & Key will ask if you want to write over the previous file. Generally unless you are changing your password, writing over a previous key is a bad move. There's no telling what you might be permanently locking yourself out of. Cancel the program, return to the desktop and find out what that key goes to. if the key belongs to an important folder, such as one containing your 1040A tax return, you might rename it 1040.TOS-any name will work as long as the file extender is TOS. If no previous key exists on the disk, a simple alert box will inform you that everything went smoothly.)

Now, return to the desktop and double-click on KEY.TOS. The screen will go blank, and the key program will ask for your password. When you enter the password, the letters you enter will appear as asterisks, so as to preserve the secrecy of your password from any onlookers. If the password is valid, the key will search for the correct folder entry toggle the attribute, and then inform you that the folder has been locked or unlocked.

Caveats
And now, some words of caution. Lock & Key is designed only for use with floppy disks. Do not attempt to make a key for a hard drive. Furthermore, the folder you specify must be in the root directory, or the key you install will do absolutely nothing. You may store the installer program and its data file anywhere you like, but the key program will automatically be put in the root directory of the drive you select. Do not move the key to a hard drive after it has been placed on a floppy.

As with any security system, there's always a way in. Lock & Key is no exception to this rule. For instance, someone who is really determined to get at your files and has a sector editor and a good technical understanding of the ST's disk architecture might have a chance at breaking into your hidden folder. Not wanting to say anything that would weaken my own system, the less I say about disk architecture the better.

There's another potential hole in the fence: an evildoer who knows the name of the hidden folder can make a new key complete with new password, and then simply unlock the folder. If this nasty soul deletes your key you could be locked out of your own files! For this reason, I suggest you keep the names of your hidden folders a matter of utmost secrecy.

On the brighter side, the determined snoop is not likely to find the name of the folder or the password by simply listing or examining the key program. Even though they are contained in the key both the folder name and password are scrambled.


Since
the first PCs,
users have found
ways to protect their
sensitive
files.

If you are interested in examining the source code to this program or learning about how it works, read the files BREAKDWN.TXT, LOCKKEY.C and KEY.A68; they're in the archive file LOCKKEY.ARC on your START Disk. (Refer to the disk instructions page if you are unsure about how to unarc a file.)

Safe At Last
If you've ever been concerned about file security now you can rest easy. With a few simple mouse clicks, all your private files will be carefully stored under lock and key.

If you'd like to see more articles like this, circle 203 on the Reader Service Card.

Jesse Devine is studying Computer Science at the University of Texas at Arlington. He became interested in computers when he was twelve, and turned to Atari after his Commodore 64 was stolen.