1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08: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:
lealem47
2023-11-12 16:51:31 -07:00
committed by GitHub
parent 458be85f84
commit 9247ce1bb9
36 changed files with 1104 additions and 220 deletions

View File

@@ -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();