Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5873197
  • 博文数量: 671
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 7310
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-14 09:56
文章分类

全部博文(671)

文章存档

2011年(1)

2010年(2)

2009年(24)

2008年(271)

2007年(319)

2006年(54)

我的朋友

分类: C/C++

2008-12-20 20:47:08

Contents

[]

Compiling DiskCryptor

This article will aid you, if you would like to compile DiskCryptor from sources on your own. You may want to do that, if you would like to make changes to the program functionality, or if you want to make some fixes in the program yourself, or if you want to be in an absolute control of your security and trust only the compiles of the programs you use, that you have made yourself. For the process you will need a number of tools.

Compilation tools

  • Windows Driver Kit (WDK)
  • Microsoft Visual Studio 2008
  • Flat Assembler (FASM)

In order to obtain WDK, please visit this page at Windows Hardware Development Central, to learn how you can do that. After installing WDK, please create "DDK" environment variable, and point it to your WDK installation, for example "C:\WinDDK\6000\".

Concerning Visual Studio 2008, you can either go and obtain a free copy of or try out versions. If you are going to use Visual Studio Express, then after install you will need to open "Tools->Options", then go to "Projects and Solutions->VC++ Directories", and add "$(DDK)\bin\x86" path to "Executable files", and also add "$(DDK)\inc\mfc42" path to "Include Files". When using commercial Visual Studio versions, the steps described above, are not needed to be taken. And please be aware, that Visual Studio Express does not have the 64bit compiler, and therefore for the compilation of x64 version of DiskCryptor, you will need to have a commercial Visual Studio version.

To obtain Flat Assembler, please visit its official . Please also set environment variable 'fasm' and point it to the FASM directory.

Fast AES for x86 platform

In order to speed up cryptographic operations, DiskCryptor uses optimized assembly implementation of AES. Code of this implementation in being dynamically generated, based on the encryption key. This helps to decrease the number of times memory needs to be accessed and increases productivity. The base code of the implementation you will find at "fast_aes\aes_x86.asm". Upon compiling it with FASM, you will get the "aes_x86.exe" file. On executing this file, you will get the "aes_x86.txt" file, that contains binary code on the basis of which cryptographic functions will be generated. First block of the code represents decryption function, and the second one - encryption function. You will need to place them in decryptor and encryptor arrays, in file "include\sys\aes_tab.h". Do not be concerned whether you have mixed that up or not, in case of an error, the driver will simply not run, as the self-test will fail. If for some reason, you would like not to use assembly implementations of cryptoalgorithms, then comment the line "#define ASM_CRYPTO" in the "include\defines.h" file.

Project compilation

Please open "dcrypt.sln" project file in Visual Studio, then choose the needed configuration (Debug/Release), the platform (Win32/x64) and do Build Solution. The end result of compilation will be found in a folder, that is appropriate to the chosen configuration and platform.

Building BartPE plugin

Please perform compilation for Release configuration and Win32 platform. Then run "make_bartpe.bat" file. The result of compilation will be located in "bartpe" folder. To read how to make a disk with this plugin, - please refer to the article "".

阅读(1866) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~