First commit, Vystem v0.1
This commit is contained in:
12304
Blastproof/keygen/argon2/kats/argon2d
Normal file
12304
Blastproof/keygen/argon2/kats/argon2d
Normal file
File diff suppressed because it is too large
Load Diff
1
Blastproof/keygen/argon2/kats/argon2d.shasum
Normal file
1
Blastproof/keygen/argon2/kats/argon2d.shasum
Normal file
@@ -0,0 +1 @@
|
||||
73619cfe0f35e52fdd1ca2595ffaa359879467407f98b61f4969c2861cc329ce argon2d
|
||||
12304
Blastproof/keygen/argon2/kats/argon2d_v16
Normal file
12304
Blastproof/keygen/argon2/kats/argon2d_v16
Normal file
File diff suppressed because it is too large
Load Diff
1
Blastproof/keygen/argon2/kats/argon2d_v16.shasum
Normal file
1
Blastproof/keygen/argon2/kats/argon2d_v16.shasum
Normal file
@@ -0,0 +1 @@
|
||||
4ec4569a016c3accc6a25a34252b03a6135939b3c452389917a3f3b65878165b argon2d_v16
|
||||
12304
Blastproof/keygen/argon2/kats/argon2i
Normal file
12304
Blastproof/keygen/argon2/kats/argon2i
Normal file
File diff suppressed because it is too large
Load Diff
1
Blastproof/keygen/argon2/kats/argon2i.shasum
Normal file
1
Blastproof/keygen/argon2/kats/argon2i.shasum
Normal file
@@ -0,0 +1 @@
|
||||
40a3aeafb092d10cf457a8ee0139c114c911ecf97bd5accf5a99c7ddd6917061 argon2i
|
||||
12304
Blastproof/keygen/argon2/kats/argon2i_v16
Normal file
12304
Blastproof/keygen/argon2/kats/argon2i_v16
Normal file
File diff suppressed because it is too large
Load Diff
1
Blastproof/keygen/argon2/kats/argon2i_v16.shasum
Normal file
1
Blastproof/keygen/argon2/kats/argon2i_v16.shasum
Normal file
@@ -0,0 +1 @@
|
||||
334f03e627afb67b946a530b90d2e11fb2e6abb44df992c0fb3198c7bacf5930 argon2i_v16
|
||||
12304
Blastproof/keygen/argon2/kats/argon2id
Normal file
12304
Blastproof/keygen/argon2/kats/argon2id
Normal file
File diff suppressed because it is too large
Load Diff
1
Blastproof/keygen/argon2/kats/argon2id.shasum
Normal file
1
Blastproof/keygen/argon2/kats/argon2id.shasum
Normal file
@@ -0,0 +1 @@
|
||||
ba05643e504fc5778dda99e2d9f42ebe7d22ebb3923cc719fd591b1b14a8d28d argon2id
|
||||
12304
Blastproof/keygen/argon2/kats/argon2id_v16
Normal file
12304
Blastproof/keygen/argon2/kats/argon2id_v16
Normal file
File diff suppressed because it is too large
Load Diff
1
Blastproof/keygen/argon2/kats/argon2id_v16.shasum
Normal file
1
Blastproof/keygen/argon2/kats/argon2id_v16.shasum
Normal file
@@ -0,0 +1 @@
|
||||
680774be1d3ad2e74bbc56ee715dd6eb97a58279bf22edc57d00e840ca1ae469 argon2id_v16
|
||||
42
Blastproof/keygen/argon2/kats/check-sums.ps1
Normal file
42
Blastproof/keygen/argon2/kats/check-sums.ps1
Normal file
@@ -0,0 +1,42 @@
|
||||
Set-Variable tempfile -option Constant -value "tempfile"
|
||||
|
||||
function hash($path) {
|
||||
$fullPath = Resolve-Path $path
|
||||
$hash = new-object -TypeName System.Security.Cryptography.SHA256CryptoServiceProvider
|
||||
|
||||
$contents = [IO.File]::ReadAllText($fullPath) -replace "`r`n?", "`n"
|
||||
# create UTF-8 encoding without signature
|
||||
$utf8 = New-Object System.Text.UTF8Encoding $false
|
||||
# write the text back
|
||||
[IO.File]::WriteAllText($tempfile, $contents, $utf8)
|
||||
|
||||
$file = [System.IO.File]::Open($tempfile,[System.IO.Filemode]::Open, [System.IO.FileAccess]::Read)
|
||||
$result = [System.BitConverter]::ToString($hash.ComputeHash($file))
|
||||
$file.Dispose()
|
||||
|
||||
if (Test-Path $tempfile) {
|
||||
Remove-Item $tempfile
|
||||
}
|
||||
|
||||
return $result
|
||||
}
|
||||
|
||||
function main() {
|
||||
$files = $(Get-ChildItem * | Where-Object { $_.Name -match '^[a-z2]*(_v)?[0-9]*$' } | select -ExpandProperty name)
|
||||
|
||||
foreach ($file in $files) {
|
||||
$new = $(hash $file).replace("-","")
|
||||
$new = $new.ToLower()
|
||||
|
||||
$old=$(Get-Content $file".shasum")
|
||||
$old = $old.Substring(0, $old.IndexOf(" "))
|
||||
|
||||
if ($new -eq $old) {
|
||||
Write-Host $file "`tOK"
|
||||
} else {
|
||||
Write-Host $file "`tERROR"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main
|
||||
13
Blastproof/keygen/argon2/kats/check-sums.sh
Executable file
13
Blastproof/keygen/argon2/kats/check-sums.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
for file in `ls | grep '^[a-z2]*\(_v\)\?[0-9]*$' | xargs`
|
||||
do
|
||||
new=`shasum -a 256 $file`
|
||||
old=`cat $file.shasum`
|
||||
if [ "$new" = "$old" ]
|
||||
then
|
||||
echo $file "\t" OK
|
||||
else
|
||||
echo $file "\t" ERROR
|
||||
fi
|
||||
done
|
||||
50
Blastproof/keygen/argon2/kats/test.ps1
Normal file
50
Blastproof/keygen/argon2/kats/test.ps1
Normal file
@@ -0,0 +1,50 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Set-Variable tempfile -option Constant -value "tempfile"
|
||||
|
||||
function CompareFiles($f1, $f2, $i) {
|
||||
$f1_content = $(Get-Content $f1)
|
||||
$f2_content = $(Get-Content $f2)
|
||||
|
||||
if (Compare-Object $f1_content $f2_content) {
|
||||
Write-Host -NoNewline "ERROR"
|
||||
exit $i
|
||||
} else {
|
||||
Write-Host -NoNewline "OK"
|
||||
}
|
||||
}
|
||||
|
||||
function main() {
|
||||
$i = 0
|
||||
foreach ($opt in @("Ref", "Opt")) {
|
||||
Write-Output "$opt"
|
||||
|
||||
foreach ($version in @(16, 19)) {
|
||||
foreach ($type in @("i", "d", "id")) {
|
||||
$i++
|
||||
|
||||
if ("Ref" -eq $opt) {
|
||||
vs2015\build\Argon2RefGenKAT.exe $type $version > $tempfile
|
||||
} else {
|
||||
vs2015\build\Argon2OptGenKAT.exe $type $version > $tempfile
|
||||
}
|
||||
|
||||
if (19 -eq $version) {
|
||||
$kats = "kats\argon2" + $type
|
||||
} else {
|
||||
$kats = "kats\argon2" + $type + "_v" + $version
|
||||
}
|
||||
|
||||
Write-Host -NoNewline "Argon2$type v=$version : "
|
||||
CompareFiles $tempfile $kats $i
|
||||
Write-Output ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Test-Path $tempfile) {
|
||||
Remove-Item $tempfile
|
||||
}
|
||||
}
|
||||
|
||||
main
|
||||
49
Blastproof/keygen/argon2/kats/test.sh
Executable file
49
Blastproof/keygen/argon2/kats/test.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
|
||||
for opttest in "" "OPTTEST=1"
|
||||
do
|
||||
if [ "" = "$opttest" ]
|
||||
then
|
||||
printf "Default build\n"
|
||||
else
|
||||
printf "Force OPTTEST=1\n"
|
||||
fi
|
||||
|
||||
make genkat $opttest > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
i=0
|
||||
for version in 16 19
|
||||
do
|
||||
for type in i d id
|
||||
do
|
||||
i=$(($i+1))
|
||||
|
||||
printf "argon2$type v=$version: "
|
||||
|
||||
if [ 19 -eq $version ]
|
||||
then
|
||||
kats="kats/argon2"$type
|
||||
else
|
||||
kats="kats/argon2"$type"_v"$version
|
||||
fi
|
||||
|
||||
./genkat $type $version > tmp
|
||||
if diff tmp $kats
|
||||
then
|
||||
printf "OK"
|
||||
else
|
||||
printf "ERROR"
|
||||
exit $i
|
||||
fi
|
||||
printf "\n"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
rm -f tmp
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user