diff options
Diffstat (limited to 'src/Boot')
36 files changed, 616 insertions, 4 deletions
diff --git a/src/Boot/EFI/DcsBml.efi b/src/Boot/EFI/DcsBml.efi Binary files differnew file mode 100644 index 00000000..8775ce4c --- /dev/null +++ b/src/Boot/EFI/DcsBml.efi diff --git a/src/Boot/EFI/DcsBoot.efi b/src/Boot/EFI/DcsBoot.efi Binary files differnew file mode 100644 index 00000000..03f15633 --- /dev/null +++ b/src/Boot/EFI/DcsBoot.efi diff --git a/src/Boot/EFI/DcsCfg.efi b/src/Boot/EFI/DcsCfg.efi Binary files differnew file mode 100644 index 00000000..da5a6ee4 --- /dev/null +++ b/src/Boot/EFI/DcsCfg.efi diff --git a/src/Boot/EFI/DcsInt.efi b/src/Boot/EFI/DcsInt.efi Binary files differnew file mode 100644 index 00000000..666030ba --- /dev/null +++ b/src/Boot/EFI/DcsInt.efi diff --git a/src/Boot/EFI/DcsRe.efi b/src/Boot/EFI/DcsRe.efi Binary files differnew file mode 100644 index 00000000..646a79e3 --- /dev/null +++ b/src/Boot/EFI/DcsRe.efi diff --git a/src/Boot/EFI/LegacySpeaker.efi b/src/Boot/EFI/LegacySpeaker.efi Binary files differnew file mode 100644 index 00000000..5f49a76a --- /dev/null +++ b/src/Boot/EFI/LegacySpeaker.efi diff --git a/src/Boot/EFI/Readme.txt b/src/Boot/EFI/Readme.txt new file mode 100644 index 00000000..882c247a --- /dev/null +++ b/src/Boot/EFI/Readme.txt @@ -0,0 +1,13 @@ +To update secure boot configuration +1. Enter BIOS configuration +2. Switch Secure boot to setup mode (or custom mode). It deletes PK (platform certificate) and allows to load DCS platform key. +3. Boot Windows +4. execute from admin command prompt + powershell -File sb_set_siglists.ps1 +It sets in PK (platform key) - DCS_platform +It sets in KEK (key exchange key) - DCS_key_exchange +It sets in db - DCS_sign MicWinProPCA2011_2011-10-19 MicCorUEFCA2011_2011-06-27 + +All DCS modules are protected by DCS_sign. +All Windows modules are protected by MicWinProPCA2011_2011-10-19 +All SHIM(linux) modules are protected by MicCorUEFCA2011_2011-06-27
\ No newline at end of file diff --git a/src/Boot/EFI/certs/DCS_key_exchange.crt b/src/Boot/EFI/certs/DCS_key_exchange.crt Binary files differnew file mode 100644 index 00000000..80bc7ca4 --- /dev/null +++ b/src/Boot/EFI/certs/DCS_key_exchange.crt diff --git a/src/Boot/EFI/certs/DCS_platform.crt b/src/Boot/EFI/certs/DCS_platform.crt Binary files differnew file mode 100644 index 00000000..a7cf8ce9 --- /dev/null +++ b/src/Boot/EFI/certs/DCS_platform.crt diff --git a/src/Boot/EFI/certs/DCS_sign.crt b/src/Boot/EFI/certs/DCS_sign.crt Binary files differnew file mode 100644 index 00000000..f0538dbb --- /dev/null +++ b/src/Boot/EFI/certs/DCS_sign.crt diff --git a/src/Boot/EFI/certs/MicCorUEFCA2011_2011-06-27.crt b/src/Boot/EFI/certs/MicCorUEFCA2011_2011-06-27.crt Binary files differnew file mode 100644 index 00000000..9aa6ac6c --- /dev/null +++ b/src/Boot/EFI/certs/MicCorUEFCA2011_2011-06-27.crt diff --git a/src/Boot/EFI/certs/MicWinProPCA2011_2011-10-19.crt b/src/Boot/EFI/certs/MicWinProPCA2011_2011-10-19.crt Binary files differnew file mode 100644 index 00000000..a6d001c2 --- /dev/null +++ b/src/Boot/EFI/certs/MicWinProPCA2011_2011-10-19.crt diff --git a/src/Boot/EFI/certs/Readme.txt b/src/Boot/EFI/certs/Readme.txt new file mode 100644 index 00000000..6663a5d1 --- /dev/null +++ b/src/Boot/EFI/certs/Readme.txt @@ -0,0 +1,3 @@ +Apart from DCS certificates, there are two public DB entries - one for Windows and one for the UEFI Certificate Authority (CA). +Windows DB: http://www.microsoft.com/pkiops/certs/MicWinProPCA2011_2011-10-19.crt +UEFI DB: http://www.microsoft.com/pkiops/certs/MicCorUEFCA2011_2011-06-27.crt diff --git a/src/Boot/EFI/sb_set_siglists.ps1 b/src/Boot/EFI/sb_set_siglists.ps1 new file mode 100644 index 00000000..5f664f21 --- /dev/null +++ b/src/Boot/EFI/sb_set_siglists.ps1 @@ -0,0 +1,22 @@ +Set-ExecutionPolicy Bypass -Force +Import-Module secureboot + +Set-SecureBootUEFI -Name PK -Time 2015-09-11 -Content $null +Set-SecureBootUEFI -Name KEK -Time 2015-09-11 -Content $null +Set-SecureBootUEFI -Name db -Time 2015-09-11 -Content $null +Set-SecureBootUEFI -Name dbx -Time 2015-09-11 -Content $null + +Write-Host "Setting self-signed PK..." +Set-SecureBootUEFI -Time 2016-08-08T00:00:00Z -ContentFilePath siglists\DCS_platform_SigList.bin -SignedFilePath siglists\DCS_platform_SigList_Serialization.bin.p7 -Name PK + +Write-Host "Setting PK-signed KEK..." +Set-SecureBootUEFI -Time 2016-08-08T00:00:00Z -ContentFilePath siglists\DCS_key_exchange_SigList.bin -SignedFilePath siglists\DCS_key_exchange_SigList_Serialization.bin.p7 -Name KEK + +Write-Host "Setting KEK-signed DCS cert in db..." +Set-SecureBootUEFI -Time 2016-08-08T00:00:00Z -ContentFilePath siglists\DCS_sign_SigList.bin -SignedFilePath siglists\DCS_sign_SigList_Serialization.bin.p7 -Name db + +Write-Host "Setting KEK-signed MS cert in db..." +Set-SecureBootUEFI -Time 2016-08-08T00:00:00Z -ContentFilePath siglists\MicWinProPCA2011_2011-10-19_SigList.bin -SignedFilePath siglists\MicWinProPCA2011_2011-10-19_SigList_Serialization.bin.p7 -Name db -AppendWrite:$true + +Write-Host "Setting KEK-signed MS UEFI cert in db..." +Set-SecureBootUEFI -Time 2016-08-08T00:00:00Z -ContentFilePath siglists\MicCorUEFCA2011_2011-06-27_SigList.bin -SignedFilePath siglists\MicCorUEFCA2011_2011-06-27_SigList_Serialization.bin.p7 -Name db -AppendWrite:$true diff --git a/src/Boot/EFI/siglists/DCS_key_exchange_SigList.bin b/src/Boot/EFI/siglists/DCS_key_exchange_SigList.bin Binary files differnew file mode 100644 index 00000000..62f5cc6f --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_key_exchange_SigList.bin diff --git a/src/Boot/EFI/siglists/DCS_key_exchange_SigList_Serialization.bin b/src/Boot/EFI/siglists/DCS_key_exchange_SigList_Serialization.bin Binary files differnew file mode 100644 index 00000000..1cffcf0c --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_key_exchange_SigList_Serialization.bin diff --git a/src/Boot/EFI/siglists/DCS_key_exchange_SigList_Serialization.bin.p7 b/src/Boot/EFI/siglists/DCS_key_exchange_SigList_Serialization.bin.p7 Binary files differnew file mode 100644 index 00000000..1e9d29ae --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_key_exchange_SigList_Serialization.bin.p7 diff --git a/src/Boot/EFI/siglists/DCS_platform_SigList.bin b/src/Boot/EFI/siglists/DCS_platform_SigList.bin Binary files differnew file mode 100644 index 00000000..0b6d7e12 --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_platform_SigList.bin diff --git a/src/Boot/EFI/siglists/DCS_platform_SigList_Serialization.bin b/src/Boot/EFI/siglists/DCS_platform_SigList_Serialization.bin Binary files differnew file mode 100644 index 00000000..e8fbf79a --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_platform_SigList_Serialization.bin diff --git a/src/Boot/EFI/siglists/DCS_platform_SigList_Serialization.bin.p7 b/src/Boot/EFI/siglists/DCS_platform_SigList_Serialization.bin.p7 Binary files differnew file mode 100644 index 00000000..19cb86db --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_platform_SigList_Serialization.bin.p7 diff --git a/src/Boot/EFI/siglists/DCS_sign_SigList.bin b/src/Boot/EFI/siglists/DCS_sign_SigList.bin Binary files differnew file mode 100644 index 00000000..9a3f568b --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_sign_SigList.bin diff --git a/src/Boot/EFI/siglists/DCS_sign_SigList_Serialization.bin b/src/Boot/EFI/siglists/DCS_sign_SigList_Serialization.bin Binary files differnew file mode 100644 index 00000000..de58d77d --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_sign_SigList_Serialization.bin diff --git a/src/Boot/EFI/siglists/DCS_sign_SigList_Serialization.bin.p7 b/src/Boot/EFI/siglists/DCS_sign_SigList_Serialization.bin.p7 Binary files differnew file mode 100644 index 00000000..01753a8b --- /dev/null +++ b/src/Boot/EFI/siglists/DCS_sign_SigList_Serialization.bin.p7 diff --git a/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList.bin b/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList.bin Binary files differnew file mode 100644 index 00000000..413ccab9 --- /dev/null +++ b/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList.bin diff --git a/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList_Serialization.bin b/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList_Serialization.bin Binary files differnew file mode 100644 index 00000000..735d9626 --- /dev/null +++ b/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList_Serialization.bin diff --git a/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList_Serialization.bin.p7 b/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList_Serialization.bin.p7 Binary files differnew file mode 100644 index 00000000..ed8cefda --- /dev/null +++ b/src/Boot/EFI/siglists/MicCorUEFCA2011_2011-06-27_SigList_Serialization.bin.p7 diff --git a/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList.bin b/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList.bin Binary files differnew file mode 100644 index 00000000..ac542ca0 --- /dev/null +++ b/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList.bin diff --git a/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList_Serialization.bin b/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList_Serialization.bin Binary files differnew file mode 100644 index 00000000..9138dae9 --- /dev/null +++ b/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList_Serialization.bin diff --git a/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList_Serialization.bin.p7 b/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList_Serialization.bin.p7 Binary files differnew file mode 100644 index 00000000..b08c60a3 --- /dev/null +++ b/src/Boot/EFI/siglists/MicWinProPCA2011_2011-10-19_SigList_Serialization.bin.p7 diff --git a/src/Boot/Windows/Boot.vcproj b/src/Boot/Windows/Boot.vcproj index 64ad48ec..c73b099e 100644 --- a/src/Boot/Windows/Boot.vcproj +++ b/src/Boot/Windows/Boot.vcproj @@ -24,9 +24,9 @@ > <Tool Name="VCNMakeTool" - BuildCommandLine="md Release 2>NUL:
nmake.exe /nologo RELEASE=1

