home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR4 / SECDRV12.ZIP / SECDRV.DOC < prev    next >
Text File  |  1994-01-09  |  18KB  |  351 lines

  1. SecureDrive V1.2 Documentation                                              |
  2. Edgar Swank <edgar@spectrx.saigon.com>                                      |
  3.  
  4. This release of Secure Drive is based on release 1.0, mostly
  5. written by
  6.  
  7. Mike Ingle <mikeingle@delphi.com>
  8.  
  9. The code which we wrote is not copyrighted, but the program contains GNU
  10. Copylefted code, and therefore may be freely distributed under the terms of
  11. the GNU General Public Licence. See file COPYING for legalese.
  12.  
  13. All references to MD5 refer to:
  14. RSA Data Security, Inc. MD5 Message-Digest Algorithm
  15. (C) 1990, RSA Data Security
  16.  
  17. The IDEA(tm) block cipher is covered by a patent held by ETH and a Swiss
  18. company called Ascom-Tech AG.  The Swiss patent number is PCT/CH91/00117.
  19. International patents are pending. IDEA(tm) is a trademark of Ascom-Tech AG.
  20. There is no license fee required for noncommercial use. Commercial users
  21. may obtain licensing details from:
  22. Dieter Profos, Ascom Tech AG, Solothurn Lab, Postfach 151, 4502 Solothurn,
  23. Switzerland, Tel +41 65 242885, Fax +41 65 235761.
  24.  
  25. Use this software at your own risk!
  26.  
  27. Send all comments and bug reports to <edgar@spectrx.saigon.com>.            |
  28.  
  29. Changes for version 1.2 are highlighted by "|" at the right margin.         |
  30.  
  31. Many people have sensitive or confidential data on their personal computers.
  32. Controlling access to this data can be a problem. PC's, and laptops in
  33. particular, are highly vulnerable to theft or unauthorized use. Encryption
  34. is the most secure means of protection, but is often cumbersome to use. The
  35. user must decrypt a file, work with it, encrypt it, and then wipe the
  36. plaintext. If encryption were easy, many more people would use it.
  37. SecureDrive is a step in this direction. SecureDrive automatically stores
  38. sensitive data on your DOS/Windows system in encrypted form.
  39.  
  40. SecureDrive allows you to create an encrypted partition on your hard drive.
  41. It also allows you to encrypt floppy disks. Encrypted partitions and disks
  42. become fully accessible when the TSR is loaded and the proper passphrase
  43. entered. The TSR takes only 2K of RAM. Encryption is performed at the sector
  44. level and is completely transparent to the application program. Everything
  45. on the disk or partition except the boot sector is encrypted. Encrypted
  46. floppy disks can be freely interchanged with unencrypted ones. Disks and
  47. partitions can be decrypted and returned to normal at any time.
  48.  
  49. SecureDrive uses the IDEA cipher in CFB mode for maximum data security. The
  50. MD5 hash function is used to convert the user's passphrase into a 128-bit
  51. IDEA key. The disk serial number, and track and sector numbers are used as
  52. part of the initialization to make each sector unique.
  53.  
  54. SecureDrive is made up of three program files. SECTSR is the memory-resident
  55. driver. CRYPTDSK is used to encrypt and decrypt floppy disks and hard drive
  56. partitions. LOGIN is used to unlock encrypted disks and partitions by
  57. loading the passphrase and disk parameters into the resident module.
  58.  
  59. Getting started instructions:
  60.  
  61. If you only have one hard drive partition (C:), you will have to repartition
  62. your hard drive if you want an encrypted partition. You can use encrypted
  63. floppies without changing your hard drive. You should create a partition
  64. large enough to hold all of your sensitive data. For this example, assume
  65. the partition is (D:). Put SECTSR, CRYPTDSK, and LOGIN in a directory which
  66. is in your PATH. (Not on the soon-to-be encrypted drive, of course!)
  67.  
  68. The partition can have data on it, or it can be blank. Run CRYPTDSK and
  69. select the drive letter. Enter a passphrase. CRYPTDSK will now encrypt the
  70. partition. It will skip bad sectors.
  71.  
  72. Now put in your AUTOEXEC.BAT, before the loading of any disk cache:
  73.  
  74. SECTSR
  75. LOGIN D: /S (assuming drive D:)
  76.  
  77. This will load the TSR and put it in "safe mode", preventing accidental
  78. access and damage to the encrypted drive. Reboot the system to make the
  79. changes take effect. Now type
  80.  
  81. LOGIN D: (again, assuming drive D:)
  82. and enter your passphrase. Your encrypted drive is now accessible.
  83.  
  84. To use an encrypted floppy, use CRYPTDSK to encrypt the floppy. Then run
  85. LOGIN /F
  86. and enter the passphrase. The encrypted floppy is now accessible. If you
  87. entered the wrong passphrase, access will fail with a drive not ready error.
  88.  
  89. As of Version 1.2, you may use an operand /PGP with LOGIN, either           |
  90. by itself, or with either operand above. By itself,                         |
  91.  
  92.   LOGIN /PGP                                                                |
  93.  
  94. will prompt for a passphrase and set the PGPPASS environment variable with  |
  95. whatever is entered. If PGPPASS is already set then                         |
  96.  
  97.   LOGIN D: /PGP                                                             |
  98.  
  99. or                                                                          |
  100.  
  101.   LOGIN /F /PGP                                                             |
  102.  
  103. will use whatever PGPPASS is set to as the passphrase. For the hard         |
  104. disk partition, LOGIN will test the PGPPASS passphrase. If it is incorrect, |
  105. then it will prompt you for another passphrase.                             |
  106.  
  107. If PGPPASS is NOT set when these forms of LOGIN are used, than a passphrase |
  108. is prompted for AND PGPPASS is set to this passphrase.                      |
  109.  
  110. The purpose of these changes is to allow you to enter a single passphrase   |
  111. only once per boot IF you choose to use the same passphrase for your PGP    |
  112. secret key, your SecureDrive encrypted hard disk partition, and SecureDrive |
  113. encrypted floppies.                                                         |
  114.  
  115. Detailed instructions:
  116.  
  117. Creating an encrypted floppy disk:
  118.  
  119. Insert any DOS-formatted floppy disk. The disk may contain data, or it may
  120. be blank. Run CRYPTDSK. Select the floppy drive, and enter a passphrase. You
  121. will be required to enter the passphrase twice to confirm. CRYPTDSK will now
  122. encrypt the disk.
  123.  
  124. As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
  125. ask to use the value of PGPPASS for the passphrase before prompting you.    |
  126. Obviously, if you encrypt a lot of diskettes at once, this feature can save |
  127. you a lot of typing.                                                        |
  128.  
  129. Accessing an encrypted floppy disk:
  130.  
  131. Load SECTSR, if it's not already loaded. Run LOGIN /F and enter the
  132. passphrase used to encrypt the disk. The disk is now accessible. You can
  133. swap disks at any time, as long as all of the disks are encrypted with the
  134. same passphrase. You can also access unencrypted disks; SECTSR switches on
  135. and off automatically. If you want to access a disk encrypted with a
  136. different passphrase, type LOGIN /F again and enter the new passphrase. The
  137. same passphrase applies to both floppy drives.
  138.  
  139. Decrypting a floppy disk:
  140.  
  141. Run CRYPTDSK. Select the floppy drive. CRYPTDSK will detect that the disk is
  142. encrypted, and will prompt you to decrypt it. Enter your passphrase.
  143. CRYPTDSK will now decrypt the disk.
  144.  
  145. As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
  146. try the value of PGPPASS for the passphrase before prompting you.           |
  147.  
  148. Creating an encrypted hard drive partition:
  149.  
  150. You must have more than one partition, or more than one hard drive. If you
  151. encrypt your C: drive, you will not be able to boot from it! If this
  152. happens, decrypt it again to restore it. You should create a small D:
  153. partition, large enough to store as much sensitive information as you plan
  154. to keep on your hard drive. You can also run applications from the secure
  155. partition, but there will be some speed loss. Back up your hard drive before
  156. installing. Use FDISK to repartition your drive, and set up a small D:
  157. drive, which will become your secure partition. You can copy data to it
  158. before or after encryption. Run CRYPTDSK and select the letter of the
  159. partition you want to encrypt. CRYPTDSK will display the physical drive,
  160. head, and cylinder of the boot sector of this partition. You should verify
  161. these numbers. Then enter a passphrase to encrypt the partition. This will
  162. take a few minutes, depending on the size of the partition and your CPU.
  163.  
  164. As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
  165. ask to use the value of PGPPASS for the passphrase before prompting you.    |
  166.  
  167. Preventing damage to the secure partition, which could be caused by writing
  168. to it withot first logging in:
  169.  
  170. Load SECTSR. Run LOGIN D: /S to put the drive in safe mode. This should be
  171. done in AUTOEXEC.BAT. Writes will be locked out. A drive not ready error
  172. will occur if you attempt to access the encrypted drive. This will prevent
  173. DOS programs from reading the drive. Windows behaves rather pathologically:
  174. it retries the attempt about a dozen times, and then displays garbage. If
  175. this happens, just close the window, log in, and try again. The drive is
  176. still protected against writes in Windows.
  177.  
  178. Accessing an encrypted hard drive partition:
  179.  
  180. Load SECTSR, if it's not already loaded. Run LOGIN D: where D is replaced by
  181. the letter  of the encrypted partition. Type the passphrase. Your secure
  182. partition is now accessible. Note that only one secure partition can be
  183. accessible at a time. You can have encrypted floppies and a secure partition
  184. active simultaneously, but you can't have two secure partitions. The TSR
  185. only stores two cryptographic keys: one for the secure partition, and one
  186. for encrypted floppies.
  187.  
  188. Decrypting a hard drive partition:
  189.  
  190. Reboot to clear SECTSR out of memory. Run CRYPTDSK, select the drive letter,
  191. and enter the passphrase. CRYPTDSK will decrypt your partition.
  192.  
  193. As of version 1.2, if PGPPASS is set before you run CRYPTDSK, CRYPTDSK will |
  194. try the value of PGPPASS for the passphrase before prompting you.           |
  195.  
  196. Changing a passphrase:
  197.  
  198. Decrypt the disk with the old passphrase, and re-encrypt it with the new
  199. passphrase.
  200.  
  201. Clearing keys:
  202.  
  203. Typing LOGIN /C will erase the cryptographic keys from memory and disable
  204. encryption. You may then run LOGIN again to restore access. Note that this
  205. does not erase plaintext from memory; turn the computer off to do this.
  206.  
  207. As of Version 1.2, typing LOGIN /C /PGP will clear the SecureDrive crypto   |
  208. keys from memory AND clear the PGPPASS environment variable. This is done   |
  209. in a manner less likely to leave your passphrase in memory than just using  |
  210. the DOS SET command.  In addition, Version 1.2 clears all the free memory   |
  211. it can find, which is likely to include some plaintext.  However, if you    |
  212. want to be absolutely sure all traces of sensitive data are erased from     |
  213. memory then turning off the computer is still recommended.                  |
  214.  
  215. Using a disk cache:
  216.  
  217. You can use a disk cache such as SMARTDRV.EXE or NCACHE to speed up access.
  218. The cache must be loaded after SECTSR is loaded. A .SYS cache will not work,
  219. because it is loaded before the TSR. If the cache is loaded first, it will
  220. cache ciphertext and provide little speedup. If the cache is loaded after
  221. SECTSR, it will cache plaintext and speed up access.
  222.  
  223. Hazards to avoid:
  224.  
  225. Writing to the encrypted partition or encrypted floppies without logging in.
  226. When you load the TSR and put it in safe mode, writes will be locked out.
  227. However, if you access an encrypted disk without loading the TSR, the disk
  228. can be destroyed. This happened to one of the beta testers. Use safe mode
  229. and load the TSR in AUTOEXEC to prevent it.
  230.  
  231. Forgetting your passphrase. With any lock, there is the hazard of losing the
  232. key. But cryptography is a special case because there are no locksmiths to
  233. save you. If you forget a passphrase, you're out of luck. That data is gone.
  234.  
  235. Using this program without backups.  It accesses disks at the low level of
  236. the BIOS, and a program bug or an unfriendly interaction between the TSR
  237. and an application could scramble your hard drive permanently.
  238.  
  239. Exporting this program. This program is for use in the US and Canada only.
  240. Cryptography is export controlled, and sending this program outside the
  241. country may be illegal. Don't do it.
  242.  
  243. The "author" of version 1.2, Edgar Swank, says that the export ban should   |
  244. not prevent you from placing this program on public BBS's and anonymous FTP |
  245. sites in the US and Canada. If individuals outside the US/Canada use the    |
  246. internet or international long distance to obtain copies of the program,    |
  247. THEY may be breaking US law.                                                |
  248.  
  249. Any such foreign individuals should be aware that US law enforcement may    |
  250. legally (under US law) apprehend individuals who break US laws even if such |
  251. individuals are not on or even have never been on US soil.  Such            |
  252. apprehension may remove such individuals directly to US jurisdiction        |
  253. without benefit of extradition proceedings in such individuals' home        |
  254. country(ies).  This has actually happened in at least two cases, Mexico --  |
  255. suspect in murder of US drug agent, Panama -- Noriega -- indicted in        |
  256. absencia for drug smuggling.  As is well known, after a small war with      |
  257. Panama, Noriega was brought to the USA, tried and convicted.  He is now a   |
  258. guest of the US Government in a Florida prison.                             |
  259.  
  260. Potential security problems:
  261.  
  262. Data leaks: swapfiles and temporary files. Many application programs create
  263. swapfiles and temporary files all the time. If these files are written to a
  264. non-encrypted disk, they will expose your data. This can be avoided by
  265. putting the swapfiles and temporary files on the encrypted disk, but this is
  266. slow. The best solution is to use a RAM disk or cache the encrypted disk.
  267. There are also programs such as Norton WIPEINFO which will wipe empty space.
  268.  
  269. Trojans and viruses: someone could replace LOGIN with a hacked version, or
  270. install a specially written Trojan on your system, and capture your
  271. passphrase or key. Since the key remains in memory in the TSR, any program
  272. could potentially swipe it. The only sure way to prevent this is to make
  273. sure that nobody has the opportunity to install such a Trojan.
  274.  
  275. If you have PGP, you can verify that version 1.2 executable modules         |
  276.  
  277.   CRYPTDSK.EXE                                                              |
  278.   LOGIN.EXE                                                                 |
  279.   SECTSR.COM                                                                |
  280.  
  281. have not been modified since I compiled them by checking them against       |
  282. the detached signatures included. First add my (Edgar Swank's) public key   |
  283. to your public keyring
  284.  
  285.   PGP -ka KEY.ASC                                                           |
  286.  
  287. Then issue commands                                                         |
  288.  
  289.   PGP CRYPTDSK.SIG  CRYPTDSK.EXE                                            |
  290.   PGP LOGIN.SIG     LOGIN.EXE                                               |
  291.   PGP SECTSR.SIG    SECTSR.COM                                              |
  292.  
  293. The integrity of this check depends upon that my public key is genuine. You |
  294. should satisfy yourself from the signatures on the key. Also my public key  |
  295. is available independently on various public keyservers.                    |
  296.  
  297. Passphrase guessing: if your passphrase is weak (a single word, monocase,
  298. with no punctuation is very weak) an attacker could try to guess it. This
  299. has proven highly effective against Unix login passwords. The best
  300. passphrase is a phrase which does not appear in text or literature.
  301.  
  302. How many passphrases?: The additions to version 1.2 make it easier to use a |
  303. single passphrase both for your PGP secret key and for SecureDrive hard and |
  304. floppy disks. If you do this, it's obviously putting all your eggs in one   |
  305. basket. One school of thought says its better to use several baskets, so if |
  306. one breaks you only loose some of your eggs.  The other school says it may  |
  307. be better to use one basket IF you make it the best damn basket you can and |
  308. put your best efforts into protecting it.                                   |
  309.  
  310. So if you use a single passphrase for everything, make it the best          |
  311. passphrase you can think of and REMEMBER without writing it down ANYWHERE.  |
  312. A good passphrase should be at least three or four words.  The easiest to   |
  313. remember and hardest to guess will be "outrageous" and use words that       |
  314. normally don't go together, e.g.  "red grass over yellow sky" (don't use    |
  315. this example).  Some use of profanity, foreign words, and creative spelling |
  316. and punctuation, as long as you can remember it all, will also make the     |
  317. passphrase harder to guess.                                                 |
  318.  
  319. Backups: must be encrypted. Use encrypted disks, or use an encrypting
  320. compression program such as HPACK and write the encrypted file onto the
  321. backup tape. Do not leave unencrypted disks or printouts lying around.
  322.  
  323. An alternative to HPACK is a combination of any compression program (e.g.
  324. PKZIP) and PGP. But DON'T rely on the "built-in" encryption of any
  325. compression program other than HPACK.
  326.  
  327. Source code and modifications:
  328.  
  329. SECTSR.ASM is the self-contained source for SECTSR. Use TASM and TLINK /T to
  330. assemble it.
  331.  
  332. CRYPTDSK uses SDCOMMON and CRYPT2.OBJ generated from CRYPT2.ASM. It also
  333. uses MD5.C, which is from the PGP23A source code.
  334.  
  335. LOGIN uses SDCOMMON and MD5.C.
  336.  
  337. In version 1.2, LOGIN also uses SETENV.OBJ generated from SETENV.ASM. This  |
  338. code is used to set/clear the PGPPASS environment variable. This code sets  |
  339. the enviornment variable in all copies of the environment it can find, so   |
  340. it may work in some situations where the DOS SET command does not. On the   |
  341. other hand, in some early versions of DOS, it may not find the master       |
  342. environment area. Experiment for yourself.                                  |
  343.  
  344. The programs were compiled with Turbo C++. Compile them large model.
  345.  
  346. In version 1.2 a MAKEFILE is provided.                                      |
  347.  
  348. If you make any interesting modifications or improvements, send me mail and
  349. a copy of the new code. I hope this program will become popular and will be
  350. modified and improved by the net.
  351.