=============== **** QLOCK **** Waveland King 10/84 =============== QLOCK is a public/domain universal CP/M file encryption program, which for convenience has been divided into three programs: One (QLOCK) to lock; one (QUNLOCK) to unlock; and one (QSCAN) to read without producing a permanent copy. Encryption replaces a text file, such as a diary, letter, or other document, or the source code of a program, with an unreadable scrambled copy based on a key; this key must be known in order for the file to be unlocked, and (unlike some programs) QLOCK doesn't leave a copy of it in the encrypted file (so if you forget the key, you're out of luck!). QLOCK will also work on programs (object code), rendering them unusable until unlocked, but I use it mostly for confidential documents such as diarys and private memos and letters. QLOCK works by encrypting the contents of the file (a program, datafile, letter, or any other CP/M file) with a password you provide. The resulting file, which has the filetype .-$- (the -'s are from the source file name), appears to be pure garbage if TYPE'd to the screen, and will be unusable until reconstituted (the original file is automatically deleted from the disk after being encrypted, along with the .BAK file if any) using the ORIGINAL PASSWORD in its exact form (upper/lower case doesn't matter). This means that your file cannot be unlocked by anyone who doesn't know the password you used (unless they have a CRAY I, etc.), no matter how closely they look at the data. This is important, because there is nothing inherent in the QLOCK program or in the locked file that anyone could use to figure out your password(s). (Note that you can't lock a file with type .-$- ) QUNLOCK produces an unlocked copy (assuming the password was correct) of the file, but leaves the locked version on the disk, just in case. If you then edit and relock the unlocked version, it will update and replace the locked version. Other than this file handling, QLOCK and QUNLOCK are identical. QSCAN is used to view the file without creating a permanent copy - it works like the TYPE command, using ^S to stop/start scrolling, and you can abort the scan with ^C while the scrolling is stopped. To lock a file on B: called "ZIPZOT.TXT" with the password "Clever,aren'tI?", you would type at the prompt: A>qlock b:zipzot.txt clever,aren'ti? (and then a return) and the program would do the rest, assuming the file is really there, etc. The screen will scroll up to erase your password once you have typed it, and error messages will report any disk errors, etc. ZIPZOT.TXT will be *replaced* by the encrypted file ZIPZOT.T$T, which will be of no use to anyone until unlocked. ZIPZOT.BAK, if it exists, will be deleted. To unlock a file, it must have a filetype of .-$-, so you don't need to tell it that part. You DO need to tell it the NEW file type the file is to have. For the file above, just type: A>qunlock b:zipzot.txt clever,aren'ti? to reconstitute your file. The unlocked file will be identical to the original file (if you gave the right password!), or will be garbage (if you didn't), so check it before getting rid of the locked version. All files to be locked, in general, should have at least one character in the extension, because CP/M won't recognize commands that refer to 'ZIPZOT. $ ', which will otherwise be the encrypted version, and this can be awkward. Note that you can lock copies of the same file with different passwords for different purposes. For instance, if you wanted to send private letters to someone using a public disk, you could tell them the password you used on their letters and they could then read them. In this way you could leave letters to many different people on the same disk, each with its own password, and only the proper person could read their mail. You can also lock a file two or more times with different passwords, the result being like a safety deposit box with two keys, both of which are required for access. All available memory is used during the copy, and it is written in Z80 assembly, so it runs fast - on a hard disk a 60K file takes about 17 seconds to lock or unlock. Waveland King - 2/25/85 (619)452-3400 ================================================================