md Release_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2

md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

md Release_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2

md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

md Release_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2

md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH

md Release_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2

md Rescue 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1

md Rescue_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1

md Rescue_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1

md Rescue_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1

md Rescue_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2" - ReBuildCommandLine="del /q /s Release >NUL:
md Release 2>NUL:
nmake.exe /nologo RELEASE=1

del /q /s Release_SHA2 >NUL:
md Release_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2

del /q /s Release_AES >NUL:
md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

del /q /s Release_AES_SHA2 >NUL:
md Release_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2

del /q /s Release_Serpent >NUL:
md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

del /q /s Release_Serpent_SHA2 >NUL:
md Release_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2

del /q /s Release_Twofish >NUL:
md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH

del /q /s Release_Twofish_SHA2 >NUL:
md Release_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2

del /q /s Rescue >NUL:
md Rescue 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1

del /q /s Rescue_SHA2 >NUL:
md Rescue_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_AES >NUL:
md Rescue_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1

del /q /s Rescue_AES_SHA2 >NUL:
md Rescue_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Serpent >NUL:
md Rescue_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1

del /q /s Rescue_Serpent_SHA2 >NUL:
md Rescue_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Twofish >NUL:
md Rescue_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1

del /q /s Rescue_Twofish_SHA2 >NUL:
md Rescue_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2" - CleanCommandLine="del /q /s Release Release_AES Release_Serpent Release_Twofish Rescue Rescue_AES Rescue_Serpent Rescue_Twofish >NUL:
del /q /s Release_SHA2 Release_AES_SHA2 Release_Serpent_SHA2 Release_Twofish_SHA2 Rescue_SHA2 Rescue_AES_SHA2 Rescue_Serpent_SHA2 Rescue_Twofish_SHA2 >NUL:
" + BuildCommandLine="md Release 2>NUL:
nmake.exe /nologo RELEASE=1

