From 76d3bc631eff60841026f2526d69f6d661d218a3 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 2 Jun 2016 00:10:39 +0200 Subject: Crypto: Add support for Japanese encryption standard Camellia, including for system encryption. --- src/Common/Volumes.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Common/Volumes.c') diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c index 007a1c08..2f30a33e 100644 --- a/src/Common/Volumes.c +++ b/src/Common/Volumes.c @@ -667,6 +667,8 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR serpent_set_key (dk, cryptoInfo->ks); #elif defined (TC_WINDOWS_BOOT_TWOFISH) twofish_set_key ((TwofishInstance *) cryptoInfo->ks, (const u4byte *) dk); + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + camellia_set_key (dk, cryptoInfo->ks); #else status = EAInit (dk, cryptoInfo->ks); if (status == ERR_CIPHER_INIT_FAILURE) @@ -683,6 +685,8 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR serpent_set_key (dk + 32, cryptoInfo->ks2); #elif defined (TC_WINDOWS_BOOT_TWOFISH) twofish_set_key ((TwofishInstance *)cryptoInfo->ks2, (const u4byte *) (dk + 32)); + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + camellia_set_key (dk + 32, cryptoInfo->ks2); #else EAInit (dk + 32, cryptoInfo->ks2); #endif @@ -742,6 +746,8 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR serpent_set_key (dk, cryptoInfo->ks); #elif defined (TC_WINDOWS_BOOT_TWOFISH) twofish_set_key ((TwofishInstance *) cryptoInfo->ks, (const u4byte *) dk); + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + camellia_set_key (dk, cryptoInfo->ks); #else status = EAInit (dk, cryptoInfo->ks); if (status == ERR_CIPHER_INIT_FAILURE) @@ -759,6 +765,8 @@ int ReadVolumeHeader (BOOL bBoot, char *header, Password *password, int pim, PCR serpent_set_key (dk + 32, cryptoInfo->ks2); #elif defined (TC_WINDOWS_BOOT_TWOFISH) twofish_set_key ((TwofishInstance *)cryptoInfo->ks2, (const u4byte *) (dk + 32)); + #elif defined (TC_WINDOWS_BOOT_CAMELLIA) + camellia_set_key (dk + 32, cryptoInfo->ks2); #else EAInit (dk + 32, cryptoInfo->ks2); #endif -- cgit v1.2.3