Home > Articles > Security > Network Security

  • Print
  • + Share This
This chapter is from the book

5.2 Workstation Encryption

In general, a good encryption mechanism will provide certain features, regardless of whether it is built into an operating system or packaged as a separate product:

  • An encryption algorithm whose strength and trustworthiness has been reviewed and endorsed by the open cryptographic community. This is discussed in Section 5.3.

  • A sufficiently long key length to make a brute force attack impractical. This is also discussed in Section 5.3.

  • Allow secret keys to be entered as passphrases containing at least as many letters as there are bits in the secret key. This is discussed in Section 5.4.

  • Must not have a "back door" or other "emergency data recovery" mechanism, unless that mechanism is simply an additional encryption key that the user or proprietor can change. This is also discussed in Section 5.4.

There are two strategies for applying encryption to data stored on computers: file encryption and disk encryption. File encryption works on a file-by-file basis at the discretion of the workstation's operator. Disk encryption automatically encrypts everything on a disk. Both techniques can provide good results in appropriate circumstances. Both can provide strong results, but only if they use strong encryption.

File Encryption

File encryption is the easiest way to provide encryption to a workstation user. Numerous applications provide file encryption either as their primary service or as an extra feature. The PKZIP program provides notoriously weak encryption that is still widely used. Pretty Good Privacy (PGP) is a very capable program for encrypting electronic mail, and many people use it to simply encrypt files. File encryption is best used to protect files that are shared across a network through file transfers or e-mail.

Figure 5.1 shows how file encryption works. The file's owner selects the file to be encrypted and chooses a secret key, usually in the form of a password or passphrase. Others cannot read the encrypted file unless they have the secret key. To decrypt the file, the owner (or anyone else who knows the secret key) invokes the decryption program and provides the secret key. Apple's Mac OS 9 integrates this capability into the desktop: when a user opens an encrypted file, the system automatically prompts for the secret key, decrypts the file, and then opens it in the appropriate application.

Figure 5.1 Protecting workstation files with encryption. The file's owner chooses a secret to use as a key, and then encrypts the file to hide its contents from others. The encryption function should write zeroes over the plaintext data after producing the encrypted file, so that attackers can't recover the encrypted data by searching for the original file. Anyone who knows the secret key can decrypt the data.

File encryption does not reliably protect data from other workstation users. Figure 5.1 also suggests a potential source of trouble: the encrypted file uses different disk space from the plaintext file. The attacker can simply retrieve a plaintext copy of the file if the application does not take special steps to erase the plaintext. Early file encryption programs simply deleted the file. This strategy worked tolerably well on timesharing systems, though it would not prevent an administrator from retrieving the plaintext. However, many workstations have "undelete" programs to retrieve accidentally deleted files, and such a program can just as easily retrieve the "deleted" plaintext file. Experts refer to this as the object reuse problem, since reusing the deleted disk space allows unauthorized people to reuse the contents of the "object" (the file).

Effective file encryption programs overwrite the plaintext file before deleting it. For most purposes, it is enough to overwrite the original data with any other data. This prevents an attacker from retrieving the deleted file, copying it to another location, and then examining its contents.

This defense does not prevent sophisticated, laboratory-based attacks. Hard drives store data magnetically, and all data leaves a slight magnetic residue. A detailed laboratory analysis of magnetic patterns on a disk surface can retrieve data from a disk even if another layer of data has been written over it.

Fortunately, there is a relatively simple defense against laboratory attacks: apply a three-step overwriting process to the data at least once. The process requires three binary data patterns: one random bit pattern (like 0011 0101), the complement of the pattern (1100 1010), and a pattern consisting of a mixture of bits from the two (like 1001 0111). Although this does not prevent all laboratory attacks, it is sufficient to make most attacks impractical.

However, even the best file encryption program should be used only to encrypt files shared over a network. File encryption can reduce, but does not eliminate, the risk of attackers recovering information if they have physical access to the workstation. The principal risk is not even a sophisticated laboratory attack or other storage problem, though these remain. The principal risk is the attacker scavenging the sensitive data from other places on the same hard drive. Few people construct a document or other sensitive file purely from scratch. The information in the file often comes from other files, which may be earlier drafts of the same document, or perhaps databases or spreadsheets that managed the raw material. Even if attackers can't retrieve the plaintext report, they can retrieve all the raw material, assuming the owner didn't laboriously encrypt each file individually.

Moreover, most document production programs like FrameMaker and word processors like Microsoft Word produce temporary and back-up files that contain some or all of the document in plaintext. There is no way the file encryption program can track down all of those files and overwrite them. But a motivated attacker can retrieve deleted temporary files and scan the contents of plaintext back-up files. Attackers can even look for deleted "spool" files that carried the plaintext report to the printer. A sophisticated attacker can search sectors of the disk that were marked as bad blocks; such sectors can't be reached by most overwriting programs. File encryption is not practical for protecting data from motivated attackers with physical access to the workstation.

Volume Encryption

