home *** CD-ROM | disk | FTP | other *** search
/ CD-X 1 / cdx_01.iso / shareuti / secdev13 / secdev.doc < prev    next >
Encoding:
Text File  |  1994-05-02  |  18.8 KB  |  520 lines

  1. SECUREDEVICE VERSION 1.3
  2. Copyright (C) 1994 by Max Loewenthal and Arthur Helwig - see chapter 6
  3. May 1st 1994
  4.  
  5. 1. WHAT IS IT?
  6.  
  7. 2. HOW DO I USE IT?
  8.    2.1  GETTING STARTED - CREATING A VOLUME
  9.    2.2  LOGGING IN TO VOLUMES
  10.    2.3  LOGGING OUT
  11.    2.4  HOW DO I BACKUP MY FILES?
  12.    2.5  CAUTION WITH DISK-UNFRAGMENTERS!
  13.    2.6  UNFRAGMENTING VOLUMES
  14.    2.7  MULTITASKERS - Windows and DesqView/X
  15.    2.8  STACKER SUPPORT
  16.    2.9  MS-DOS SMARTDrive QUIRKS
  17.  
  18. 3. FEATURES
  19.    3.1  AUTO CLOSE AFTER TIMEOUT
  20.    3.2  HOTKEY CLOSE
  21.    3.3  MODIFYING SDTSR-COLORS
  22.  
  23. 4. REFERENCE - command-line parameters, usage etc.
  24.    4.1  MKVOLUME.COM
  25.    4.2  SECDEV.SYS
  26.    4.3  SDTSR.COM
  27.    4.4  LOGIN.COM
  28.    4.5  LOGOUT.COM
  29.  
  30. 5. SECURITY
  31.  
  32. 6. LEGAL STUFF
  33.    6.1 COPYRIGHT
  34.    6.2 COPYING
  35.    6.3 WARRANTY
  36.    6.4 CREDITS
  37.        6.4.1 IDEA
  38.        6.4.2 MD5
  39.        6.4.3 SECUREDRIVE
  40.        6.4.4 Microsoft, DesqView/X and Stacker
  41.  
  42. 7. CONTACTING THE AUTHORS
  43.  
  44. 1. WHAT IS IT?
  45.  
  46. SecureDevice is a device-driver that will help you keep your private data
  47. private. It creates 'extra drives' on your system that are accessible
  48. just like normal disk drives, but everything you transfer to the volume
  49. will be encrypted using the IDEA encryption algorithm, and when you
  50. transfer data from the volume it will be automatically decrypted. The
  51. encryption/decryption mechanism is transparant to DOS and other
  52. application programs.
  53.  
  54. 2. HOW DO I USE IT?
  55.  
  56. 2.1 GETTING STARTED - CREATING A VOLUME
  57.  
  58. First, you must create a file containing the data for your new drive. To
  59. do this, first run MKVOLUME <filename> <size>. Instead of <filename>,
  60. you type the name of the file that you want to use to store your data
  61. in. For <size>, type the size (in bytes) of the file. Alternatively, you
  62. could type the word 'ALL' (without the quotes) instead of the size -
  63. this will automatically use all available space on the drive. The size
  64. will be rounded down to the nearest sector (512-byte) boundary. After
  65. creating the boot sector, the FATs and the rootdirectory, whatever
  66. number of bytes remains will be available to you on the
  67. new-to-be-created drive.
  68.  
  69. NOTES: - The file must be located in the root-directory of the drive
  70.        - If the file is fragmented by DOS in more than 50 non-contiguous
  71.          areas, you will get a 'General Failure'-error when you try to
  72.          access the volume. Refer to 'UNFRAGMENTING VOLUMES' to solve
  73.          this problem
  74.        - You can create volumes on your hard disk as well as on floppy
  75.          disks. When you create multiple volumes on floppy disks and you
  76.          give the same name to the volumes on each disk, you can access
  77.          the different floppies using the same logical driveletter. In
  78.          addition to this, if you choose the same passphrase for the
  79.          volumes on your floppies, you can swap floppies without having
  80.          to enter a new passphrase.
  81.  
  82. EXAMPLE:
  83.  
  84. MKVOLUME C:\PRIVATE.!@# 362496
  85.  
  86. MKVOLUME A:\PRIVATE2 ALL
  87.  
  88. To load SECDEV and to be able to access the newly created volume,
  89. place a line in your CONFIG.SYS-file according to the following
  90. convention:
  91.  
  92. DEVICE=<Drive:\Path>SECDEV.SYS <Drive:\volumename>
  93.  
  94. After you have done this, reboot your system. To use your volume, refer
  95. to 'LOGGING IN TO VOLUMES'.
  96.  
  97. NOTES: - To create multiple volumes, just add them on the same line
  98.          after the first <Drive:\volumename>. Up to 10 different
  99.          volumes are supported.
  100.  
  101. EXAMPLE:
  102. DEVICE=C:\SECDEV\SECDEV.SYS C:\PRIVATE.!@# C:\PRIVATE2.!@#
  103.  
  104.  
  105. 2.2 LOGGING IN TO VOLUMES
  106.  
  107. There are two ways to log in to your volumes:
  108.  
  109. - Load the TSR SDTSR.COM. Whenever you need to enter a passphrase, SDTSR
  110.   will prompt you to enter this.
  111. - Use LOGIN.COM. If you have only 1 volume, LOGIN will automatically
  112.   prompt you for a passphrase for that volume. If you have multiple
  113.   volumes, give the driveletter of the volume you want to login to as a
  114.   parameter to LOGIN.
  115.  
  116.   You can use LOGIN.COM to login to a volume on a floppy disk, even if
  117.   the floppydisk containing the volume is not yet in the drive. This
  118.   is the reason that LOGIN.COM will NOT tell you whether the passphrase
  119.   you entered is correct or not.
  120.  
  121. EXAMPLE:
  122.  
  123. LOGIN D
  124.  
  125. 2.3 LOGGING OUT
  126.  
  127. There are three ways to log out:
  128.  
  129. - Use LOGOUT.COM with the driveletter that you wish to log out, or
  130.   alternatively the word ALL to log out of all drives simultaneously.
  131. - You can automatically log out of drives after a specific time of
  132.   inactivity. See section 3.1.
  133. - Load the TSR SDTSR and specify a hotkey. Each time you hit the hotkey
  134.   you will be logged out of the drive specified. See section 3.2.
  135.  
  136. EXAMPLE:
  137.  
  138. LOGOUT D
  139. LOGOUT ALL
  140.  
  141. 2.4 HOW DO I BACKUP MY FILES?
  142.  
  143. You can backup your files just as if you backed them up from a 'normal'
  144. drive. However, your backups may not be very secure! You could use an
  145. archive-program (such as ARJ or PKZIP) with the password-garble-option,
  146. but many questions have been raised about the security of these options.
  147.  
  148. To make a totally safe backup, you can back up the volume itself rather
  149. than all files residing on the volume.
  150.  
  151. EXAMPLE:
  152. COPY C:\PRIVATE.!@# A:\
  153.  
  154. Note that your volume by default will be stored as a hidden file, which
  155. means you can't copy it with the standard DOS COPY-command. You can a)
  156. unhide it (ATTRIB -R <volumename>) and then copy it with DOS's COPY,
  157. rehiding the file if you are done, or b) you can use a file-management
  158. program (such as the Norton Commander or PCTools) to copy it.
  159.  
  160. Since this file is encrypted, you will get very low if any result by
  161. using an archive-program to try to compress the volume.
  162.  
  163. 2.5 CAUTION WITH DISK-UNFRAGMENTERS!
  164.  
  165. If you have a volume which resides, for example, on your C-drive, use
  166. harddisk-unfragmenters with caution! Although the volumes are by default
  167. marked as Hidden, System and Read-Only, and most disk-unfragmenters will
  168. not touch these files, it's better to be safe than sorry.
  169.  
  170. Use the following procedure to safely unfragment any host drive:
  171.  
  172. - Log out from any volumes that physically reside on the drive that
  173.   you're about to compress
  174. - You can now safely unfragment the drive
  175.  
  176. 2.6 UNFRAGMENTING VOLUMES
  177.  
  178. If you get a 'General Failure'-error when you try to access a volume,
  179. it's possible that the volume is just too fragmented (more than 50
  180. non-contiguous areas). You can check this with special utility programs,
  181. like PCTOOLS or Norton's DiskEdit.
  182.  
  183. To unfragment volumes, you have to remove the Hidden, System and
  184. Read-Only attributes. To do this, issue the following DOS-command:
  185.  
  186. ATTRIB -R -H -S <volumename>
  187.  
  188. For example:
  189.  
  190. ATTRIB -R -H -S C:\PRIVATE.!@#
  191.  
  192. Now, unfragment your drive. When this is done, set the Hidden, System
  193. and Read-Only attributes again. Use the following DOS-command:
  194.  
  195. ATTRIB +R +H +S <volumename>
  196.  
  197. For example:
  198.  
  199. ATTRIB +R +H +S C:\PRIVATE.!@#
  200.  
  201. 2.7 MULTITASKERS - Windows and DesqView/X
  202.  
  203. You can use SecureDevice volumes with multitaskers such as MicroSoft
  204. Windows or DesqView/X.
  205.  
  206. However, SDTSR.COM won't function if you load it before you start the
  207. multitasker. SDTSR will notice if you start Windows or DesqView/X and
  208. will deactivate itself when one of these 2 programs is running. If you
  209. try another multitasker, chances are pretty good that your system will
  210. crash whenever SDTSR tries to pop-up.
  211.  
  212. You can, however, load a seperate copy of SDTSR in every DOS-window that
  213. you open. Then, SDTSR will operate normally, but only in the window
  214. where it is loaded.
  215.  
  216.  
  217. 2.8 STACKER SUPPORT
  218.  
  219. Creating SecureDevice-volumes on a Stacker volume will not give you much
  220. result - you are very likely to get an 1.0 compression ratio. You can do
  221. it if you want to, though (but read section 2.9).
  222.  
  223. However, you CAN create Stacker volumes on your SecureDevice volumes!
  224. But, because your SecureDevice volumes won't be accessible at boot time
  225. (you have to login first to use them), you'll have to mount the Stacker
  226. volumes by hand (using STACKER.COM) after you've logged in to your
  227. SecureDevice volume.
  228.  
  229. 2.9 MS-DOS SMARTDrive QUIRKS
  230.  
  231. You may encounter a few quirks when using SecureDevice in combination
  232. with MS-DOS SMARTDrive.
  233.  
  234. - When creating SecureDevice volumes on a Stacker volume, you'll get
  235.   weird errors if you let SMARTDrive cache your SecureDevice volume. In
  236.   our test case, disabling the cache for the SecureDevice volume was
  237.   enough to solve this problem.
  238.  
  239. - Under Windows, if you open a (windowed) DOS-window and load SDTSR in
  240.   that window, you won't see the pop-up window.
  241.  
  242. It seems that SMARTDrive has its own ideas about non-standard device
  243. drivers. You have the following options: a) Learn to live with it, or b)
  244. Use another disk-caching program ;-)
  245.  
  246. 3. FEATURES
  247.  
  248. 3.1 AUTO CLOSE AFTER TIMEOUT
  249.  
  250. You can configure SecureDevice to automatically close volumes after a
  251. certain time of inactivity. To do this, specify /Tn on the
  252. SECDEV.SYS-commandline, where n is the number of minutes of inactivity
  253. after which the volumes are to be closed.
  254.  
  255. EXAMPLE:
  256. DEVICE=C:\SECDEV\SECDEV.SYS C:\PRIVATE.!@# C:\PRIVATE2.!@# /T5
  257.  
  258. This sets the auto-closure timeout value to 5 minutes.
  259.  
  260. N.B.: The inactivity-timer is monitored individually for each volume.
  261. So, in the previous example, C:\PRIVATE.!@# will be automatically closed
  262. after 5 minutes of inactivity regardless of the usage of
  263. C:\PRIVATE2.!@# and vice versa.
  264.  
  265. 3.2 HOTKEY CLOSE
  266.  
  267. If you've loaded SDTSR.COM, you can specify hot-keys to close specific
  268. or all volumes. To do this, load SDTSR.COM with the /Kdxxxxyy parameter.
  269. If you've previously loaded SDTSR, just run SDTSR.COM again with the
  270. proper /K-switch - the hotkeys will be updated in memory.
  271.  
  272. The /Kdxxxxyy parameter is interpreted as follows: d represents the
  273. driveletter to which the auto-close applies (or, the @ sign for all
  274. drives at once), xxxx represents the CTRL-ALT-SHIFT-states and yy is the
  275. scancode of any other key on your keyboard (or leave it set at 00 to
  276. just trigger on Shift/Alt/Ctrl states). Ok - so it is sortof
  277. complicated, it is _flexible_!
  278.  
  279. You can specify one hotkey for each volume. In addition to this, you can
  280. specify one extra hotkey that closes all volumes simultaneously.
  281.  
  282. EXAMPLE 1:
  283.  
  284. SDTSR /KD000C2E
  285.  
  286. This quickly closes drive D every time you hit CTRL-ALT-C.
  287.  
  288. EXAMPLE 2:
  289.  
  290. SDTSR /K@000E00
  291.  
  292. This quickly closes all your SecureDevice-drives every time you hit
  293. CTRL-ALT-LEFTSHIFT.
  294.  
  295. Table of the xxxx - values:
  296. 0000    No Ctrl, Shift of Alt-keys
  297. 0001    Right Shift
  298. 0002    Left Shift
  299. 0004    Any Ctrl
  300. 0008    Any Alt
  301.  
  302. 1000    Scroll Lock depressed
  303. 2000    Num Lock depressed
  304. 4000    Caps Lock depressed
  305. 8000    SysReq depressed
  306. 0104    Left Ctrl (if you have 2 Ctrl's)
  307. 0208    Left Alt (if you have 2 Alt's)
  308. 0404    Right Ctrl (if you have 2 Ctrl's)
  309. 0808    Right Alt (if you have 2 Alt's)
  310.  
  311. To specify a combination of shift, alt and ctrl-keys, just OR the values
  312. given in the above table. You can use the bottom 8 values only if you
  313. have a 101- or 102-key keyboard.
  314.  
  315. Table of the yy - values (These are just the hex-scancodes)
  316.  
  317. '    28  |  ,    33  |  -    0C  |  .    34  |  /    35
  318. 0    0B  |  1    02  |  2    03  |  3    04  |  4    05
  319. 5    06  |  6    07  |  7    08  |  8    09  |  9    0A
  320. ;    27  |  =    0D  |  A    1E  |  B    30  |  C    2E
  321. D    20  |  E    12  |  F    21  |  G    22  |  H    23
  322. I    17  |  J    24  |  K    25  |  L    26  |  M    32
  323. N    31  |  O    18  |  P    19  |  Q    10  |  R    13
  324. S    1F  |  T    14  |  U    16  |  V    2F  |  W    11
  325. X    2D  |  Y    15  |  Z    2C  |  [    1A  |  \    2B
  326. ]    1B  |  `    29
  327.  
  328. F1    3B | F2    3C  |  F3   3D  |  F4   3E  |  F5   3F
  329. F6    40 | F7    41  |  F8   42  |  F9   43  |  F10  44
  330. F11   57 | F12   58
  331.  
  332. Backspace     0E                        Keypad 0  (Ins)             52
  333. Enter         1C                        Keypad 1  (End)             4F
  334. Esc           01                        Keypad 2  (Down arrow)      50
  335. Space         39                        Keypad 3  (PgDn)            51
  336. Sys Req (AT)  54                        Keypad 4  (Left arrow)      4B
  337. Tab           0F                        Keypad 5                    4C
  338.                                         Keypad 6  (Right arrow)     4D
  339.                                         Keypad 7  (Home)            47
  340.                                         Keypad 8  (Up arrow)        48
  341.                                         Keypad 9  (PgUp)            49
  342.                                         Keypad .  (Del)             53
  343.                                         Keypad *  (PrtSc)           37
  344.                                         Keypad -                    4A
  345.                                         Keypad +                    4E
  346.  
  347. 3.3  MODIFYING SDTSR-COLORS
  348.  
  349. You can modify the colors of the pop-up windows of SDTSR by running
  350. SDTSR with the /Caabbccddee parameter.
  351.  
  352. The values for aa,bb,cc,dd and ee are the hexadecimal values of the
  353. color attributes for:
  354.  
  355. aa) the Box for the 'Enter'-window
  356. bb) the Box for a 'Wrong password!'-window
  357. cc) the text of the 'Enter'-message
  358. dd) the text of the 'Wrong password!'-text
  359. ee) the password you type
  360.  
  361. A color attribute is composed as follows:
  362. Hi nibble:                      Lo nibble:
  363. 0 - Black   background          0 - Black   foreground
  364. 1 - Blue    background          1 - Blue    foreground
  365. 2 - Green   background          2 - Green   foreground
  366. 3 - Cyan    background          3 - Cyan    foreground
  367. 4 - Red     background          4 - Red     foreground
  368. 5 - Magenta background          5 - Magenta foreground
  369. 6 - Brown   background          6 - Brown   foreground
  370. 7 - White   background          7 - White   foreground
  371. 8-F: Same as 0-7, but blinking  8-F: Same as 0-7, but intensified
  372.  
  373. EXAMPLE 1: The default settings are equivalent to /C1F4E1E4F0F
  374. (EnterBox: Intensified White on Blue, Wrong Password Box: Intensified
  375. Brown (Yellow) on Red etc.)
  376.  
  377. EXAMPLE 2: In a MDA video-mode, you might want to use: /C0F0F070770.
  378. This only uses (intensified) White and Black.
  379.  
  380. 4. REFERENCE - command-line parameters, usage etc.
  381.  
  382. 4.1  MKVOLUME.COM
  383.  
  384. Usage: MKVOLUME <filename> <size>|ALL
  385.  
  386. 4.2  SECDEV.SYS
  387.  
  388. In CONFIG.SYS:
  389.  
  390. DEVICE=<path>SECDEV.SYS <Drive:\file1> [<Drive:\file2> ...] [/Tn]
  391.  
  392. /Tn defines an automatic closure after n minutes of inactivity.
  393.  
  394. 4.3  SDTSR.COM
  395.  
  396. Usage: SDTSR [/Kdxxxxyy] [/Caabbccddee] [/Q]
  397.  
  398. With the /K parameter you can specify a hotkey to close drive d (enter a
  399. @ for d to specify a hotkey to close all volumes simultaneously). xxxx
  400. represents the shift-states; yy is the scancode of the hotkey you want
  401. to use. See section 3.2 for tables for xxxx and yy.
  402.  
  403. The /C parameters lets you modify the colors of the pop-up windows.
  404. aa,bb,cc,dd and ee represent color-attributes for the windows and texts
  405. that SDTSR will display. See section 3.3 for tables for aa,bb,cc,dd and
  406. ee.
  407.  
  408. /Q: Quiet mode. By default, if SDTSR can't pop up a window asking you
  409. for a passphrase (e.g., when in a graphics mode), you'll hear a beep.
  410. Further, different beeps are given if you enter the correct or a wrong
  411. password. If you run SDTSR with /Q, you won't hear any beeps. Please
  412. note that if you're in a graphics mode and SDTSR is in quiet mode, your
  413. system will wait without any warning or announcement for you to enter a
  414. passphrase, if needed.
  415.  
  416. 4.4  LOGIN.COM
  417.  
  418. Usage: LOGIN [<driveletter>] [passphrase]
  419.  
  420. If you run LOGIN without parameters, you'll be prompted for a passphrase
  421. for your first volume.
  422.  
  423. CAUTION! Normally, you shouldn't enter the passphrase on the
  424. commandline. Just leave it empty; LOGIN will prompt you and you can
  425. enter your passphrase without echoing to the screen.
  426.  
  427. 4.5  LOGOUT.COM
  428.  
  429. Usage: LOGOUT <driveletter>|ALL
  430.  
  431. 5. SECURITY
  432.  
  433. The question is always: how secure is a certain method of encryption?
  434. Any method of encryption is as strong as the weakest link in the chain.
  435.  
  436. The encryption scheme used by SecureDevice is briefly described below.
  437.  
  438. The main encryption algorithm used is IDEA. Encryption takes place on a
  439. per-sector basis. Each sector on a volume is encrypted seperately with a
  440. different IV.
  441.  
  442. We take the plain MD5-hash of the user's password as a key for the
  443. IDEA-algorithm. A different IV is used for each volume created. Each
  444. sector is encrypted with a different IV. To achieve this, we take the
  445. 'master' IV for the volume and XOR both the low 32 bits and the high 32
  446. bits of this 'master' IV with the 32-bit sector number.
  447.  
  448. WEAKNESS: When a sector is changed, it is written back in the data file
  449. using the same IV as it had before. If an intruder could monitor your
  450. volumes for a long period of time, he/she could get different
  451. ciphertexts encrypted with the same IV and same key. This is a possible
  452. weakness in SecureDevice.
  453.  
  454. The alternative to this would be to generate a new, random IV for each
  455. sector written. However, you'd have to keep a table with all IV's for
  456. all sectors in the volume, and you'd have to update this table each time
  457. a sector is written. Further, if this table would be destroyed for some
  458. reason, there would be absolutely no way to recover your data.
  459.  
  460. We're not exactly sure how severe this 'hole' in the security is.
  461. Feedback, hints, tips or solutions are welcomed.
  462.  
  463. 6. CREDITS
  464.  
  465. 6.1 COPYRIGHT
  466.  
  467. SecureDevice 1.0 is Copyright (C) 1994 by Max Loewenthal and Arthur Helwig.
  468.  
  469. 6.2 COPYING
  470.  
  471. Distributing and copying is permitted under the GNU General Public
  472. License. See the file COPYING for details.
  473.  
  474. 6.3 WARRANTY
  475.  
  476. SecureDevice is provided with NO WARRANTY. Use at your own risk. See the
  477. file COPYING for details.
  478.  
  479. 6.4.1 IDEA
  480.  
  481. The IDEA(tm) block cipher is covered by a patent held by ETH and a Swiss
  482. company called Ascom-Tech AG.  The Swiss patent number is PCT/CH91/00117. 
  483. International patents are pending. IDEA(tm) is a trademark of Ascom-Tech AG.
  484. There is no license fee required for noncommercial use. Commercial users
  485. may obtain licensing details from:
  486. Dieter Profos, Ascom Tech AG, Solothurn Lab, Postfach 151, 4502 Solothurn,
  487. Switzerland, Tel +41 65 242885, Fax +41 65 235761.
  488.  
  489. 6.4.2 MD5
  490.  
  491. All references to MD5 refer to:
  492. RSA Data Security, Inc. MD5 Message-Digest Algorithm
  493. (C) 1990, RSA Data Security, Inc.
  494.  
  495. 6.4.3 SECUREDRIVE
  496.  
  497. Parts of the source of SecureDevice 1.0 are based on the sources of
  498. SecureDrive 1.0 by Mike Ingle.
  499.  
  500. 6.4.4 Microsoft, DesqView/X and Stacker
  501.  
  502. Microsoft is a trademark of Microsoft Corporation
  503. DesqView/X is a trademark of Quarterdeck Office
  504. Stacker is a trademark of Stac Electronics
  505.  
  506. 7. CONTACTING THE AUTHORS
  507.  
  508. We welcome your feedback! Send all your bugs, comments, requests and/or
  509. fanmail to:
  510.  
  511. Arthur Helwig:  E-Mail:         A.W.S.Helwig@ET.TUDelft.NL
  512.                 Fido Netmail:   2:512/56.2
  513.  
  514. Max Loewenthal: Fido Netmail:   2:512/56.10
  515.  
  516. 2:512/56 is a BBS called Fata Morgana located in Delft, The Netherlands.
  517. Telephone number: +31-15-568396 (As of october 10th 1995, this will
  518. change into +31-15-2568396). You can call this BBS and leave a message
  519. for either Max Loewenthal or Arthur Helwig.
  520.