Inside the Windows Vista Disk Encryption Algorithm

To protect the confidentiality of data on hard disks, Windows Vista uses Bitlocker Drive Encryption, which is based on the AES-CBC + Elephant diffuser algorithm.


September 05, 2007
URL:http://www.drdobbs.com/security/inside-the-windows-vista-disk-encryption/201804187

Mohamed is a Ph.D. student at Munich University of Technology. Klaus is the head of the Institute for Data Processing at Munich University of Technology. They can be contacted at [email protected] and [email protected], respectively.


To protect the confidentiality of data stored on hard disks, security applications (called "disk encryption" applications) are often used. The Windows Vista Enterprise and Ultimate editions, for instance, use Bitlocker Drive Encryption, which encrypts all data on the system volume. And at the heart of Bitlocker is the AES-CBC + Elephant diffuser encryption algorithm (download.microsoft.com/download/0/2/3/ 0238acaf-d3bf-4a6d-b3d6-0a0be4bbb36e/ BitLockerCipher200608.pdf).

Figure 1 presents an overview of the AES-CBC + Elephant diffuser (a "diffuser" is a data-mixing function). As you can see, there are four separate operations in each encryption. The plaintext is XORed with a sector key, run through two different diffusers, and then encrypted with the Advanced Encryption Standard (AES) in cipher-block chaining (CBC) mode. Diffuser A runs AC times and Diffuser B runs BC times. In the current Bitlocker implementation, AC=5 and BC=3.

Figure 1: Overview of AES-CBC + Elephant diffuser.

Plaintext and key are parameterized; in this article, the parameters we use are:

Testing Methodology

In examining the cryptographic strength of AES-CBC + Elephant, we ran four tests on the cipher:

AES-CBC + Elephant Diffuser

We first tested the current implementation of the cipher using the four tests. The cipher passed them all. Then we studied the ability of reducing the number of runs of Diffuser A and Diffuser B to increase performance. Our results were:

What we learned was that you can achieve maximum performance (without sacrificing the statistical properties of AES-CBC + Elephant diffuser) when running Diffuser A for two times and Diffuser B for one time.

AES-ECB + Elephant Diffuser

With the widespread use of dual-core processors, speeding up encryption using parallelization is possible. With this in mind, we replaced the AES-CBC layer (which is, by definition, sequential) with the AES-ECB layer (which can easily be parallelized). Figure 2 shows the modified cipher. We only need 128-bits as a sector key to be XORed with the plaintext. Note that we added a block counter to the drive sector key before it is XORed with the plaintext. This counter has the value of 0 for the first plaintext and is incremented by 1 for each plaintext within the block (until it reaches the value of 31). This counter was added on to the original design to make each plaintext dependent on its position within the block.

Figure 2: Overview of AES-ECB + Elephant diffuser.

When applying the four tests, the results show that if we use the current implementation of the diffuser layer, the modified cipher passes all the tests. With this in mind, we then examined whether we could reduce the number of runs of Diffuser A and Diffuser B, thereby increasing performance. Our results were:

From the results, we determined that you can achieve maximum performance without sacrificing the statistical properties of the AES-ECB + Elephant diffuser when running both Diffuser A and Diffuser B, each for two times.

Performance Analysis

We studied the performance of the AES-CBC + Elephant diffuser (the original implementation and the one recommended here for maximum performance) and the proposed AES-ECB + Elephant diffuser on a single processor, then estimated their performance on a dual-core processor.

The measurements we report are processor clock cycles on a PIV 3-GHz processor running Windows Vista. The programming environment is Microsoft VC++.

Single Processor

Our optimized implementation for Diffuser A and Diffuser B (using a loop unrolling mechanism) shows that:

That is, it takes 18,704 clock cycles to encrypt a 512-byte sector using the AES-CBC + Elephant diffuser. This value can be reduced to 15,854 if you use (AC=2 and BC=1); that's about an 18 percent enhancement in the total running time.

With the AES-ECB + Elephant diffuser:

In this case, 18,608 clock cycles are used to encrypt a 512-byte sector using the AES-ECB + Elephant diffuser. This value can be reduced to 16,328 if the minimum recommended values are used to achieve maximum performance (AC=2 and BC=2). That's about a 14 percent enhancement in the total running time.

Dual Processor