As the name implies, volume encryption converts the entire contents of a hard drive into ciphertext. This prevents attackers from recovering data by scavenging the hard drive, since all data on the hard drive is encrypted. Users don't have to worry about whether they failed to encrypt a critical file because everything gets encrypted automatically, even temporary and spool files. Attackers cannot recover sensitive data by scavenging the hard drive, since everything is encrypted, including scratch space, deleted files, and temporary files. The only shortcoming is that encryption requires a lot of computation, and that either increases the cost or reduces the performance of the protected computer.

Figure 5.2 Protecting a hard drive with volume encryption Volume encryption protects everything on the hard drive by encrypting every block of data before it is written. This is easy to use since encryption happens automatically. The user never has to decide whether a particular file needs encryption. All the user needs to do is provide the correct secret key in order to use the hard drive.

As shown in Figure 5.2, the encryption generally takes place between the hard drive and the workstation's other components. Operation is almost completely transparent so that the workstation's CPU, memory, and standard, off-the-shelf software does not know that encryption takes place. The most obvious difference might be the presence of a special program that collects the secret key as a password or passphrase when the computer boots up.

Volume encryption products may be software based or hardware based. The software-based products usually install as a special device driver. Software products often reduce the computer's overall performance since encryption shares the CPU with the application programs. Hardware-based products are usually installed in the workstation either as a custom interface card or as a device connected between the hard drive and its connection to the workstation. Systems with encryption hardware generally achieve better performance by off-loading the encryption computations onto special circuitry. Some products use custom encryption circuits to provide the highest practical performance.

Volume encryption provides better security than file encryption when potential attackers may have physical access to the hard drive. As shown in Figure 5.3, this technique encrypts all data stored permanently on the computer. Potentially sensitive plaintext data resides only in RAM, except when it is typed in or displayed. Thus, plaintext data disappears when the computer is turned off, leaving only the encrypted data on the hard drive.

Figure 5.3 How volume encryption works Volume encryption is installed transparently between the hard drive and the rest of the workstation, either in the device driver or in a separate interface circuit. Sensitive data still resides in the workstation's RAM in plaintext form, but it is always encrypted before it is written to the hard drive. All data read from the hard drive is automatically decrypted before it is delivered to the software inside the workstation.

This is particularly appealing to laptop users, since laptops face a serious theft risk. Some thieves reportedly realize that the data on a laptop may be more valuable than the laptop itself. There was once a report of a $10,000 bounty for laptops stolen at Washington National Airport. Volume encryption prevents thieves from recovering any information from the laptop's hard drive.

Attackers achieve nothing from an OS substitution or I/O bus attack on an encrypted volume: they can't even get started with the encrypted hard drive. The operating system will treat the encrypted volume as an unformatted disk because it won't be able to read the volume description data. Files can't be listed because the directory is encrypted. Even the disk space belonging to deleted files or bad blocks is encrypted, so scavenging fails.

A volume encryption system must be highly reliable, since certain failures will cause the loss of all of its data. Proper key handling is crucial: there must be no misunderstanding between owner and software regarding the password or passphrase that protects the data. If the passphrase is lost, the data itself should be considered lost. There should be no way to enter a correct passphrase and have it fail to be recognized as such.

Any security mechanism that relies on secrets should provide a way to change them periodically. With volume encryption, the product should provide a mechanism that changes the secret key or passphrase. This requires that the product systematically decrypt the entire disk and then re-encrypt it with the new secret. This will be a time consuming process on a large volume, but it must be done when the volume changes ownership.

To summarize, a disk encryption product should provide the following features:

  • All of the features of good encryption systems that were listed at the beginning of this section

  • Bulletproof reliability, since all data is lost if anything goes wrong in data handling, key management, or encryption

  • Allow users to rekey a volume, essentially changing the passphrase used to decrypt it

While volume encryption provides a high degree of security, it also has some properties that sometimes become shortcomings. First, it doesn't usually provide a way to distribute encrypted files. Since the encryption takes place transparently, the workstation can't read anything from the disk except for decrypted plaintext. If users need to exchange encrypted files through e-mail, they will need a separate file encryption program. A second shortcoming is that each volume can have only a single secret, and all of that volume's users must share that secret. Thus, volume encryption can't keep things private between users sharing a single volume.

In some cases, people think it's a shortcoming that volume encryption protects everything indiscriminately. This is especially true on systems that use software to perform the encryption, since it slows down overall system performance. While people may tolerate delays when the system encrypts their secret memoranda, they're less patient to wait for the system to decrypt Microsoft Office, which attackers probably already have copies of. But the only way to ensure that all sensitive information gets encrypted is to encrypt everything.

While volume encryption provides very strong protection against some attacks, it does not protect against every attack. Cryptanalysts have an old saying about retrieving data: "First, go after the plaintext." This means that the best attack snares the data while it is still in plaintext form, instead of trying to overcome cryptographic protections. The same holds true for attacking an encrypted volume. Practical attacks would use Trojan horse software to sneak plaintext data onto unencrypted diskettes or to transmit plaintext data to other computers via a network connection. In the late 1990s, for example, there were rumors of a Microsoft Word macro virus that would post a copy of the document it infected to the Usenet news system, essentially publishing it worldwide on the Internet. Volume encryption by itself cannot protect against such an attack.

  • + Share This
  • 🔖 Save To Your Account