mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 03:18:26 -06:00
wolfCrypt as crypto backend for VeraCrypt (#1227)
* wolfCrypt as crypto backend for VeraCrypt * Refactor to use EncryptionModeWolfCryptXTS class
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
|
||||
#include "System.h"
|
||||
#include "Volume/EncryptionModeXTS.h"
|
||||
#ifdef WOLFCRYPT_BACKEND
|
||||
#include "Volume/EncryptionModeWolfCryptXTS.h"
|
||||
#endif
|
||||
#include "Main/GraphicUserInterface.h"
|
||||
#include "BenchmarkDialog.h"
|
||||
|
||||
@@ -209,9 +212,13 @@ namespace VeraCrypt
|
||||
|
||||
Buffer key (ea->GetKeySize());
|
||||
ea->SetKey (key);
|
||||
|
||||
#ifdef WOLFCRYPT_BACKEND
|
||||
shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS);
|
||||
ea->SetKeyXTS (key);
|
||||
#else
|
||||
shared_ptr <EncryptionMode> xts (new EncryptionModeXTS);
|
||||
xts->SetKey (key);
|
||||
#endif
|
||||
xts->SetKey (key);
|
||||
ea->SetMode (xts);
|
||||
|
||||
wxLongLong startTime = wxGetLocalTimeMillis();
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
|
||||
#include "System.h"
|
||||
#include "Volume/EncryptionModeXTS.h"
|
||||
#ifdef WOLFCRYPT_BACKEND
|
||||
#include "Volume/EncryptionModeWolfCryptXTS.h"
|
||||
#endif
|
||||
#include "Volume/EncryptionTest.h"
|
||||
#include "Main/GraphicUserInterface.h"
|
||||
#include "EncryptionTestDialog.h"
|
||||
@@ -94,8 +97,13 @@ namespace VeraCrypt
|
||||
throw StringConversionFailed (SRC_POS);
|
||||
}
|
||||
|
||||
#ifdef WOLFCRYPT_BACKEND
|
||||
shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS);
|
||||
ea->SetKeyXTS (secondaryKey);
|
||||
#else
|
||||
shared_ptr <EncryptionMode> xts (new EncryptionModeXTS);
|
||||
xts->SetKey (secondaryKey);
|
||||
#endif
|
||||
xts->SetKey (secondaryKey);
|
||||
ea->SetMode (xts);
|
||||
|
||||
Buffer sector (ENCRYPTION_DATA_UNIT_SIZE);
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
#include "System.h"
|
||||
#include "Volume/EncryptionModeXTS.h"
|
||||
#ifdef WOLFCRYPT_BACKEND
|
||||
#include "Volume/EncryptionModeWolfCryptXTS.h"
|
||||
#endif
|
||||
#include "Main/GraphicUserInterface.h"
|
||||
#include "Common/PCSCException.h"
|
||||
#include "Common/SecurityToken.h"
|
||||
|
||||
Reference in New Issue
Block a user