md Release_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2

md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

md Release_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2

md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

md Release_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2

md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH

md Release_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2

md Release_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA

md Release_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA SINGLE_PRF=SHA2

md Rescue 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1

md Rescue_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1

md Rescue_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1

md Rescue_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1

md Rescue_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2

md Rescue_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1

md Rescue_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 SINGLE_PRF=SHA2" + ReBuildCommandLine="del /q /s Release >NUL:
md Release 2>NUL:
nmake.exe /nologo RELEASE=1

del /q /s Release_SHA2 >NUL:
md Release_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2

del /q /s Release_AES >NUL:
md Release_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES

del /q /s Release_AES_SHA2 >NUL:
md Release_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2

del /q /s Release_Serpent >NUL:
md Release_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT

del /q /s Release_Serpent_SHA2 >NUL:
md Release_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2

del /q /s Release_Twofish >NUL:
md Release_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH

del /q /s Release_Twofish_SHA2 >NUL:
md Release_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2

del /q /s Release_Camellia >NUL:
md Release_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA

del /q /s Release_Camellia_SHA2 >NUL:
md Release_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA SINGLE_PRF=SHA2

del /q /s Rescue >NUL:
md Rescue 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1

del /q /s Rescue_SHA2 >NUL:
md Rescue_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_AES >NUL:
md Rescue_AES 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1

