home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR4
/
SECDRV12.ZIP
/
SECDRV.DOC
< prev
next >
Wrap
Text File
|
1994-01-09
|
18KB
|
351 lines
SecureDrive V1.2 Documentation |
Edgar Swank <edgar@spectrx.saigon.com> |
This release of Secure Drive is based on release 1.0, mostly
written by
Mike Ingle <mikeingle@delphi.com>
The code which we wrote is not copyrighted, but the program contains GNU
Copylefted code, and therefore may be freely distributed under the terms of
the GNU General Public Licence. See file COPYING for legalese.
All references to MD5 refer to:
RSA Data Security, Inc. MD5 Message-Digest Algorithm
(C) 1990, RSA Data Security
The IDEA(tm) block cipher is covered by a patent held by ETH and a Swiss
company called Ascom-Tech AG. The Swiss patent number is PCT/CH91/00117.
International patents are pending. IDEA(tm) is a trademark of Ascom-Tech AG.
There is no license fee required for noncommercial use. Commercial users
may obtain licensing details from:
Dieter Profos, Ascom Tech AG, Solothurn Lab, Postfach 151, 4502 Solothurn,
Switzerland, Tel +41 65 242885, Fax +41 65 235761.
Use this software at your own risk!
Send all comments and bug reports to <edgar@spectrx.saigon.com>. |
Changes for version 1.2 are highlighted by "|" at the right margin. |
Many people have sensitive or confidential data on their personal computers.
Controlling access to this data can be a problem. PC's, and laptops in
particular, are highly vulnerable to theft or unauthorized use. Encryption
is the most secure means of protection, but is often cumbersome to use. The
user must decrypt a file, work with it, encrypt it, and then wipe the
plaintext. If encryption were easy, many more people would use it.
SecureDrive is a step in this direction. SecureDrive automatically stores
sensitive data on your DOS/Windows system in encrypted form.
SecureDrive allows you to create an encrypted partition on your hard drive.
It also allows you to encrypt floppy disks. Encrypted partitions and disks
become fully accessible when the TSR is loaded and the proper passphrase
entered. The TSR takes only 2K of RAM. Encryption is performed at the sector
level and is completely transparent to the application program. Everything
on the disk or partition except the boot sector is encrypted. Encrypted
floppy disks can be freely interchanged with unencrypted ones. Disks and
partitions can be decrypted and returned to normal at any time.
SecureDrive uses the IDEA cipher in CFB mode for maximum data security. The
MD5 hash function is used to convert the user's passphrase into a 128-bit
IDEA key. The disk serial number, and track and sector numbers are used as
part of the initialization to make each sector unique.
SecureDrive is made up of three program files. SECTSR is the memory-resident
driver. CRYPTDSK is used to encrypt and decrypt floppy disks and hard drive
partitions. LOGIN is used to unlock encrypted disks and partitions by
loading the passphrase and disk parameters into the resident module.
Getting started instructions:
If you only have one hard drive partition (C:), you will have to repartition
your hard drive if you want an encrypted partition. You can use encrypted
floppies without changing your hard drive. You should create a partition
large enough to hold all of your sensitive data. For this example, assume
the partition is (D:). Put SECTSR, CRYPTDSK, and LOGIN in a directory which
is in your PATH. (Not on the soon-to-be encrypted drive, of course!)
The partition can have data on it, or it can be blank. Run CRYPTDSK and
select the drive letter. Enter a passphrase. CRYPTDSK will now encrypt the
partition. It will skip bad sectors.
Now put in your AUTOEXEC.BAT, before the loading of any disk cache:
SECTSR
LOGIN D: /S (assuming drive D:)
This will load the TSR and put it in "safe mode", preventing accidental
access and damage to the encrypted drive. Reboot the system to make the
changes take effect. Now type
LOGIN D: (again, assuming drive D:)
and enter your passphrase. Your encrypted drive is now accessible.
To use an encrypted floppy, use CRYPTDSK to encrypt the floppy. Then run
LOGIN /F
and enter the passphrase. The encrypted floppy is now accessible. If you
entered the wrong passphrase, access will fail with a drive not ready error.
As of Version 1.2, you may use an operand /PGP with LOGIN, either |
by itself, or with either operand above. By itself, |
LOGIN /PGP |
will prompt for a passphrase and set the PGPPASS environment variable with |
whatever is entered. If PGPPASS is already set then |
LOGIN D: /PGP |
or |
LOGIN /F /PGP |
will use whatever PGPPASS is set to as the passphrase. For the hard |
disk partition, LOGIN will test the PGPPASS passphrase. If it is incorrect, |
then it will prompt you for another passphrase. |
If PGPPASS is NOT set when these forms of LOGIN are used, than a passphrase |
is prompted for AND PGPPASS is set to this passphrase. |
The purpose of these changes is to allow you to enter a single passphrase |
only once per boot IF you choose to use the same passphrase for your PGP |
secret key, your SecureDrive encrypted hard disk partition, and SecureDrive |
encrypted floppies. |
Detailed instructions:
Creating an encrypted floppy disk:
Insert any DOS-formatted floppy disk. The disk may contain data, or it may
be blank. Run CRYPTDSK. Select the floppy drive, and enter a passphrase. You
will be required to enter the passphrase twice to confirm. CRYPTDSK will now
encrypt the disk.
As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
ask to use the value of PGPPASS for the passphrase before prompting you. |
Obviously, if you encrypt a lot of diskettes at once, this feature can save |
you a lot of typing. |
Accessing an encrypted floppy disk:
Load SECTSR, if it's not already loaded. Run LOGIN /F and enter the
passphrase used to encrypt the disk. The disk is now accessible. You can
swap disks at any time, as long as all of the disks are encrypted with the
same passphrase. You can also access unencrypted disks; SECTSR switches on
and off automatically. If you want to access a disk encrypted with a
different passphrase, type LOGIN /F again and enter the new passphrase. The
same passphrase applies to both floppy drives.
Decrypting a floppy disk:
Run CRYPTDSK. Select the floppy drive. CRYPTDSK will detect that the disk is
encrypted, and will prompt you to decrypt it. Enter your passphrase.
CRYPTDSK will now decrypt the disk.
As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
try the value of PGPPASS for the passphrase before prompting you. |
Creating an encrypted hard drive partition:
You must have more than one partition, or more than one hard drive. If you
encrypt your C: drive, you will not be able to boot from it! If this
happens, decrypt it again to restore it. You should create a small D:
partition, large enough to store as much sensitive information as you plan
to keep on your hard drive. You can also run applications from the secure
partition, but there will be some speed loss. Back up your hard drive before
installing. Use FDISK to repartition your drive, and set up a small D:
drive, which will become your secure partition. You can copy data to it
before or after encryption. Run CRYPTDSK and select the letter of the
partition you want to encrypt. CRYPTDSK will display the physical drive,
head, and cylinder of the boot sector of this partition. You should verify
these numbers. Then enter a passphrase to encrypt the partition. This will
take a few minutes, depending on the size of the partition and your CPU.
As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
ask to use the value of PGPPASS for the passphrase before prompting you. |
Preventing damage to the secure partition, which could be caused by writing
to it withot first logging in:
Load SECTSR. Run LOGIN D: /S to put the drive in safe mode. This should be
done in AUTOEXEC.BAT. Writes will be locked out. A drive not ready error
will occur if you attempt to access the encrypted drive. This will prevent
DOS programs from reading the drive. Windows behaves rather pathologically:
it retries the attempt about a dozen times, and then displays garbage. If
this happens, just close the window, log in, and try again. The drive is
still protected against writes in Windows.
Accessing an encrypted hard drive partition:
Load SECTSR, if it's not already loaded. Run LOGIN D: where D is replaced by
the letter of the encrypted partition. Type the passphrase. Your secure
partition is now accessible. Note that only one secure partition can be
accessible at a time. You can have encrypted floppies and a secure partition
active simultaneously, but you can't have two secure partitions. The TSR
only stores two cryptographic keys: one for the secure partition, and one
for encrypted floppies.
Decrypting a hard drive partition:
Reboot to clear SECTSR out of memory. Run CRYPTDSK, select the drive letter,
and enter the passphrase. CRYPTDSK will decrypt your partition.
As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
try the value of PGPPASS for the passphrase before prompting you. |
Changing a passphrase:
Decrypt the disk with the old passphrase, and re-encrypt it with the new
passphrase.
Clearing keys:
Typing LOGIN /C will erase the cryptographic keys from memory and disable
encryption. You may then run LOGIN again to restore access. Note that this
does not erase plaintext from memory; turn the computer off to do this.
As of Version 1.2, typing LOGIN /C /PGP will clear the SecureDrive crypto |
keys from memory AND clear the PGPPASS environment variable. This is done |
in a manner less likely to leave your passphrase in memory than just using |
the DOS SET command. In addition, Version 1.2 clears all the free memory |
it can find, which is likely to include some plaintext. However, if you |
want to be absolutely sure all traces of sensitive data are erased from |
memory then turning off the computer is still recommended. |
Using a disk cache:
You can use a disk cache such as SMARTDRV.EXE or NCACHE to speed up access.
The cache must be loaded after SECTSR is loaded. A .SYS cache will not work,
because it is loaded before the TSR. If the cache is loaded first, it will
cache ciphertext and provide little speedup. If the cache is loaded after
SECTSR, it will cache plaintext and speed up access.
Hazards to avoid:
Writing to the encrypted partition or encrypted floppies without logging in.
When you load the TSR and put it in safe mode, writes will be locked out.
However, if you access an encrypted disk without loading the TSR, the disk
can be destroyed. This happened to one of the beta testers. Use safe mode
and load the TSR in AUTOEXEC to prevent it.
Forgetting your passphrase. With any lock, there is the hazard of losing the
key. But cryptography is a special case because there are no locksmiths to
save you. If you forget a passphrase, you're out of luck. That data is gone.
Using this program without backups. It accesses disks at the low level of
the BIOS, and a program bug or an unfriendly interaction between the TSR
and an application could scramble your hard drive permanently.
Exporting this program. This program is for use in the US and Canada only.
Cryptography is export controlled, and sending this program outside the
country may be illegal. Don't do it.
The "author" of version 1.2, Edgar Swank, says that the export ban should |
not prevent you from placing this program on public BBS's and anonymous FTP |
sites in the US and Canada. If individuals outside the US/Canada use the |
internet or international long distance to obtain copies of the program, |
THEY may be breaking US law. |
Any such foreign individuals should be aware that US law enforcement may |
legally (under US law) apprehend individuals who break US laws even if such |
individuals are not on or even have never been on US soil. Such |
apprehension may remove such individuals directly to US jurisdiction |
without benefit of extradition proceedings in such individuals' home |
country(ies). This has actually happened in at least two cases, Mexico -- |
suspect in murder of US drug agent, Panama -- Noriega -- indicted in |
absencia for drug smuggling. As is well known, after a small war with |
Panama, Noriega was brought to the USA, tried and convicted. He is now a |
guest of the US Government in a Florida prison. |
Potential security problems:
Data leaks: swapfiles and temporary files. Many application programs create
swapfiles and temporary files all the time. If these files are written to a
non-encrypted disk, they will expose your data. This can be avoided by
putting the swapfiles and temporary files on the encrypted disk, but this is
slow. The best solution is to use a RAM disk or cache the encrypted disk.
There are also programs such as Norton WIPEINFO which will wipe empty space.
Trojans and viruses: someone could replace LOGIN with a hacked version, or
install a specially written Trojan on your system, and capture your
passphrase or key. Since the key remains in memory in the TSR, any program
could potentially swipe it. The only sure way to prevent this is to make
sure that nobody has the opportunity to install such a Trojan.
If you have PGP, you can verify that version 1.2 executable modules |
CRYPTDSK.EXE |
LOGIN.EXE |
SECTSR.COM |
have not been modified since I compiled them by checking them against |
the detached signatures included. First add my (Edgar Swank's) public key |
to your public keyring
PGP -ka KEY.ASC |
Then issue commands |
PGP CRYPTDSK.SIG CRYPTDSK.EXE |
PGP LOGIN.SIG LOGIN.EXE |
PGP SECTSR.SIG SECTSR.COM |
The integrity of this check depends upon that my public key is genuine. You |
should satisfy yourself from the signatures on the key. Also my public key |
is available independently on various public keyservers. |
Passphrase guessing: if your passphrase is weak (a single word, monocase,
with no punctuation is very weak) an attacker could try to guess it. This
has proven highly effective against Unix login passwords. The best
passphrase is a phrase which does not appear in text or literature.
How many passphrases?: The additions to version 1.2 make it easier to use a |
single passphrase both for your PGP secret key and for SecureDrive hard and |
floppy disks. If you do this, it's obviously putting all your eggs in one |
basket. One school of thought says its better to use several baskets, so if |
one breaks you only loose some of your eggs. The other school says it may |
be better to use one basket IF you make it the best damn basket you can and |
put your best efforts into protecting it. |
So if you use a single passphrase for everything, make it the best |
passphrase you can think of and REMEMBER without writing it down ANYWHERE. |
A good passphrase should be at least three or four words. The easiest to |
remember and hardest to guess will be "outrageous" and use words that |
normally don't go together, e.g. "red grass over yellow sky" (don't use |
this example). Some use of profanity, foreign words, and creative spelling |
and punctuation, as long as you can remember it all, will also make the |
passphrase harder to guess. |
Backups: must be encrypted. Use encrypted disks, or use an encrypting
compression program such as HPACK and write the encrypted file onto the
backup tape. Do not leave unencrypted disks or printouts lying around.
An alternative to HPACK is a combination of any compression program (e.g.
PKZIP) and PGP. But DON'T rely on the "built-in" encryption of any
compression program other than HPACK.
Source code and modifications:
SECTSR.ASM is the self-contained source for SECTSR. Use TASM and TLINK /T to
assemble it.
CRYPTDSK uses SDCOMMON and CRYPT2.OBJ generated from CRYPT2.ASM. It also
uses MD5.C, which is from the PGP23A source code.
LOGIN uses SDCOMMON and MD5.C.
In version 1.2, LOGIN also uses SETENV.OBJ generated from SETENV.ASM. This |
code is used to set/clear the PGPPASS environment variable. This code sets |
the enviornment variable in all copies of the environment it can find, so |
it may work in some situations where the DOS SET command does not. On the |
other hand, in some early versions of DOS, it may not find the master |
environment area. Experiment for yourself. |
The programs were compiled with Turbo C++. Compile them large model.
In version 1.2 a MAKEFILE is provided. |
If you make any interesting modifications or improvements, send me mail and
a copy of the new code. I hope this program will become popular and will be
modified and improved by the net.