From 3d76bb8f67f5110a9879c6f41b9c1003812430bb Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 25 Jul 2024 14:22:39 +0200 Subject: Tests: remove RIPEMD160 test container, add blake2s one. Enhance batch script. Harmonize test containers. --- Tests/bench.bat | 80 ++++++++++++++++++++++++++++++++++++++++++------ Tests/test.blake2s.hc | Bin 0 -> 524288 bytes Tests/test.ripemd160.hc | Bin 524288 -> 0 bytes Tests/test.sha256.hc | Bin 524288 -> 524288 bytes Tests/test.sha512.hc | Bin 524288 -> 524288 bytes Tests/test.streebog.hc | Bin 524288 -> 524288 bytes Tests/test.whirlpool.hc | Bin 524288 -> 524288 bytes 7 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 Tests/test.blake2s.hc delete mode 100644 Tests/test.ripemd160.hc diff --git a/Tests/bench.bat b/Tests/bench.bat index d243b4d9..9f3f705a 100644 --- a/Tests/bench.bat +++ b/Tests/bench.bat @@ -36,6 +36,12 @@ if %ss% lss 10 set ss=0%ss% if %cc% lss 10 set cc=0%cc% echo SHA-512 (Normal) = %hh%:%mm%:%ss%,%cc% +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q rem Get start time: @@ -63,6 +69,12 @@ if %cc% lss 10 set cc=0%cc% echo SHA-512 (Hidden) = %hh%:%mm%:%ss%,%cc% echo. +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q :whirlpool @@ -93,6 +105,12 @@ if %ss% lss 10 set ss=0%ss% if %cc% lss 10 set cc=0%cc% echo Whirlpool (Normal) = %hh%:%mm%:%ss%,%cc% +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q rem Get start time: @@ -120,11 +138,17 @@ if %cc% lss 10 set cc=0%cc% echo Whirlpool (Hidden) = %hh%:%mm%:%ss%,%cc% echo. +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q :sha256 -IF NOT EXIST test.sha256.hc GOTO :ripemd160 +IF NOT EXIST test.sha256.hc GOTO :blake2s rem Get start time: for /F "tokens=1-4 delims=:.," %%a in ("%time%") do ( @@ -150,6 +174,12 @@ if %ss% lss 10 set ss=0%ss% if %cc% lss 10 set cc=0%cc% echo SHA-256 (Normal) = %hh%:%mm%:%ss%,%cc% +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q rem Get start time: @@ -177,19 +207,25 @@ if %cc% lss 10 set cc=0%cc% echo SHA-256 (Hidden) = %hh%:%mm%:%ss%,%cc% echo. +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q -:ripemd160 +:blake2s -IF NOT EXIST test.ripemd160.hc GOTO :streebog +IF NOT EXIST test.blake2s.hc GOTO :streebog rem Get start time: for /F "tokens=1-4 delims=:.," %%a in ("%time%") do ( set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" ) -rem Mount RIPEMD-160 container (Normal) -"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.ripemd160.hc /hash ripemd160 /l %mydriveletter% /password test /q /silent /m ro +rem Mount BLAKE2s container (Normal) +"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.blake2s.hc /hash blake2s /l %mydriveletter% /password test /q /silent /m ro rem Get end time: for /F "tokens=1-4 delims=:.," %%a in ("%time%") do ( @@ -205,7 +241,13 @@ if %hh% lss 10 set hh=0%hh% if %mm% lss 10 set mm=0%mm% if %ss% lss 10 set ss=0%ss% if %cc% lss 10 set cc=0%cc% -echo RIPEMD-160 (Normal) = %hh%:%mm%:%ss%,%cc% +echo BLAKE2s (Normal) = %hh%:%mm%:%ss%,%cc% + +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q @@ -214,8 +256,8 @@ for /F "tokens=1-4 delims=:.," %%a in ("%time%") do ( set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100" ) -rem Mount RIPEMD-160 container (Hidden) -"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.ripemd160.hc /hash ripemd160 /l %mydriveletter% /password testhidden /q /silent /m ro +rem Mount BLAKE2s container (Hidden) +"c:\Program Files\VeraCrypt\veracrypt.exe" /volume test.blake2s.hc /hash blake2s /l %mydriveletter% /password testhidden /q /silent /m ro rem Get end time: for /F "tokens=1-4 delims=:.," %%a in ("%time%") do ( @@ -231,9 +273,15 @@ if %hh% lss 10 set hh=0%hh% if %mm% lss 10 set mm=0%mm% if %ss% lss 10 set ss=0%ss% if %cc% lss 10 set cc=0%cc% -echo RIPEMD-160 (Hidden) = %hh%:%mm%:%ss%,%cc% +echo BLAKE2s (Hidden) = %hh%:%mm%:%ss%,%cc% echo. +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q :streebog @@ -264,6 +312,12 @@ if %ss% lss 10 set ss=0%ss% if %cc% lss 10 set cc=0%cc% echo Streebog (Normal) = %hh%:%mm%:%ss%,%cc% +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q rem Get start time: @@ -291,6 +345,12 @@ if %cc% lss 10 set cc=0%cc% echo Streebog (Hidden) = %hh%:%mm%:%ss%,%cc% echo. +rem Check if the drive letter exists after mount operation +if not exist %mydriveletter%:\ ( + echo ERROR: Drive letter %mydriveletter%: does not exist after mount operation. + goto :exit +) + "c:\Program Files\VeraCrypt\veracrypt.exe" /dismount %mydriveletter% /silent /q :autodetect @@ -364,7 +424,7 @@ endlocal & set "%output_var%=%drive%" & exit /b %exitcode% setlocal EnableDelayedExpansion set exitcode=0 set "output_var=%~1" -for %%i in (test.sha512.hc,test.sha256.hc,test.whirlpool.hc,test.ripemd160.hc) do ( +for %%i in (test.sha512.hc,test.sha256.hc,test.whirlpool.hc,test.blake2s.hc) do ( if exist %%i ( set "volume=%%i" goto :availablevolume0 diff --git a/Tests/test.blake2s.hc b/Tests/test.blake2s.hc new file mode 100644 index 00000000..c994d829 Binary files /dev/null and b/Tests/test.blake2s.hc differ diff --git a/Tests/test.ripemd160.hc b/Tests/test.ripemd160.hc deleted file mode 100644 index feb402ad..00000000 Binary files a/Tests/test.ripemd160.hc and /dev/null differ diff --git a/Tests/test.sha256.hc b/Tests/test.sha256.hc index fa7d0113..95702005 100644 Binary files a/Tests/test.sha256.hc and b/Tests/test.sha256.hc differ diff --git a/Tests/test.sha512.hc b/Tests/test.sha512.hc index ccafa883..48decec7 100644 Binary files a/Tests/test.sha512.hc and b/Tests/test.sha512.hc differ diff --git a/Tests/test.streebog.hc b/Tests/test.streebog.hc index 72dc93ce..ce9fedd0 100644 Binary files a/Tests/test.streebog.hc and b/Tests/test.streebog.hc differ diff --git a/Tests/test.whirlpool.hc b/Tests/test.whirlpool.hc index c46c405e..a5662982 100644 Binary files a/Tests/test.whirlpool.hc and b/Tests/test.whirlpool.hc differ -- cgit v1.2.3