del /q /s Rescue_AES_SHA2 >NUL:
md Rescue_AES_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Serpent >NUL:
md Rescue_Serpent 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1

del /q /s Rescue_Serpent_SHA2 >NUL:
md Rescue_Serpent_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Twofish >NUL:
md Rescue_Twofish 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1

del /q /s Rescue_Twofish_SHA2 >NUL:
md Rescue_Twofish_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2

del /q /s Rescue_Camellia >NUL:
md Rescue_Camellia 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1

del /q /s Rescue_Camellia_SHA2 >NUL:
md Rescue_Camellia_SHA2 2>NUL:
nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 SINGLE_PRF=SHA2" + CleanCommandLine="del /q /s Release Release_AES Release_Serpent Release_Twofish Release_Camellia Rescue Rescue_AES Rescue_Serpent Rescue_Twofish Rescue_Camellia >NUL:
del /q /s Release_SHA2 Release_AES_SHA2 Release_Serpent_SHA2 Release_Twofish_SHA2 Release_Camellia_SHA2 Rescue_SHA2 Rescue_AES_SHA2 Rescue_Serpent_SHA2 Rescue_Twofish_SHA2 Rescue_Camellia_SHA2 >NUL:
" Output="Release\BootLoader.com" PreprocessorDefinitions="WIN32;NDEBUG" IncludeSearchPath=""$(SolutionDir)";"$(SolutionDir)\Common";"$(SolutionDir)\Crypto";"$(MSVC16_ROOT)\Include"" @@ -157,6 +157,10 @@ > </File> <File + RelativePath="..\..\Crypto\CamelliaSmall.c" + > + </File> + <File RelativePath="..\..\Crypto\Rmd160.c" > </File> diff --git a/src/Boot/Windows/Boot.vcxproj b/src/Boot/Windows/Boot.vcxproj new file mode 100644 index 00000000..68d5d270 --- /dev/null +++ b/src/Boot/Windows/Boot.vcxproj @@ -0,0 +1,273 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Release Loader|Win32"> + <Configuration>Release Loader</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}</ProjectGuid> + <RootNamespace>Boot</RootNamespace> + <Keyword>MakeFileProj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Makefile</ConfigurationType> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">md Release 2>NUL: +nmake.exe /nologo RELEASE=1 + +md Release_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2 + +md Release_AES 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES + +md Release_AES_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2 + +md Release_Serpent 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT + +md Release_Serpent_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2 + +md Release_Twofish 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH + +md Release_Twofish_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2 + +md Release_Camellia 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA + +md Release_Camellia_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA SINGLE_PRF=SHA2 + +md Rescue 2>NUL: +nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 + +md Rescue_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2 + +md Rescue_AES 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 + +md Rescue_AES_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2 + +md Rescue_Serpent 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 + +md Rescue_Serpent_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2 + +md Rescue_Twofish 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 + +md Rescue_Twofish_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2 + +md Rescue_Camellia 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 + +md Rescue_Camellia_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 SINGLE_PRF=SHA2</NMakeBuildCommandLine> + <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">del /q /s Release >NUL: +md Release 2>NUL: +nmake.exe /nologo RELEASE=1 + +del /q /s Release_SHA2 >NUL: +md Release_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_PRF=SHA2 + +del /q /s Release_AES >NUL: +md Release_AES 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES + +del /q /s Release_AES_SHA2 >NUL: +md Release_AES_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES SINGLE_PRF=SHA2 + +del /q /s Release_Serpent >NUL: +md Release_Serpent 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT + +del /q /s Release_Serpent_SHA2 >NUL: +md Release_Serpent_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT SINGLE_PRF=SHA2 + +del /q /s Release_Twofish >NUL: +md Release_Twofish 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH + +del /q /s Release_Twofish_SHA2 >NUL: +md Release_Twofish_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH SINGLE_PRF=SHA2 + +del /q /s Release_Camellia >NUL: +md Release_Camellia 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA + +del /q /s Release_Camellia_SHA2 >NUL: +md Release_Camellia_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA SINGLE_PRF=SHA2 + +del /q /s Rescue >NUL: +md Rescue 2>NUL: +nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 + +del /q /s Rescue_SHA2 >NUL: +md Rescue_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 RESCUE_DISK=1 SINGLE_PRF=SHA2 + +del /q /s Rescue_AES >NUL: +md Rescue_AES 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 + +del /q /s Rescue_AES_SHA2 >NUL: +md Rescue_AES_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES RESCUE_DISK=1 SINGLE_PRF=SHA2 + +del /q /s Rescue_Serpent >NUL: +md Rescue_Serpent 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 + +del /q /s Rescue_Serpent_SHA2 >NUL: +md Rescue_Serpent_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT RESCUE_DISK=1 SINGLE_PRF=SHA2 + +del /q /s Rescue_Twofish >NUL: +md Rescue_Twofish 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 + +del /q /s Rescue_Twofish_SHA2 >NUL: +md Rescue_Twofish_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH RESCUE_DISK=1 SINGLE_PRF=SHA2 + +del /q /s Rescue_Camellia >NUL: +md Rescue_Camellia 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 + +del /q /s Rescue_Camellia_SHA2 >NUL: +md Rescue_Camellia_SHA2 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=CAMELLIA RESCUE_DISK=1 SINGLE_PRF=SHA2</NMakeReBuildCommandLine> + <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">del /q /s Release Release_AES Release_Serpent Release_Twofish Release_Camellia Rescue Rescue_AES Rescue_Serpent Rescue_Twofish Rescue_Camellia >NUL: +del /q /s Release_SHA2 Release_AES_SHA2 Release_Serpent_SHA2 Release_Twofish_SHA2 Release_Camellia_SHA2 Rescue_SHA2 Rescue_AES_SHA2 Rescue_Serpent_SHA2 Rescue_Twofish_SHA2 Rescue_Camellia_SHA2 >NUL: +</NMakeCleanCommandLine> + <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\BootLoader.com</NMakeOutput> + <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> + <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(MSVC16_ROOT)\Include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> + <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> + <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> + <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">$(Configuration)\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">$(Configuration)\</IntDir> + <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">md Release 2>NUL: +nmake.exe /nologo RELEASE=1 + +md Release_AES 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES + +md Release_Serpent 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT + +md Release_Twofish 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH</NMakeBuildCommandLine> + <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">del /q /s Release >NUL: +md Release 2>NUL: +nmake.exe /nologo RELEASE=1 + +del /q /s Release_AES >NUL: +md Release_AES 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=AES + +del /q /s Release_Serpent >NUL: +md Release_Serpent 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=SERPENT + +del /q /s Release_Twofish >NUL: +md Release_Twofish 2>NUL: +nmake.exe /nologo RELEASE=1 SINGLE_CIPHER=TWOFISH</NMakeReBuildCommandLine> + <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">del /q /s Release Release_AES Release_Serpent Release_Twofish >NUL:</NMakeCleanCommandLine> + <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">Release\BootLoader.com</NMakeOutput> + <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> + <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">$(SolutionDir);$(SolutionDir)\Common;$(SolutionDir)\Crypto;$(MSVC16_ROOT)\Include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> + <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes> + <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath> + <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Loader|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies> + </PropertyGroup> + <ItemDefinitionGroup> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="BootConfig.cpp" /> + <ClCompile Include="BootConsoleIo.cpp" /> + <ClCompile Include="BootDebug.cpp" /> + <ClCompile Include="BootDiskIo.cpp" /> + <ClCompile Include="BootEncryptedIo.cpp" /> + <ClCompile Include="BootMain.cpp" /> + <ClCompile Include="BootMemory.cpp" /> + <ClCompile Include="Decompressor.c" /> + <ClCompile Include="IntFilter.cpp" /> + <ClCompile Include="Platform.cpp" /> + <ClCompile Include="..\..\Common\Crc.c" /> + <ClCompile Include="..\..\Common\Crypto.c" /> + <ClCompile Include="..\..\Common\Endian.c" /> + <ClCompile Include="..\..\Common\Pkcs5.c" /> + <ClCompile Include="..\..\Common\Volumes.c" /> + <ClCompile Include="..\..\Common\Xts.c" /> + <ClCompile Include="..\..\Crypto\AesSmall.c" /> + <ClCompile Include="..\..\Crypto\CamelliaSmall.c" /> + <ClCompile Include="..\..\Crypto\Rmd160.c" /> + <ClCompile Include="..\..\Crypto\Serpent.c" /> + <ClCompile Include="..\..\Crypto\Sha2Small.c" /> + <ClCompile Include="..\..\Crypto\Twofish.c" /> + </ItemGroup> + <ItemGroup> + <None Include="BootCrt.asm" /> + <None Include="BootSector.asm" /> + <None Include="..\..\Crypto\Aes_hw_cpu.asm" /> + <None Include="..\..\Crypto\AesSmall_x86.asm" /> + <None Include="Makefile" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="Bios.h" /> + <ClInclude Include="BootCommon.h" /> + <ClInclude Include="BootConfig.h" /> + <ClInclude Include="BootConsoleIo.h" /> + <ClInclude Include="BootDebug.h" /> + <ClInclude Include="BootDefs.h" /> + <ClInclude Include="BootDiskIo.h" /> + <ClInclude Include="BootEncryptedIo.h" /> + <ClInclude Include="BootMain.h" /> + <ClInclude Include="BootMemory.h" /> + <ClInclude Include="BootStrings.h" /> + <ClInclude Include="IntFilter.h" /> + <ClInclude Include="Platform.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/Boot/Windows/Boot.vcxproj.filters b/src/Boot/Windows/Boot.vcxproj.filters new file mode 100644 index 00000000..1a60ac81 --- /dev/null +++ b/src/Boot/Windows/Boot.vcxproj.filters @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Source Files\Common"> + <UniqueIdentifier>{851ac58e-36e0-4dfa-a208-6da2330f5959}</UniqueIdentifier> + </Filter> + <Filter Include="Source Files\Crypto"> + <UniqueIdentifier>{76da5bdb-fe11-430a-8667-2fe7f9ac3667}</UniqueIdentifier> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Build Files"> + <UniqueIdentifier>{732efef1-4474-4845-aa74-17b852cc0f2e}</UniqueIdentifier> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="BootConfig.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="BootConsoleIo.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="BootDebug.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="BootDiskIo.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="BootEncryptedIo.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="BootMain.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="BootMemory.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Decompressor.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="IntFilter.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="Platform.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\..\Common\Crc.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\..\Common\Crypto.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\..\Common\Endian.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\..\Common\Pkcs5.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\..\Common\Volumes.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\..\Common\Xts.c"> + <Filter>Source Files\Common</Filter> + </ClCompile> + <ClCompile Include="..\..\Crypto\AesSmall.c"> + <Filter>Source Files\Crypto</Filter> + </ClCompile> + <ClCompile Include="..\..\Crypto\CamelliaSmall.c"> + <Filter>Source Files\Crypto</Filter> + </ClCompile> + <ClCompile Include="..\..\Crypto\Rmd160.c"> + <Filter>Source Files\Crypto</Filter> + </ClCompile> + <ClCompile Include="..\..\Crypto\Serpent.c"> + <Filter>Source Files\Crypto</Filter> + </ClCompile> + <ClCompile Include="..\..\Crypto\Sha2Small.c"> + <Filter>Source Files\Crypto</Filter> + </ClCompile> + <ClCompile Include="..\..\Crypto\Twofish.c"> + <Filter>Source Files\Crypto</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <None Include="BootCrt.asm"> + <Filter>Source Files</Filter> + </None> + <None Include="BootSector.asm"> + <Filter>Source Files</Filter> + </None> + <None Include="..\..\Crypto\Aes_hw_cpu.asm"> + <Filter>Source Files\Crypto</Filter> + </None> + <None Include="..\..\Crypto\AesSmall_x86.asm"> + <Filter>Source Files\Crypto</Filter> + </None> + <None Include="Makefile"> + <Filter>Build Files</Filter> + </None> + </ItemGroup> + <ItemGroup> + <ClInclude Include="Bios.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootCommon.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootConfig.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootConsoleIo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootDebug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootDefs.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootDiskIo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootEncryptedIo.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootMain.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootMemory.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="BootStrings.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="IntFilter.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="Platform.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/Boot/Windows/Boot.vcxproj.user b/src/Boot/Windows/Boot.vcxproj.user new file mode 100644 index 00000000..ace9a86a --- /dev/null +++ b/src/Boot/Windows/Boot.vcxproj.user @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +</Project>
\ No newline at end of file diff --git a/src/Boot/Windows/BootCommon.h b/src/Boot/Windows/BootCommon.h index 0d4f710d..ea63c08b 100644 --- a/src/Boot/Windows/BootCommon.h +++ b/src/Boot/Windows/BootCommon.h @@ -3,7 +3,7 @@ Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. - Modifications and additions to the original source code (contained in this file) + Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2016 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -78,5 +78,137 @@ typedef struct #define TC_SET_BOOT_ARGUMENTS_SIGNATURE(SG) do { SG[0] = 'T'; SG[1] = 'R'; SG[2] = 'U'; SG[3] = 'E'; SG[4] = 0x11; SG[5] = 0x23; SG[6] = 0x45; SG[7] = 0x66; } while (FALSE) #define TC_IS_BOOT_ARGUMENTS_SIGNATURE(SG) (SG[0] == 'T' && SG[1] == 'R' && SG[2] == 'U' && SG[3] == 'E' && SG[4] == 0x11 && SG[5] == 0x23 && SG[6] == 0x45 && SG[7] == 0x66) +#if !defined(TC_WINDOWS_BOOT) + +#define DCS_DISK_ENTRY_LIST_HEADER_SIGN SIGNATURE_64 ('D','C','S','D','E','L','S','T') + +#define DE_IDX_CRYPTOHEADER 0 +#define DE_IDX_LIST 1 +#define DE_IDX_DISKID 2 +#define DE_IDX_MAINGPTHDR 3 +#define DE_IDX_MAINGPTENTRYS 4 +#define DE_IDX_ALTGPTHDR 5 +#define DE_IDX_ALTGPTENTRYS 6 +#define DE_IDX_EXEC 7 +#define DE_IDX_PWDCACHE 8 +#define DE_IDX_RND 9 +#define DE_IDX_TOTAL 10 +static_assert(DE_IDX_TOTAL <= 15, "DE_IDX_TOTAL too big"); + +enum DcsDiskEntryTypes { + DE_Unused = 0, + DE_Sectors, + DE_List, + DE_DISKID, + DE_ExecParams, + DE_PwdCache, + DE_Rnd +}; + +#pragma pack(1) +typedef struct _SECREGION_BOOT_PARAMS { + uint64 Ptr; + uint32 Size; + uint32 Crc; +} SECREGION_BOOT_PARAMS; + +typedef struct { + uint32 Data1; + uint16 Data2; + uint16 Data3; + byte Data4[8]; +} DCS_GUID; + +// DE types +typedef struct _DCS_DISK_ENTRY_SECTORS { + uint32 Type; + uint32 Offset; // Offset in memory + uint64 Reserved; + uint64 Start; // Start on disk (byte) + uint64 Length; // length on disk (byte) +} DCS_DISK_ENTRY_SECTORS; +static_assert(sizeof(DCS_DISK_ENTRY_SECTORS) == 32, "Wrong size DCS_DISK_ENTRY_SECTORS"); + +typedef struct _DCS_DISK_ENTRY_PARAMS { + uint32 Type; + uint32 Offset; + uint64 Reserved[2]; + uint64 Length; // size of data +} DCS_DISK_ENTRY_PARAMS; +static_assert(sizeof(DCS_DISK_ENTRY_PARAMS) == 32, "Wrong size DCS_DISK_ENTRY_PARAMS"); + +typedef struct _DCS_DISK_ENTRY_DISKID { + uint32 Type; + uint32 MbrID; + uint64 ReservedDiskId; + DCS_GUID GptID; +} DCS_DISK_ENTRY_DISKID; +static_assert(sizeof(DCS_DISK_ENTRY_DISKID) == 32, "Wrong size DCS_DISK_ENTRY_DISKID"); + +#pragma warning(disable:4201) +typedef struct _DCS_DISK_ENTRY { + union { + struct { + uint32 Type; + uint32 Offset; + byte reserved[16]; + uint64 Length; // size of structure at Offset + }; + DCS_DISK_ENTRY_SECTORS Sectors; + DCS_DISK_ENTRY_DISKID DiskId; + DCS_DISK_ENTRY_PARAMS Prm; + }; +} DCS_DISK_ENTRY; +#pragma warning(default:4201) +static_assert(sizeof(DCS_DISK_ENTRY) == 32, "Wrong size DCS_DISK_ENTRY"); + +// Static compile time checks field offsets +#ifndef FIELD_OFFSET +#define FIELD_OFFSET(t, f) ((UINTN)(&((t*)0)->f)) +#endif +static_assert(FIELD_OFFSET(DCS_DISK_ENTRY, Type) == FIELD_OFFSET(DCS_DISK_ENTRY_SECTORS, Type), "Wrong Type offset"); +static_assert(FIELD_OFFSET(DCS_DISK_ENTRY, Type) == FIELD_OFFSET(DCS_DISK_ENTRY_DISKID, Type), "Wrong Type offset"); +static_assert(FIELD_OFFSET(DCS_DISK_ENTRY, Type) == FIELD_OFFSET(DCS_DISK_ENTRY_PARAMS, Type), "Wrong Type offset"); +static_assert(FIELD_OFFSET(DCS_DISK_ENTRY, Length) == FIELD_OFFSET(DCS_DISK_ENTRY_SECTORS, Length), "Wrong Length offset"); +static_assert(FIELD_OFFSET(DCS_DISK_ENTRY, Length) == FIELD_OFFSET(DCS_DISK_ENTRY_PARAMS, Length), "Wrong Length offset"); +static_assert(FIELD_OFFSET(DCS_DISK_ENTRY, Offset) == FIELD_OFFSET(DCS_DISK_ENTRY_SECTORS, Offset), "Wrong Offset offset"); +static_assert(FIELD_OFFSET(DCS_DISK_ENTRY, Offset) == FIELD_OFFSET(DCS_DISK_ENTRY_PARAMS, Offset), "Wrong Offset offset"); + +// DE type specific data +// DE List +typedef struct _DCS_DISK_ENTRY_LIST { + // EFI_TABLE_HEADER + uint64 Signature; + uint32 Revision; + uint32 HeaderSize; //< The size, in bytes, of the entire table including the EFI_TABLE_HEADER. + uint32 CRC32; //< The 32-bit CRC for the entire table. This value is computed by setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes. + uint32 Reserved; //< Reserved field that must be set to 0. + // + uint32 Count; + uint32 DataSize; + // + DCS_DISK_ENTRY DE[15]; +} DCS_DISK_ENTRY_LIST; +static_assert(sizeof(DCS_DISK_ENTRY_LIST) == 512, "Wrong size DCS_DISK_ENTRY_LIST"); + +typedef struct _DCS_DEP_EXEC { + DCS_GUID ExecPartGuid; + uint16 ExecCmd[248]; +} DCS_DEP_EXEC; +static_assert(sizeof(DCS_DEP_EXEC) == 512, "Wrong size DCS_DEP_EXEC"); + +#define DCS_DEP_PWD_CACHE_SIGN SIGNATURE_64 ('P','W','D','C','A','C','H','E') +typedef struct _DCS_DEP_PWD_CACHE { + uint64 Sign; + uint32 CRC; + uint32 Count; + Password Pwd[4]; + int32 Pim[4]; + byte pad[512 - 8 - 4 - 4 - (sizeof(Password) + 4) * 4]; +} DCS_DEP_PWD_CACHE; +static_assert(sizeof(DCS_DEP_PWD_CACHE) == 512, "Wrong size DCS_DEP_PWD_CACHE"); +#pragma pack() + +#endif // #if !defined(TC_WINDOWS_BOOT) #endif // TC_HEADER_Boot_BootCommon diff --git a/src/Boot/Windows/BootDefs.h b/src/Boot/Windows/BootDefs.h index 1fc923ae..3db227fd 100644 --- a/src/Boot/Windows/BootDefs.h +++ b/src/Boot/Windows/BootDefs.h @@ -29,6 +29,8 @@ # define TC__BOOT_MEMORY_REQUIRED 33 # elif defined (TC_WINDOWS_BOOT_TWOFISH) # define TC__BOOT_MEMORY_REQUIRED 41 +# elif defined (TC_WINDOWS_BOOT_CAMELLIA) +# define TC__BOOT_MEMORY_REQUIRED 31 # endif #if 0 @@ -100,6 +102,7 @@ #define TC__BOOT_USER_CFG_FLAG_DISABLE_ESC TC_HEX (02) #define TC__BOOT_USER_CFG_FLAG_DISABLE_HW_ENCRYPTION TC_HEX (04) #define TC__BOOT_USER_CFG_FLAG_DISABLE_PIM TC_HEX (08) +#define TC__BOOT_USER_CFG_FLAG_STORE_HASH TC_HEX (10) // The following items are treated as a 2-bit value (apply TC_BOOT_CFG_MASK_HIDDEN_OS_CREATION_PHASE to obtain the value) #define TC__HIDDEN_OS_CREATION_PHASE_NONE 0 @@ -189,6 +192,7 @@ TC_HIDDEN_OS_CREATION_PHASE_WIPED = TC__HIDDEN_OS_CREATION_PHASE_WIPED #define TC_BOOT_USER_CFG_FLAG_DISABLE_ESC TC__BOOT_USER_CFG_FLAG_DISABLE_ESC #define TC_BOOT_USER_CFG_FLAG_DISABLE_HW_ENCRYPTION TC__BOOT_USER_CFG_FLAG_DISABLE_HW_ENCRYPTION #define TC_BOOT_USER_CFG_FLAG_DISABLE_PIM TC__BOOT_USER_CFG_FLAG_DISABLE_PIM +#define TC_BOOT_USER_CFG_FLAG_STORE_HASH TC__BOOT_USER_CFG_FLAG_STORE_HASH #define TC_HIDDEN_OS_CREATION_PHASE_NONE TC__HIDDEN_OS_CREATION_PHASE_NONE #define TC_HIDDEN_OS_CREATION_PHASE_CLONING TC__HIDDEN_OS_CREATION_PHASE_CLONING #define TC_HIDDEN_OS_CREATION_PHASE_WIPING TC__HIDDEN_OS_CREATION_PHASE_WIPING @@ -196,4 +200,11 @@ TC_HIDDEN_OS_CREATION_PHASE_WIPED = TC__HIDDEN_OS_CREATION_PHASE_WIPED #endif // TC_ASM_PREPROCESS +#define EFI_BOOTARGS_REGIONS_LOW 0x90000, 0x88000, 0x80000 +#define EFI_BOOTARGS_REGIONS_HIGH \ +0x100000, 0x200000, 0x300000, 0x400000, 0x500000, 0x600000, 0x700000, 0x800000, \ +0x900000, 0xA00000, 0xB00000, 0xC00000, 0xD00000, 0xE00000, 0xF00000, 0x1000000 + +#define EFI_BOOTARGS_REGIONS EFI_BOOTARGS_REGIONS_LOW, EFI_BOOTARGS_REGIONS_HIGH + #endif // TC_HEADER_Boot_BootDefs diff --git a/src/Boot/Windows/Makefile b/src/Boot/Windows/Makefile index 8377520b..c0f5d62f 100644 --- a/src/Boot/Windows/Makefile +++ b/src/Boot/Windows/Makefile @@ -104,6 +104,9 @@ OBJS = $(OBJS) $(OUTDIR)\Serpent.obj OBJS = $(OBJS) $(OUTDIR)\Twofish.obj !endif +!if "$(SINGLE_CIPHER)" == "CAMELLIA" +OBJS = $(OBJS) $(OUTDIR)\CamelliaSmall.obj +!endif all: env $(TARGETS) |