- Created on Thursday, 13 June 2002 00:00
Here is the problem. Your e-mail to a friend is consistently rejected; his employer's corporate mail server takes offense at some of the words or phrases you use. Or, you or your friend merely suspect that corporate goons in some IT department are looking at private and personal e-mail that they have no business whatsoever to poke their dirty noses into.
Unfortunately, you cannot get your friend use PGP; the same corporate goons are threatening your friend with the death penalty if he but mentions the name. You also cannot send your friend any executable code, because it is filtered by their Orwellian mail server.
What do you do?
One solution is to get your friend to write a simple encrpyption program himself.
What, your friend is not a programmer? Guess what; it is not a problem, really. The tools are probably there on his machine; and the program in question consists of only 30 machine language instructions. Just get your friend to pay attention while entering the code, and you will be able to communicate in private in no time!
Needless to say, this encryption method isn't particularly strong; it can be easily broken by anyone with mediocre programming skills. So do not use it to transmit national security secrets please! What it is good for is to defeat moronic corporate mail servers that dumbly filter mail based on keywords; it also deters the casual eavesdropper.
Oh, I think I ought to mention that apparently in some countries, even such a simple encryption method may be illegal to develop, use, or distribute. Please be sure that you do not violate the laws of the country you live in. I happen to live in Canada, where (for the time being anyway) it is within my rights to develop, and publish, such a simple encryption program.
So here are the instructions that both you and your friend must follow, in order to create your respective copies of ENCRYPT.COM:
1. Open a DOS window and, using the CD command, move to a directory where you want to place this program.
2. Enter the DEBUG command. If this doesn't work, you're out of luck. If it does work, DEBUG will respond with a minus sign.
3. Enter the A command. DEBUG will reply as follows:
where nnnn is a four-digit number (its value is irrelevant.)
Do NOT hit ENTER here. The cursor must be blinking to the right of the 0100, not in the next line.
4. Now enter, typing accurately, the following thirty machine language instructions:
MOV BX,0000 MOV CX,0001 MOV DX,0142 MOV AH,3F INT 21 JB 0140 OR AX,AX JZ 0140 MOV AL, CMP AL,1A JZ 0140 CMP AL,41 JL 0138 CMP AL,5A JLE 012A CMP AL,61 JL 0138 CMP AL,7A JG 0138 MOV BL,AL MOV AX,1F1B AND AH,BL SUB AL,AH AND BL,E0 OR AL,BL MOV DL,AL MOV AH,02 INT 21 JMP 0100 INT 20
If you were successful, this is what you see at this point:
5. Hit ENTER and the minus sign will reappear. Now enter this command:
To this, the machine responds:
CX 0000 :
6. Right next to the colon, enter this:
The machine will respond with the minus sign.
7. Now enter this:
N ENCRYPT.COM W
To this, if all went well, you get the following reply:
Writing 00042 bytes
8. Now enter the Q command, in response to which, if all went well, you'll get back the DOS command prompt. In the directory, you must now be able to see a file 66 bytes in length, ENCRYPT.COM.
9. Using this command, you can now encrypt an arbitrary text file. For instance:
ENCRYPT <original.txt >cypher.txt
If you run the program again, you'll receive your original file back:
ENCRYPT <cypher.txt >originl2.txt
10. You can now use the FC command to verify that this command works correctly:
FC original.txt originl2.txt
If all went well, FC will reply:
FC: no differences encountered
To make things a bit clearer, here is an actual transcript of a DOS session, with all commands entered by you or your friend shown in highlighted form:
C:\WINDOWS>CD \ C:\>MD TEMPDIR C:\>CD TEMPDIR C:\TEMPDIR>DEBUG -A 15ED:0100 MOV BX,0000 15ED:0103 MOV CX,0001 15ED:0106 MOV DX,0142 15ED:0109 MOV AH,3F 15ED:010B INT 21 15ED:010D JB 0140 15ED:010F OR AX,AX 15ED:0111 JZ 0140 15ED:0113 MOV AL, 15ED:0116 CMP AL,1A 15ED:0118 JZ 0140 15ED:011A CMP AL,41 15ED:011C JL 0138 15ED:011E CMP AL,5A 15ED:0120 JLE 012A 15ED:0122 CMP AL,61 15ED:0124 JL 0138 15ED:0126 CMP AL,7A 15ED:0128 JG 0138 15ED:012A MOV BL,AL 15ED:012C MOV AX,1F1B 15ED:012F AND AH,BL 15ED:0131 SUB AL,AH 15ED:0133 AND BL,E0 15ED:0136 OR AL,BL 15ED:0138 MOV DL,AL 15ED:013A MOV AH,02 15ED:013C INT 21 15ED:013E JMP 0100 15ED:0140 INT 20 15ED:0142 -R CX CX 0000 :42 -N ENCRYPT.COM -W Writing 00042 bytes -Q C:\TEMPDIR>COPY CON ORIGINAL.TXT This is a test file. Its end is marked when you hit Control-Z.
^Z 1 file(s) copied. C:\TEMPDIR>ENCRYPT <ORIGINAL.TXT >CYPHER.TXT C:\TEMPDIR>TYPE CYPHER.TXT Gsrh rh z gvhg urov. Rgh vmw rh nzipvw dsvm blf srg Xlmgilo-A. C:\TEMPDIR>ENCRYPT <CYPHER.TXT >ORIGINL2.TXT C:\TEMPDIR>TYPE ORIGINL2.TXT This is a test file. Its end is marked when you hit Control-Z. C:\TEMPDIR>FC ORIGINAL.TXT ORIGINL2.TXT FC: no differences encountered C:\TEMPDIR>
As this transcript demonstrates, the encrypted text will be in the form of printable characters. Which means that it can be easily included in e-mail messages you send, and will be reliably transmitted to the recipient who can then decrypt it with his or her copy of ENCRYPT.COM.