Skip to content

Commit

Permalink
Merge pull request #10 from cthoeing/v3.5.1
Browse files Browse the repository at this point in the history
Version 3.5.1
  • Loading branch information
cthoeing authored Aug 1, 2023
2 parents 179942f + fa2c8c7 commit 3bb6398
Show file tree
Hide file tree
Showing 80 changed files with 2,543 additions and 3,226 deletions.
34 changes: 18 additions & 16 deletions PwTech.cbproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<ProjectType>CppVCLApplication</ProjectType>
<PackageImports>inet;$(PackageImports)</PackageImports>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
<AllPackageLibs>rtl.lib;vcl.lib;bcbsmp.lib;vclx.lib;vclimg.lib;vclwinx.lib;bindengine.lib</AllPackageLibs>
<AllPackageLibs>rtl.lib;vcl.lib;bcbsmp.lib;vclx.lib;vclimg.lib;vclwinx.lib;bindengine.lib;dbrtl.lib;dsnap.lib</AllPackageLibs>
<_TCHARMapping>wchar_t</_TCHARMapping>
<Multithreaded>true</Multithreaded>
<Icon_MainIcon>$(BDS)\bin\cbuilder_PROJECTICON.ico</Icon_MainIcon>
Expand Down Expand Up @@ -126,7 +126,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<LinkPackageImports>rtl.bpi;vcl.bpi;bcbsmp.bpi;vclx.bpi;vclimg.bpi;vclwinx.bpi;bindengine.bpi</LinkPackageImports>
<LinkPackageImports>rtl.bpi;vcl.bpi;bcbsmp.bpi;vclx.bpi;vclimg.bpi;vclwinx.bpi;bindengine.bpi;dbrtl.bpi;dsnap.bpi</LinkPackageImports>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=3.2.0.0;InternalName=;LegalCopyright=Copyright (c) 2002-2020 Christian Thöing;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.2.0.0;Comments=</VerInfo_Keys>
Expand All @@ -146,21 +146,22 @@
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<LinkPackageStatics>rtl.lib;vcl.lib;bcbsmp.lib;vclx.lib;vclimg.lib;vclwinx.lib;bindengine.lib</LinkPackageStatics>
<LinkPackageStatics>rtl.lib;vcl.lib;bcbsmp.lib;vclx.lib;vclimg.lib;vclwinx.lib;bindengine.lib;dbrtl.lib;dsnap.lib</LinkPackageStatics>
<Icon_MainIcon>graphics\pwtech.ico</Icon_MainIcon>
<Defines>LUA_INT_TYPE=1;$(Defines)</Defines>
<VerInfo_MajorVer>3</VerInfo_MajorVer>
<VerInfo_Keys>CompanyName=;FileDescription=Password Tech executable;FileVersion=3.5.0.0;InternalName=;LegalCopyright=Copyright 2002-2023 by Christian Thöing;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=Password Tech;ProductVersion=3.5.0;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=;FileDescription=Password Tech executable;FileVersion=3.5.1.0;InternalName=;LegalCopyright=Copyright 2002-2023 by Christian Thöing;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=Password Tech;ProductVersion=3.5.1;Comments=</VerInfo_Keys>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<BCC_UseClassicCompiler>false</BCC_UseClassicCompiler>
<VerInfo_MinorVer>5</VerInfo_MinorVer>
<BT_BuildType>Debug</BT_BuildType>
<BCC_OptimizeMaximum>true</BCC_OptimizeMaximum>
<BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
<VerInfo_Release>1</VerInfo_Release>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<VerInfo_Locale>1031</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=Password Tech executable;FileVersion=3.5.0.0;InternalName=;LegalCopyright=Copyright (c) 2002-2023 Christian Thöing;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.5.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=Password Tech executable;FileVersion=3.5.1.0;InternalName=;LegalCopyright=Copyright (c) 2002-2023 Christian Thöing;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.5.1;Comments=</VerInfo_Keys>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
Expand All @@ -169,10 +170,11 @@
<VerInfo_MajorVer>3</VerInfo_MajorVer>
<VerInfo_MinorVer>5</VerInfo_MinorVer>
<UsePackages>false</UsePackages>
<LinkPackageStatics>rtl.lib;vcl.lib;bcbsmp.lib;vclx.lib;vclimg.lib;vclwinx.lib;bindengine.lib</LinkPackageStatics>
<LinkPackageStatics>rtl.lib;vcl.lib;bcbsmp.lib;vclx.lib;vclimg.lib;vclwinx.lib;bindengine.lib;dbrtl.lib;dsnap.lib</LinkPackageStatics>
<BT_BuildType>Debug</BT_BuildType>
<BCC_OptimizeMaximum>true</BCC_OptimizeMaximum>
<BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
<VerInfo_Release>1</VerInfo_Release>
</PropertyGroup>
<ItemGroup>
<CppCompile Include="PwTech.cpp">
Expand Down Expand Up @@ -537,23 +539,23 @@
<CppCompile Include="src\zxcvbn\zxcvbn.cpp">
<BuildOrder>90</BuildOrder>
</CppCompile>
<FormResources Include="src\main\PasswMngColSelect.dfm"/>
<FormResources Include="src\main\PasswManager.dfm"/>
<FormResources Include="src\main\PasswList.dfm"/>
<FormResources Include="src\main\PasswEnter.dfm"/>
<FormResources Include="src\main\MPPasswGen.dfm"/>
<FormResources Include="src\main\PasswMngDbProp.dfm"/>
<FormResources Include="src\main\ProfileEditor.dfm"/>
<FormResources Include="src\main\Main.dfm"/>
<FormResources Include="src\main\PasswMngColSelect.dfm"/>
<FormResources Include="src\main\PasswOptions.dfm"/>
<FormResources Include="src\main\PasswMngPwHistory.dfm"/>
<FormResources Include="src\main\PasswMngKeyValEdit.dfm"/>
<FormResources Include="src\main\PasswMngDbSettings.dfm"/>
<FormResources Include="src\main\Main.dfm"/>
<FormResources Include="src\main\PasswMngDbProp.dfm"/>
<FormResources Include="src\main\About.dfm"/>
<FormResources Include="src\main\InfoBox.dfm"/>
<FormResources Include="src\main\CreateTrigramFile.dfm"/>
<FormResources Include="src\main\CreateRandDataFile.dfm"/>
<FormResources Include="src\main\Configuration.dfm"/>
<FormResources Include="src\main\ProfileEditor.dfm"/>
<FormResources Include="src\main\QuickHelp.dfm"/>
<FormResources Include="src\main\ProvideEntropy.dfm"/>
<FormResources Include="src\main\Progress.dfm"/>
Expand Down Expand Up @@ -708,14 +710,14 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="lua\liolib.c" Configuration="Release" Class="ProjectFile">
<Platform Name="Win64">
<RemoteDir>.\</RemoteDir>
<DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c270.dll" Class="DependencyModule">
<Platform Name="Win32">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c270.dll" Class="DependencyModule">
<Platform Name="Win32">
<DeployFile LocalName="lua\liolib.c" Configuration="Release" Class="ProjectFile">
<Platform Name="Win64">
<RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
Expand Down
17 changes: 10 additions & 7 deletions PwTech.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
//---------------------------------------------------------------------------
#include <Vcl.Styles.hpp>
#include <Vcl.Themes.hpp>
USEFORM("src\main\PasswMngColSelect.cpp", PasswMngColDlg);
USEFORM("src\main\PasswManager.cpp", PasswMngForm);
USEFORM("src\main\PasswList.cpp", PasswListForm);
USEFORM("src\main\PasswEnter.cpp", PasswEnterDlg);
USEFORM("src\main\MPPasswGen.cpp", MPPasswGenForm);
USEFORM("src\main\PasswMngDbProp.cpp", PasswMngDbPropDlg);
USEFORM("src\main\ProfileEditor.cpp", ProfileEditDlg);
USEFORM("src\main\Main.cpp", MainForm);
USEFORM("src\main\PasswMngColSelect.cpp", PasswMngColDlg);
USEFORM("src\main\PasswOptions.cpp", PasswOptionsDlg);
USEFORM("src\main\PasswMngPwHistory.cpp", PasswHistoryDlg);
USEFORM("src\main\PasswMngKeyValEdit.cpp", PasswMngKeyValDlg);
USEFORM("src\main\PasswMngDbSettings.cpp", PasswDbSettingsDlg);
USEFORM("src\main\Main.cpp", MainForm);
USEFORM("src\main\PasswMngDbProp.cpp", PasswMngDbPropDlg);
USEFORM("src\main\About.cpp", AboutForm);
USEFORM("src\main\InfoBox.cpp", InfoBoxForm);
USEFORM("src\main\CreateTrigramFile.cpp", CreateTrigramFileDlg);
USEFORM("src\main\CreateRandDataFile.cpp", CreateRandDataFileDlg);
USEFORM("src\main\Configuration.cpp", ConfigurationDlg);
USEFORM("src\main\ProfileEditor.cpp", ProfileEditDlg);
USEFORM("src\main\QuickHelp.cpp", QuickHelpForm);
USEFORM("src\main\ProvideEntropy.cpp", ProvideEntropyDlg);
USEFORM("src\main\Progress.cpp", ProgressForm);
Expand All @@ -48,6 +48,8 @@ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
return 0;
}

