




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、TrueCrypt簡(jiǎn)介、在VS2008下的編譯過(guò)程 分類: 開源軟件(金山、Nginx、Gual)/設(shè)計(jì)模式 window xp 驅(qū)動(dòng)(USB)/FireFox插件/匯編 2012-07-24 11:09 1195人閱讀 評(píng)論(6) 收藏 舉報(bào) 目錄(?)+1. 一TrueCrypt簡(jiǎn)介1. 主要特性2. 二TrueCrypt的編譯1. 首先編譯Boot工程1. 提示報(bào)錯(cuò)2. 再次編譯還是出錯(cuò)3. 13 再次編譯又是出錯(cuò)4. 14 再次編譯成功了2. 編譯Crypto工程3. 編譯Driver工程1. 下載WDK7600163851 并安裝2. 提示下面的錯(cuò)誤3. 再次編譯成功了4. 編譯Fo
2、rmat工程1. 提示如下錯(cuò)誤2. 再次編譯成功了5. 編譯Mount工程6. 編譯Setup 工程1. 提示下面的錯(cuò)誤2. 再次編譯成功了7. 三查看運(yùn)行效果轉(zhuǎn)載請(qǐng)標(biāo)明是引用于 歡迎大家拍磚!編譯過(guò)程中用到的工具下載地址: + gzip.exe + asm.zip + MsVSVC+1.52.7z)一、TrueCrypt簡(jiǎn)介TrueCrypt,是一款免費(fèi)開源的加密軟件,同時(shí)支持Windows Vista,7/XP, Mac OS X, Linux 等操作系統(tǒng)。TrueCrypt不需要生成任何文件即可在硬盤上建立虛擬磁盤,用戶可以按照盤符進(jìn)行訪問(wèn),所有虛擬磁盤上的文件都被自動(dòng)加密,需要通過(guò)密碼
3、來(lái)進(jìn)行訪問(wèn)。TrueCrypt 提供多種加密算法,包括:AES-256, Blowfish (448-bit key), CAST5, Serpent, Triple DES, and Twofish,其他特性還有支持FAT32和NTFS分區(qū)、隱藏卷標(biāo)、熱鍵啟動(dòng)等。主要特性:(1)所有加密都是以分區(qū)為基礎(chǔ)的。(2)真加密,所有加密數(shù)據(jù)都是經(jīng)過(guò)AES等加密算法的運(yùn)算后的結(jié)果,無(wú)法破解(窮舉法除外)。(3)能創(chuàng)建加密的“虛擬磁盤文件”(類似虛擬光驅(qū),大小可以自定義)(4)加密單個(gè)分區(qū)或整個(gè)硬盤。(5)加密Windows系統(tǒng)所在的分區(qū)(啟動(dòng)Windows前需要密碼) (6)加密過(guò)程自動(dòng)、實(shí)時(shí)、透明(
4、使用加密文件或分區(qū)前輸入密碼,載入后就可以像使用一個(gè)普通分區(qū)一樣使用加密分區(qū)。)(7)提供兩級(jí)方案,以應(yīng)對(duì)被強(qiáng)迫說(shuō)出密碼的情況(如搶劫)。7、1 隱藏分區(qū)(覆蓋式密碼術(shù),steganography)、隱藏操作系統(tǒng) 7、2 無(wú)法探測(cè)到TrueCrypt 加密分區(qū)(加密數(shù)據(jù)會(huì)被認(rèn)為是隨機(jī)數(shù)據(jù))(8)加密算法:AES-256、Serpent、Twofish。為取得更好加密效果,可以同時(shí)使用兩種或三種加密算法。操作模式:XTS。二、TrueCrypt的編譯從trucCrypt官網(wǎng)中獲得源碼: / , 現(xiàn)在最新版本是我們以這個(gè)版本為例來(lái)介紹在VS2008下的
5、編譯方法。用VS2008打開后,得到如下:1、首先編譯Boot工程1、1 提示報(bào)錯(cuò):plain view plaincopyprint?1. 1-已啟動(dòng)生成:項(xiàng)目:Boot,配置:ReleaseWin32-2. 1正在執(zhí)行生成文件項(xiàng)目操作3. 1makefile(13):fatalerrorU1050:EnvironmentvariableMSVC16_ROOTmustpointtotheinstallationdirectoryofMSVisualC+1.54. 1Stop.5. 1makefile(13):fatalerrorU1050:EnvironmentvariableMSVC16_
6、ROOTmustpointtotheinstallationdirectoryofMSVisualC+1.56. 1Stop.1- 已啟動(dòng)生成: 項(xiàng)目: Boot, 配置: Release Win32 -1正在執(zhí)行生成文件項(xiàng)目操作1makefile(13) : fatal error U1050: Environment variable MSVC16_ROOT must point to the installation directory of MS Visual C+ 1.51Stop.1makefile(13) : fatal error U1050: Environment vari
7、able MSVC16_ROOT must point to the installation directory of MS Visual C+ 1.51Stop.查看makefile文件,是因?yàn)闆](méi)有安裝Visual C+ 1.5的原因。解決方法:下載安裝Ms-VC+ 1.52c,如果我安裝在C:MSVC下,那么就在系統(tǒng)環(huán)境變量中新建如下的變量。1、2 再次編譯還是出錯(cuò):plain view plaincopyprint?1. 1-已啟動(dòng)生成:項(xiàng)目:Boot,配置:ReleaseWin32-2. 1正在執(zhí)行生成文件項(xiàng)目操作3. 1Aes_hw_cpu.asm4. 1nasm.exe不是內(nèi)部或
8、外部命令,也不是可運(yùn)行的程序5. 1或批處理文件。6. 1NMAKE:fatalerrorU1077:“nasm.exe”:返回代碼“0x1”7. 1Stop.1- 已啟動(dòng)生成: 項(xiàng)目: Boot, 配置: Release Win32 -1正在執(zhí)行生成文件項(xiàng)目操作1Aes_hw_cpu.asm1nasm.exe 不是內(nèi)部或外部命令,也不是可運(yùn)行的程序1或批處理文件。1NMAKE : fatal error U1077: “nasm.exe”: 返回代碼“0x1”1Stop.解決方法:從網(wǎng)上下載nasm.exe,并放到VS2008的安裝路徑下。1、3 再次編譯又是出錯(cuò):plain view pl
9、aincopyprint?1. 1-已啟動(dòng)生成:項(xiàng)目:Boot,配置:ReleaseWin32-2. 1正在執(zhí)行生成文件項(xiàng)目操作3. 1Aes_hw_cpu.asm4. 1AesSmall_x86.asm5. 1.cryptoaestab.c6. 1Linking.7. 1gzip.exe不是內(nèi)部或外部命令,也不是可運(yùn)行的程序8. 1或批處理文件。9. 1NMAKE:fatalerrorU1077:“gzip.exe”:返回代碼“0x1”10. 1Stop.1- 已啟動(dòng)生成: 項(xiàng)目: Boot, 配置: Release Win32 -1正在執(zhí)行生成文件項(xiàng)目操作1Aes_hw_cpu.asm1A
10、esSmall_x86.asm1.cryptoaestab.c1Linking.1gzip.exe 不是內(nèi)部或外部命令,也不是可運(yùn)行的程序1或批處理文件。1NMAKE : fatal error U1077: “gzip.exe”: 返回代碼“0x1”1Stop.解決方法:從網(wǎng)上下載gzip.exe,并放到VS2008 的安裝路徑下。1、4 再次編譯,成功了。我們得到了2、編譯Crypto工程由于在編譯Boot工程時(shí),我們解決了那么多路徑,這里編譯Crypto相當(dāng)順利,成功后得到了Crypto.lib。3、編譯Driver工程3、1 下載WDK7600.16385.1 并安裝(可參考我的文章:
11、Window XP驅(qū)動(dòng)開發(fā)(二) 環(huán)境搭建(VS2008+WDK+DDKWzard)及示例)3、2 提示下面的錯(cuò)誤:plain view plaincopyprint?1. 1-已啟動(dòng)生成:項(xiàng)目:Driver,配置:DebugWin32-2. 1正在執(zhí)行生成文件項(xiàng)目操作3. 1-Buildingtruecrypt.sys:Debugx86-4. 1BuildDriver.cmd:error:MSBuilddoesnotsupportbuildingofprojectsstoredinapathcontainingspaces.5. 1-Buildingtruecrypt.sys:Debugx6
12、4-6. 1BuildDriver.cmd:error:MSBuilddoesnotsupportbuildingofprojectsstoredinapathcontainingspaces.1- 已啟動(dòng)生成: 項(xiàng)目: Driver, 配置: Debug Win32 -1正在執(zhí)行生成文件項(xiàng)目操作1- Building truecrypt.sys: Debug x86 -1BuildDriver.cmd: error: MS Build does not support building of projects stored in a path containing spaces. 1- Bu
13、ilding truecrypt.sys: Debug x64 -1BuildDriver.cmd: error: MS Build does not support building of projects stored in a path containing spaces. 解決方法,把工程在沒(méi)有空格的路徑中。3、3 再次編譯成功了。我們得到了truecrypt.sys4、編譯Format工程4、1 提示如下錯(cuò)誤:plain view plaincopyprint?1. 2-已啟動(dòng)生成:項(xiàng)目:Format,配置:DebugWin32-2. 2正在編譯.3. 2Dlgcode.c4. 2d
14、:truecrypt7.1asourcecommonsecuritytoken.h(34):fatalerrorC1083:無(wú)法打開包括文件:“pkcs11.h”:Nosuchfileordirectory2- 已啟動(dòng)生成: 項(xiàng)目: Format, 配置: Debug Win32 -2正在編譯.2Dlgcode.c2d:truecrypt7.1asourcecommonsecuritytoken.h(34) : fatal error C1083: 無(wú)法打開包括文件:“pkcs11.h”: No such file or directory解決方法:下載PKCS 11頭文件,并把它的路徑添加到
15、Format工程下的C+包含路徑下。(默認(rèn)在原有的C+包含路徑下有 $(PKCS11_INC), 所以我們也可以在系統(tǒng)環(huán)境變量中定義PKCS11_INC的值為PKCS 11的路徑)4、2 再次編譯成功了我們得到了 TrueCryptFormat.exe5、編譯Mount工程出現(xiàn)的提示與4、1是一樣的,解決方法也與4、1一樣。再次編譯成功了。6、編譯Setup 工程6、1 提示下面的錯(cuò)誤plain view plaincopyprint?1. 2Setup.c2. 2d:truecrypt7.1asourcesetupsetup.c(135):errorC2065:“PKEY_AppUserMo
16、del_ID”:未聲明的標(biāo)識(shí)符2Setup.c2d:truecrypt7.1asourcesetupsetup.c(135) : error C2065: “PKEY_AppUserModel_ID”: 未聲明的標(biāo)識(shí)符解決方法:修改TrueCrypt 7.1a Source其中的Setup項(xiàng)目中的Setup.h文件,添加cpp view plaincopyprint?1. /*-regionaddbygc-*/2. #includewtypes.h 3. constPROPERTYKEYPKEY_AppUserModel_ID=4. 5. (unsignedlong)2009,/*unsign
17、edlongData1;*/6. (unsignedshort)12,/*unsignedshortData2;*/7. (unsignedshort)23,/*unsignedshortData3;*/8. 0x44,0x55,0x55,0x55,0x55,0x55,0x55,0x559. ,/*GUIDfmtid;*/10. (DWORD)PID_FIRST_USABLE/*DWORDpid;*/11. ;12. /*-endregion-*/*-region add by gc-*/#include wtypes.h const PROPERTYKEY PKEY_AppUserModel
18、_ID = (unsigned long)2009,/*unsigned long Data1;*/ (unsigned short)12,/*unsigned short Data2;*/ (unsigned short)23,/*unsigned short Data3;*/ 0x44,0x55,0x55,0x55,0x55,0x55,0x55,0x55 ,/*GUID fmtid;*/ (DWORD)PID_FIRST_USABLE /*DWORD pid;*/ ;/*-endregion-*/添加在文件的開始處,即cpp view plaincopyprint?1. #ifdef_cp
19、lusplus 2. 3. externC4. 5. #endif#ifdef _cplusplusextern C #endif后面一行即可。6、2 再次編譯,成功了- 花了兩個(gè)小時(shí),至此我們把整個(gè)解決方案中的工程都編譯通過(guò)了,慶祝一下吧。在Debug目錄下我們可以看到目標(biāo)文件:三、查看運(yùn)行效果運(yùn)行目標(biāo)目錄下的Truecrypt.exe,在讓防火墻允許的情況下運(yùn)行,看到主界面了:筆記TrueCrypt7.0a代碼編譯流程Admin2011年8月8日名人名言:我們比較容易承認(rèn)行為上的錯(cuò)誤、過(guò)失和缺點(diǎn),而對(duì)于思想上的錯(cuò)誤、過(guò)失和缺點(diǎn)則不然。歌德 早期版本的TrueCrypt若要編譯成功,的確須要
20、做多項(xiàng)微調(diào),然則對(duì)于7.0a版本的代碼,只需遵守如下賤程,即可在WinXP 32位體系下成功編譯。代碼的ReadMe.txt是這么寫的:I. Windows =Requirements for Building TrueCrypt for Windows: - Microsoft Visual C+ 2008 SP1 (Professional Edition or compatible) - Microsoft Visual C+ 1.52 (available MSDN Subscriber Downloads) - Microsoft Windows SDK for Windows 7
21、(configured for Visual C+) - Microsoft Windows Driver Kit 7.1.0 (build 7600.16385.1) - RSA Security Inc. PKCS 11 Cryptographic Token Interface (Cryptoki) 2.20 header files (available at ftp:/ - NASM assembler 2.08 or compatible - gzip compressorIMPORTANT:The 64-bit editions of Windows Vista and late
22、r versions of Windows, and in some cases (e.g. playback of HD DVD content) also the 32-bit editions, do not allow the TrueCrypt driver to run without an appropriate digital signature. Therefore, all .sys files in official TrueCrypt binary packages are digitally signed with the digital certificate of
23、 the TrueCrypt Foundation, which was issued by a certification authority. At the end of each official .exe and .sys file, there are embedded digital signatures and all related certificates (i.e. all certificates in the relevant certification chain, such as the certification authority certificates, C
24、A-MS cross-certificate, and the TrueCrypt Foundation certificate). Keep this in mind if you compile TrueCrypt and compare your binaries with the official binaries. If your binaries are unsigned, the sizes of the official binaries will usually be approximately 10 KB greater than sizes of your binarie
25、s (there may be further differences if you use a different version of the compiler, or if you install a different or no service pack for Visual Studio, or different hotfixes for it, or if you use different versions of the required SDKs).Instructions for Building TrueCrypt for Windows: -1) Create an
26、environment variable MSVC16_ROOT pointing to the installation directory of MS Visual C+ 1.52.2) If you have installed the Windows Driver Development Kit in another directory than SYSTEMDRIVEWinDDK, create an environment variable WINDDK_ROOT pointing to the DDK installation directory.3) Copy the PKCS
27、 11 header files to a standard include path or create an environment variable PKCS11_INC pointing to the directory where the PKCS 11 header files are installed.4) Open the TrueCrypt.sln solution in Microsoft Visual Studio 2008.5) Select All as the active solution configuration.6) Build the solution.7) If successful, there should be newly built TrueCrypt binaries in the Release folder.遵守流程,景象設(shè)備如下:1. Visual Studio 2008,我的版本是官方的90天評(píng)估版。2. nasm,我用的版本是 nasm-2.09.08,我的微盤下載地址在這里。將 nasm.exe 文件解壓出來(lái), 放到 system32 目次里3. gzip,我用的版本是 1.2.4,我的微盤下載地址在這里。將 gzip.ex
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 院內(nèi)美化合同協(xié)議書5篇
- 2025年榆林普通貨運(yùn)從業(yè)資格證模擬考試
- 2025年大理貨運(yùn)員初級(jí)考試題庫(kù)
- 2025年高中化學(xué)新教材同步 必修第一冊(cè) 第4章 第3節(jié) 第2課時(shí) 化學(xué)鍵 分子間作用力
- 107-廣播對(duì)講系統(tǒng)
- 空間環(huán)境監(jiān)測(cè)系統(tǒng)產(chǎn)業(yè)分析報(bào)告
- 個(gè)人汽車公用租賃合同范本
- 勞務(wù)派遣住宿合同范本
- 中學(xué)化學(xué)教學(xué)工作總結(jié)
- 個(gè)人自查自糾整改報(bào)告
- 2025年安徽水利水電職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)適應(yīng)性測(cè)試題庫(kù)(含答案)
- 山東省青島市市北區(qū)2024-2025學(xué)年七年級(jí)上學(xué)期期末考試英語(yǔ)試題(含答案+解析)
- 餐飲及食品安全管理制度
- 湖北省襄陽(yáng)市襄州區(qū)2024-2025學(xué)年九年級(jí)上學(xué)期期末語(yǔ)文試題(含答案)
- 2025年安徽電氣工程職業(yè)技術(shù)學(xué)院?jiǎn)握新殬I(yè)技能測(cè)試題庫(kù)及答案1套
- 2025年房屋交易代持策劃協(xié)議書
- 課題申報(bào)參考:“四新”建設(shè)背景下教育創(chuàng)新與課程數(shù)字化實(shí)踐研究
- 2025年煙臺(tái)汽車工程職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性測(cè)試近5年??及鎱⒖碱}庫(kù)含答案解析
- 高考成績(jī)證明模板
- 蝴蝶蘭PPT課件
- 賓館做房記錄表
評(píng)論
0/150
提交評(píng)論