VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main
AgeCommit message (Expand)AuthorFilesLines
2015-04-26Linux: in command line, support hash algorithm names without '-' as on Window...Mounir IDRASSI1-3/+9
2015-04-19Linux: Correct wxWidgets assert warnings when displaying about/LegalNotice di...Mounir IDRASSI2-4/+2
2015-04-19Linux installer: Add support for kdesudo and correct usage of konsole externa...Mounir IDRASSI1-1/+1
2015-04-06MacOSX: Correctly handle OSX dock "reopen-application" event and Cocoa openFi...Mounir IDRASSI2-4/+15
2015-04-06Linux/MaxOSX: correctly detect type of internal exceptionsMounir IDRASSI2-6/+9
2015-04-06MacOSX: solve issue volumes not auto-dismounting when quitting VeraCrypt. res...Mounir IDRASSI2-2/+63
2015-04-05Linux/MacOSX: Always add the source location when system exception occur in o...Mounir IDRASSI1-2/+1
2015-04-05Linux/MacOSX: correctly handle some internal exception classes that were miss...Mounir IDRASSI1-0/+4
2015-03-08Linux/MacOSX: Load preferences if only volume path is given in command line a...Mounir IDRASSI3-6/+23
2015-02-28Linux/MacOSX: A configuration option for default hash and default TrueCrypt m...Mounir IDRASSI8-6/+410
2015-02-27Linux/MacOSX: Modify wxFormBuilder generated files directly to solve the 'X' ...Mounir IDRASSI1-6/+6
2015-02-27Revert "Linux/MacOSX: solve the 'X' icon not closing some dialog. This was ca...Mounir IDRASSI8-14/+14
2015-02-16Linux/MacOSX: solve the 'X' icon not closing some dialog. This was caused by ...Mounir IDRASSI8-14/+14
2015-02-13Linux: Perform a quick NTFS formatting by adding the "-f" switch to mkfs.ntfs...Mounir IDRASSI1-0/+4
2015-02-11Linux: modify installer script to make it run when the "less" command doesn't...Mounir IDRASSI1-1/+1
2015-02-10Linux: Add graphical installer support when xterm is not available (Linux Min...Mounir IDRASSI1-1/+1
2015-02-08Linux: solve rare issue where VeraCrypt wrongly reports that another instance...Mounir IDRASSI1-3/+21
2015-02-08Linux: When not under Gnome/KDE, use xdg-open to open the mounted volume if i...Mounir IDRASSI1-1/+17
2015-02-08Linux/MacOSX: use command line values of TrueCryptMode and PRF as defaults fo...Mounir IDRASSI6-9/+33
2015-01-04Linux/MacOSX: Add wait dialog to the benchmark computation. Correct handling ...Mounir IDRASSI4-22/+42
2015-01-04Linux/MacOSX: make the cancel button work on the preferences dialog.Mounir IDRASSI1-1/+1
2015-01-04Linux/MacOSX: change cascade encryption naming format in the UI as it was don...Mounir IDRASSI4-5/+5
2015-01-03Linux/MacOSX: workaround for wxWidgets bug in the method wxTextEntry::IsEmpty...Mounir IDRASSI1-1/+1
2015-01-02Linux: solve link error on recent Ubuntu when using shared wxWidgets.Mounir IDRASSI1-1/+1
2014-12-30Linux/MacOSX: code refactoring and cleanup.Mounir IDRASSI2-28/+25
2014-12-30Linux/MacOSX: Implement TrueCrypt conversion and loading support. Correct man...Mounir IDRASSI21-72/+374
2014-12-28Linux/MacOSX: Add possibility to choose 1-pass wipe mode without changing the...Mounir IDRASSI2-4/+4
2014-12-26Linux/MacOSX: Implement waiting dialog for lengthy operations in order to hav...Mounir IDRASSI15-18/+658
2014-12-20Linux: update the embedded data index inside the installer because the licens...Mounir IDRASSI1-1/+1
2014-12-20Linux/MacOSX: Add a donation menu entryMounir IDRASSI4-0/+23
2014-12-20Linux/MacOSX: remove calls to non existent class VolumeLayoutV1HiddenMounir IDRASSI2-4/+4
2014-12-20Reduce time for reporting wrong password by removing support for legacy hidde...Mounir IDRASSI1-2/+2
2014-12-19Linux/MacOSX: Enhance performance by implementing the possibility to choose t...Mounir IDRASSI16-20/+95
2014-12-11Linux/macOSX: always display random gathering dialog/interface before perform...Mounir IDRASSI3-0/+20
2014-12-11Linux/MacOSX: Implement generating more than one keyfile, specifying the size...Mounir IDRASSI6-11/+948
2014-12-07MacOSX/Linux: Solve truncated text in some Wizard windows by defining a large...VeraCrypt_1.0f-BETA2Mounir IDRASSI3-9/+9
2014-12-04Linux/macOSX: handle project URLs using the new valuesMounir IDRASSI1-38/+107
2014-11-08Linux/MacOSX: solve compilation warning by explicitly converting wxCStrData t...Mounir IDRASSI1-2/+2
2014-11-08Replace deprecated wxTextValidator::SetBellOnError whose logic whose inverted...Mounir IDRASSI1-2/+4
2014-11-08MacOSX: fix warning by displacing declaration of variable used only under LinuxMounir IDRASSI1-1/+1
2014-11-08Linux/MacOSX: Remove static size values from GUI in order to let wxWidgets ca...Mounir IDRASSI3-11/+20
2014-11-08Linux: remove workaround for wxFileType::GetOpenCommand bug in handling path ...Mounir IDRASSI1-5/+0
2014-11-08Linux: Support NTFS formatting of volume. We use mkfs.ntfs so it needs to be ...Mounir IDRASSI3-0/+4
2014-11-08MacOSX : Update Main Makefile to used the new package name that include the v...VeraCrypt_MacOSX_1.0dMounir IDRASSI1-1/+1
2014-11-08MacOSX : Correct typos in Main MakefileMounir IDRASSI1-3/+3
2014-11-08MacOSX : change OSXFuse error message to indicate the MacFUSE compatibility l...Mounir IDRASSI1-1/+1
2014-11-08MacOSX : modify Makefile to automatically build and sign the MacOSX installer...Mounir IDRASSI1-1/+3
2014-11-08MacOSX : Since we link directly with OSXFuse, change error message to indicat...Mounir IDRASSI1-1/+1
2014-11-08MacOSX : Copy console version of VeraCrypt inside the bundle under the name v...Mounir IDRASSI1-0/+11
2014-11-08MacOSX : Update Fuse error message to display OSXFUSE requirement alongside M...Mounir IDRASSI1-1/+1
ss="n">Wrap (RightSizer->GetSize().GetWidth()); list <size_t> bufferSizes; bufferSizes.push_back (1 * BYTES_PER_MB); bufferSizes.push_back (5 * BYTES_PER_MB); bufferSizes.push_back (10 * BYTES_PER_MB); bufferSizes.push_back (50 * BYTES_PER_MB); bufferSizes.push_back (100 * BYTES_PER_MB); bufferSizes.push_back (200 * BYTES_PER_MB); bufferSizes.push_back (500 * BYTES_PER_MB); bufferSizes.push_back (1 * BYTES_PER_GB); foreach (size_t size, bufferSizes) { BufferSizeChoice->Append (Gui->SizeToString (size), (void *) size); } BenchmarkChoice->Select (0); BufferSizeChoice->Select (1); UpdateBenchmarkList (); wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc. const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" }; validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr)); VolumePimText->SetValidator (validator); Layout(); Fit(); Center(); } void BenchmarkDialog::UpdateBenchmarkList () { int index = BenchmarkChoice->GetSelection (); if (index == 1) { // PRF case m_volumePimLabel->Show (); VolumePimText->Show (); BufferSizeChoice->Hide (); m_bufferSizeLabel->Hide (); } else { m_volumePimLabel->Hide (); VolumePimText->Hide (); BufferSizeChoice->Show (); m_bufferSizeLabel->Show (); } BenchmarkListCtrl->DeleteAllItems(); BenchmarkListCtrl->DeleteAllColumns(); if (index == 0) { // encryption case list <int> colPermilles; BenchmarkListCtrl->InsertColumn (ColumnAlgorithm, LangString["ALGORITHM"], wxLIST_FORMAT_LEFT, 1); colPermilles.push_back (322); BenchmarkListCtrl->InsertColumn (ColumnEncryption, LangString["ENCRYPTION"], wxLIST_FORMAT_RIGHT, 1); colPermilles.push_back (226); BenchmarkListCtrl->InsertColumn (ColumnDecryption, LangString["DECRYPTION"], wxLIST_FORMAT_RIGHT, 1); colPermilles.push_back (226); BenchmarkListCtrl->InsertColumn (ColumnMean, LangString["MEAN"], wxLIST_FORMAT_RIGHT, 1); colPermilles.push_back (226); Gui->SetListCtrlWidth (BenchmarkListCtrl, 62, false); Gui->SetListCtrlHeight (BenchmarkListCtrl, 14); Gui->SetListCtrlColumnWidths (BenchmarkListCtrl, colPermilles); } else if (index == 1) { // PRF case list <int> colPermilles; BenchmarkListCtrl->InsertColumn (ColumnAlgorithm, LangString["ALGORITHM"], wxLIST_FORMAT_LEFT, 1); colPermilles.push_back (322); BenchmarkListCtrl->InsertColumn (ColumnTime, LangString["TIME"], wxLIST_FORMAT_RIGHT, 1); colPermilles.push_back (226); BenchmarkListCtrl->InsertColumn (ColumnIterations, LangString["ITERATIONS"], wxLIST_FORMAT_RIGHT, 1); colPermilles.push_back (226); Gui->SetListCtrlWidth (BenchmarkListCtrl, 62, false); Gui->SetListCtrlHeight (BenchmarkListCtrl, 14); Gui->SetListCtrlColumnWidths (BenchmarkListCtrl, colPermilles); } else { // Hash case list <int> colPermilles; BenchmarkListCtrl->InsertColumn (ColumnAlgorithm, LangString["ALGORITHM"], wxLIST_FORMAT_LEFT, 1); colPermilles.push_back (322); BenchmarkListCtrl->InsertColumn (ColumnEncryption, LangString["MEAN"], wxLIST_FORMAT_RIGHT, 1); colPermilles.push_back (226); Gui->SetListCtrlWidth (BenchmarkListCtrl, 62, false); Gui->SetListCtrlHeight (BenchmarkListCtrl, 14); Gui->SetListCtrlColumnWidths (BenchmarkListCtrl, colPermilles); } } void BenchmarkDialog::OnBenchmarkChoiceSelected (wxCommandEvent& event) { UpdateBenchmarkList (); Layout(); Fit(); } void BenchmarkDialog::OnBenchmarkButtonClick (wxCommandEvent& event) { list <BenchmarkResult> results; wxBusyCursor busy; int opIndex = BenchmarkChoice->GetSelection (); Buffer buffer ((opIndex == 1)? sizeof (unsigned long) : (size_t) Gui->GetSelectedData <size_t> (BufferSizeChoice)); if (opIndex == 1) { unsigned long pim = 0; if (!VolumePimText->GetValue().ToULong (&pim)) pim = 0; memcpy (buffer.Ptr (), &pim, sizeof (unsigned long)); } BenchmarkThreadRoutine routine(this, results, buffer, opIndex); Gui->ExecuteWaitThreadRoutine (this, &routine); BenchmarkListCtrl->DeleteAllItems(); foreach (const BenchmarkResult &result, results) { vector <wstring> fields (BenchmarkListCtrl->GetColumnCount()); fields[ColumnAlgorithm] = result.AlgorithmName; if (opIndex == 0) { fields[ColumnEncryption] = Gui->SpeedToString (result.EncryptionSpeed); fields[ColumnDecryption] = Gui->SpeedToString (result.DecryptionSpeed); fields[ColumnMean] = Gui->SpeedToString (result.MeanSpeed); } else if (opIndex == 1) { fields[ColumnTime] = wxString::Format (wxT("%llu ms"), (unsigned long long) result.Time); fields[ColumnIterations] = wxString::Format (wxT("%llu"), (unsigned long long) result.Iterations); } else { fields[ColumnHashMean] = Gui->SpeedToString (result.MeanSpeed); } Gui->AppendToListCtrl (BenchmarkListCtrl, fields); } BenchmarkListCtrl->SetColumnWidth(0, wxLIST_AUTOSIZE); wxSize minSize = BenchmarkListCtrl->GetBestSize (); minSize.IncBy (10, 20); BenchmarkListCtrl->SetMinSize(minSize); Layout (); Fit(); } void BenchmarkDialog::DoBenchmark (list<BenchmarkResult>& results, Buffer& buffer, int opIndex) { try { if (opIndex == 0) { EncryptionAlgorithmList encryptionAlgorithms = EncryptionAlgorithm::GetAvailableAlgorithms(); foreach (shared_ptr <EncryptionAlgorithm> ea, encryptionAlgorithms) { if (!ea->IsDeprecated()) { BenchmarkResult result; result.AlgorithmName = ea->GetName(true); Buffer key (ea->GetKeySize()); ea->SetKey (key); shared_ptr <EncryptionMode> xts (new EncryptionModeXTS); xts->SetKey (key); ea->SetMode (xts); wxLongLong startTime = wxGetLocalTimeMillis(); // CPU "warm up" (an attempt to prevent skewed results on systems where CPU frequency gradually changes depending on CPU load). do { ea->EncryptSectors (buffer, 0, buffer.Size() / ENCRYPTION_DATA_UNIT_SIZE, ENCRYPTION_DATA_UNIT_SIZE); } while (wxGetLocalTimeMillis().GetValue() - startTime.GetValue() < 20); uint64 size = 0; uint64 time; startTime = wxGetLocalTimeMillis(); do { ea->EncryptSectors (buffer, 0, buffer.Size() / ENCRYPTION_DATA_UNIT_SIZE, ENCRYPTION_DATA_UNIT_SIZE); size += buffer.Size(); time = (uint64) (wxGetLocalTimeMillis().GetValue() - startTime.GetValue()); } while (time < 100); result.EncryptionSpeed = size * 1000 / time; startTime = wxGetLocalTimeMillis(); size = 0; do { ea->DecryptSectors (buffer, 0, buffer.Size() / ENCRYPTION_DATA_UNIT_SIZE, ENCRYPTION_DATA_UNIT_SIZE); size += buffer.Size(); time = (uint64) (wxGetLocalTimeMillis().GetValue() - startTime.GetValue()); } while (time < 100); result.DecryptionSpeed = size * 1000 / time; result.MeanSpeed = (result.EncryptionSpeed + result.DecryptionSpeed) / 2; bool inserted = false; for (list <BenchmarkResult>::iterator i = results.begin(); i != results.end(); ++i) { if (i->MeanSpeed < result.MeanSpeed) { results.insert (i, result); inserted = true; break; } } if (!inserted) results.push_back (result); } } } else if (opIndex == 1) { Buffer dk(MASTER_KEYDATA_SIZE); Buffer salt(64); const char *tmp_salt = {"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF"}; unsigned long pim; Pkcs5KdfList prfList = Pkcs5Kdf::GetAvailableAlgorithms (false); VolumePassword password ((const byte*) "passphrase-1234567890", 21); memcpy (&pim, buffer.Ptr (), sizeof (unsigned long)); memcpy (salt.Ptr(), tmp_salt, 64); foreach (shared_ptr <Pkcs5Kdf> prf, prfList) { if (!prf->IsDeprecated()) { BenchmarkResult result; result.AlgorithmName = prf->GetName (); result.Iterations = (uint64) prf->GetIterationCount (pim); uint64 time; wxLongLong startTime = wxGetLocalTimeMillis(); for (int i = 1; i <= 2; i++) { prf->DeriveKey (dk, password, pim, salt); } time = (uint64) (wxGetLocalTimeMillis().GetValue() - startTime.GetValue()); result.Time = time / 2; bool inserted = false; for (list <BenchmarkResult>::iterator i = results.begin(); i != results.end(); ++i) { if (i->Time > result.Time) { results.insert (i, result); inserted = true; break; } } if (!inserted) results.push_back (result); } } } else { Buffer digest (1024); HashList hashAlgorithms = Hash::GetAvailableAlgorithms (); foreach (shared_ptr <Hash> hash, hashAlgorithms) { if (!hash->IsDeprecated()) { BenchmarkResult result; result.AlgorithmName = hash->GetName (); uint64 size = 0; uint64 time; wxLongLong startTime = wxGetLocalTimeMillis(); // CPU "warm up" (an attempt to prevent skewed results on systems where CPU frequency gradually changes depending on CPU load). do { hash->Init (); hash->ProcessData (digest); hash->GetDigest (digest); } while (wxGetLocalTimeMillis().GetValue() - startTime.GetValue() < 100); startTime = wxGetLocalTimeMillis(); do { hash->Init (); hash->ProcessData (buffer); hash->GetDigest (digest); time = (uint64) (wxGetLocalTimeMillis().GetValue() - startTime.GetValue()); size += buffer.Size (); } while (time < 2000); result.MeanSpeed = size * 1000 / time; bool inserted = false; for (list <BenchmarkResult>::iterator i = results.begin(); i != results.end(); ++i) { if (i->MeanSpeed < result.MeanSpeed) { results.insert (i, result); inserted = true; break; } } if (!inserted) results.push_back (result); } } } } catch (exception &e) { Gui->ShowError (e); } } }