To take advantage of dual-core processors, we investigated the AES-ECB + Elephant diffuser with the AES-ECB layer (which can be easily parallelized). Here, we estimated the processing time when a dual-core processor was used. For simplification, we divide the processing time by two when parallelization can be done.

In the case of the AES-CBC + Elephant diffuser, XORing with the sector key can be parallelized, so it takes only 64 clock cycles. Neither the diffusion layer nor the AES-CBC can be parallelized (by definition, they are serial). So the estimated processing times are 15,696 (when AC=5 and BC=3) and 12,846 (when AC=2 and BC=1) clock cycles for encrypting a 512-byte sector.

For the AES-ECB + Elephant diffuser, because counter addition can be parallelized, it takes only 16 clock cycles. The XORing with the sector key can be parallelized, so it only takes 64 clock cycles. The diffusion layer cannot be parallelized. But since the AES-ECB layer can be parallelized, the estimated processing times are 11,584 (when AC=5 and BC=3) and 9304 (when AC=2 and BC=2) clock cycles for encrypting a 512-byte sector. This is about 60-100 percent faster than the original AES-CBC + Elephant diffuser implementation (depending on the values of AC and BC).

Security

Suppose an attacker is attacking two identical hard drives, one encrypted with AES-CBC + Elephant diffuser and the other encrypted only by AES-CBC. We are going to give the attacker the tweak key in Figure 1; this means the attacker can now perform the diffusion layer for any plaintext. In other words, the diffuser layer becomes transparent to the attacker. All that is left now for the attacker is to attack the AES-CBC layer, which is the same problem he has when attacking the other hard drive (encrypted using only AES-CBC mode). This means that, although we helped the attacker significantly by providing him with the tweak key, he still has to attack the AES-CBC layer. This shows that attacking the AES-CBC + Elephant diffuser is not easier than attacking just AES-CBC. Thus, the AES-CBC + Elephant diffuser is at least as secure as AES-CBC—in fact, it has better statistical characteristics because it passes four statistical tests, while AES-CBC passes only one.

Note that this security proof sketch is valid for all the values of AC and BC, but we do not recommend using AC less than 2 or BC less than 1 to have good statistical properties. Passing Test1 implies that the AES-CBC + Elephant diffuser does not suffer from a bit-flipping attack, as does AES-CBC mode.

Using the same methodology, it can be proven that the AES-ECB + Elephant diffuser is at least as secure as AES-ECB, and by providing the attacker with the tweak key in Figure 2, he will have to attack the AES-ECB layer. AES-ECB + Elephant diffuser passes all four statistical tests, while AES-ECB passes only one test. This shows that the AES-ECB + Elephant diffuser has better statistical properties than AES-ECB. By XORing the plaintext with the drive sector key, the 512-byte block becomes dependent on the sector. And by adding the counter in Figure 2, each 16-byte block (within the 512) is dependent on its position. This is to reduce the possibility of replay attacks.

Conclusion

To sum it up, in this article, we studied the new AES-CBC + Elephant diffuser—the Windows Vista disk encryption algorithm. Our study shows that this cipher possesses good diffusion properties that can reduce manipulation attacks. And from our study, we set a lower bound of the number of cycles used by each of the two diffusers; these values are AC=2 and BC=1. With these values, the cipher will not lose its statistical properties. Moreover, it still will be at least as secure as AES-CBC mode. On the other hand, the use of these values increases the total performance of the cipher by about 18 percent.

We also propose a new cipher AES-ECB + Elephant diffuser that has similar properties to the AES-CBC + Elephant diffuser. From our study, we set a lower bound of the number of cycles used by each of the two used diffusers; these values are AC=2 and BC=2. These values can be used and the cipher will not lose its statistical properties and still will be at least as secure as AES-ECB mode. On the other hand, the use of these values increases the total performance of the cipher by about 14 percent.

While the AES-ECB + Elephant diffuser is about the same speed as the AES-CBC + Elephant diffuser when a single processor is used, it is about 60-100 percent faster than the AES-CBC + Elephant diffuser (depending on the values of AC and BC used) when a dual-core processor is used. This speed up is inversely proportional to the number of processor cores used. The complete source code accompanying this article is available electronically (for demonstration purposes only, contact Microsoft for development use); see www.ddj.com/code/.

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.