g_sExePath = ExtractFilePath(Application->ExeName);

Application->Initialize();
Application->MainFormOnTaskBar = false;

Expand Down Expand Up @@ -109,7 +111,7 @@ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
}

WString sIniFileName = g_cmdLineOptions.IniFileName.IsEmpty() ?
g_sExePath + WString(PROGRAM_INIFILE) : g_cmdLineOptions.IniFileName;
g_sExePath + WString(PROGRAM_INIFILE) : g_cmdLineOptions.IniFileName;

// load the configuration file
WString sTryIniFileName = sIniFileName;
Expand All @@ -129,8 +131,6 @@ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
CopyFile(sIniFileName.c_str(), sTryIniFileName.c_str(), true);
g_pIni.reset(new TMemIniFile(sTryIniFileName, TEncoding::UTF8));
}
else
g_sAppDataPath = g_sExePath;
}
catch (Exception& e) {
MsgBox(FormatW("Could not load configuration file\n\"%s\":\n%s",
Expand All @@ -140,6 +140,9 @@ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
g_blFakeIniFile = true;
}

if (g_sAppDataPath.IsEmpty())
g_sAppDataPath = g_sExePath;

const WString DEFAULT_STYLE_NAME = "Windows";

g_config.UiStyleName = DEFAULT_STYLE_NAME;
Expand Down
Binary file modified PwTech.res
Binary file not shown.
33 changes: 32 additions & 1 deletion changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,38 @@
Copyright (c) 2002-2023 by Christian Thöing


Version 3.5.0
Version 3.5.1

NEW FEATURES:

- New option "Load the following profile on startup" in Configuration | General

CHANGES & IMPROVEMENTS:

- Maximum number of passwords that can be generated at once extended to
1 trillion (1,000,000,000,000) (note that larger amounts >~10**8 can only be
stored in files since the number of Unicode characters displayed in the
password list window is limited to 500 million/2 billion in the 32/64-bit
version)
- Suffixes "K", "M", "G"/"B" can be specified in the "Multiple passwords" box
to generate multiples of thousands, millions, and billions, respectively
- Passwords are generated asynchronously in a separate thread, so that progress
window stays responsive
- Include characters / character sets with different frequencies: Now compatible
with password option "Each character must occur only once"
- Password manager: When changing number of KDF rounds via File | Database
Settings, the process can be canceled after 1 sec (in case the number of
rounds has accidentally been set too high)

FIXES:

- Launching PwTech on system startup caused an error (configuration file and/or
randseed.dat file not found)
- Fixed potential buffer overflows

----------

Version 3.5.0 (2023-04-10)

NEW FEATURES:

Expand Down
52 changes: 47 additions & 5 deletions languages/German.po
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# German translation of Password Tech 3.5.0
# German translation of Password Tech 3.5.1
# Released under the GNU General Public License

#. Add header entry "X-PasswordTech-Manual: ..." to provide language-specific manual
msgid ""
msgstr ""
"Project-Id-Version: Password Tech 3.5.0\n"
"Project-Id-Version: Password Tech 3.5.1\n"
"Last-Translator: Christian Thöing\n"
"Language: de\n"

Expand Down Expand Up @@ -543,6 +543,14 @@ msgstr ""
msgid "Could not register the following hot keys:"
msgstr "Konnte folgende Hotkeys nicht registrieren:"

#. Main window, Generate password list, message shown when specified number of passwords is invalid
msgid ""
"Invalid number of passwords.\n"
"Allowed range is %d-%d."
msgstr ""
"Ungültige Anzahl an Passwörtern.\n"
"Erlaubter Wertebereich ist %d-%d."

#. Main window, Generate password list to file, message shown when selected file already exists
msgid ""
"The selected file already exists. Do you\n"
Expand Down Expand Up @@ -595,9 +603,13 @@ msgstr ""
"Fehler beim Laden des Skripts:\n"
"%s."

#. Title of Progress window when generating a single password
msgid "Generating password"
msgstr "Generiere Passwort"

#. Title of Progress window when generating password list
msgid "Generating password list ..."
msgstr "Generiere Passwort-Liste ..."
msgid "Generating password list"
msgstr "Generiere Passwort-Liste"

#. Progress info when generating password list
msgid "%d of %d passwords generated."
Expand Down Expand Up @@ -691,7 +703,7 @@ msgstr ""
"\n"
"%d Passwörter geschrieben."

#. Generate password, generic error message
#. Generate password, error message
msgid ""
"An error has occurred during password generation:\n"
"%s."
Expand All @@ -700,6 +712,16 @@ msgstr ""
"Fehler aufgetreten:\n"
"%s."

#. Generate password, error message
msgid ""
"An error has occurred while trying to send/\n"
"process the password data:\n"
"%s."
msgstr ""
"Beim Versuch, Passwortdaten zu senden oder\n"
"zu verarbeiten, ist ein Fehler aufgetreten:\n"
"%s."

#. Generate password, error message, additional info when generating passwords to file
msgid "%d passwords written to file \"%s\"."
msgstr "%d Passwörter in Datei \"%s\" geschrieben."
Expand Down Expand Up @@ -1126,6 +1148,14 @@ msgstr "Beenden der Applikation bestätigen"
msgid "Launch application on system startup (for current user)"
msgstr "Applikation beim Systemstart ausführen (für aktuellen Benutzer)"

#. Configuration window, General
msgid "Load the following profile on startup:"
msgstr "Folgendes Profil beim Programmstart laden:"

#. Configuration window, General
msgid "Load pr"
msgstr "Profil beim Start laden:"

#. Configuration window, Security
msgid "Benchmark..."
msgstr "Geschwindigkeitstest..."
Expand Down Expand Up @@ -1973,6 +2003,10 @@ msgstr "Schlüssel wurde gelöscht."
msgid "New key generated."
msgstr "Neuer Schlüssel generiert."

#. MP Password Generator Window, label next to password quality bar
msgid "%d bits"
msgstr "%d Bits"

#. Provide Additional Entropy window, label
msgid "Enter or paste some text into the box below, press mouse buttons, or move your mouse within the window."
msgstr "Geben Sie Text in die Box unten ein, drücken Sie Maustasten oder bewegen Sie die Maus innerhalb des Fensters."
Expand Down Expand Up @@ -2693,6 +2727,14 @@ msgstr "Standardmäßig verfallen neue Einträge nach der folgenden Anzahl an Ta
msgid "For new entries, save the following number of previous passwords:"
msgstr "Für neue Einträge folgende Anzahl an letzten Passwörtern speichern:"

#. Password Manager window, Database Settings dialog, title of progress dialog when changing number of KDF iterations
msgid "Changing number of KDF iterations"
msgstr "Anzahl der KDF-Iterationen ändern"

#. Password Manager window, Database Settings dialog, title of progress dialog when changing number of KDF iterations
msgid "Computing derived key ..."
msgstr "Berechne abgeleiteten Schlüssel ..."

#. Password Manager window, Key-Value List Editor dialog, window title
msgid "Key-value list editor"
msgstr "Parameterliste editieren"
Expand Down
Binary file modified manual/manual.odt
Binary file not shown.
Binary file modified manual/scripting.odt
Binary file not shown.
2 changes: 1 addition & 1 deletion setup/PWTech.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Password Tech"
#define MyAppVersion "3.5.0"
#define MyAppVersion "3.5.1"
#define MyAppPublisher "Christian Thöing"
#define MyAppURL "http://pwgen-win.sourceforge.net"
#define MyAppExeName "PwTech.exe"
Expand Down
6 changes: 4 additions & 2 deletions src/crypto/CryptUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ void pbkdf2_256bit(const word8* pPassw,
const word8* pSalt,
word32 lSaltLen,
word8* pDerivedKey,
word32 lIterations)
word32 lIterations,
std::atomic<bool>* pCancelFlag)
{
const word8 counter[4] = { 0, 0, 0, 1 };
sha256_context hashCtx;
Expand All @@ -49,7 +50,8 @@ void pbkdf2_256bit(const word8* pPassw,

SecureMem<word8> md(pDerivedKey, 32);

for (word32 i = 1; i < lIterations; i++) {
for (word32 i = 1; i < lIterations &&
!(pCancelFlag && *pCancelFlag); i++) {
// compute U_i = HMAC(key, U_{i-1})
sha256_hmac_reset(&hashCtx);
sha256_hmac_update(&hashCtx, md, 32);
Expand Down
4 changes: 3 additions & 1 deletion src/crypto/CryptUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#ifndef CryptUtilH
#define CryptUtilH
//---------------------------------------------------------------------------
#include <atomic>
#include "types.h"

// derives a 256-bit key from a password and salt using PBKDF2
Expand All @@ -36,7 +37,8 @@ void pbkdf2_256bit(const word8* pPassw,
const word8* pSalt,
word32 lSaltLen,
word8* pDerivedKey,
word32 lIterations = 8192);
word32 lIterations = 8192,
std::atomic<bool>* pCancelFlag = nullptr);

template<int Nbits> void incrementCounter(word8* pCounter)
{
Expand Down
5 changes: 4 additions & 1 deletion src/lua/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CMCFLAGS=

# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======

PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris

LUA_A= liblua.a
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
Expand Down Expand Up @@ -117,6 +117,9 @@ FreeBSD NetBSD OpenBSD freebsd:

generic: $(ALL)

ios:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS"

Linux linux: linux-noreadline

linux-noreadline:
Expand Down
Loading

0 comments on commit 3bb6398

Please sign in to comment.