Revert "Änderung Algorithus Hashing Geschwindigkeitsboost durch verkleinerung der Iterationenzahl."

This reverts commit 5ec80868af.
This commit is contained in:
ja
2022-02-04 16:58:05 +01:00
parent 5ec80868af
commit 826b0a1953
2 changed files with 11 additions and 11 deletions

View File

@@ -56,7 +56,7 @@ Public Class VERAG_VARIABLES
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 8
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 2)
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 3)
'Argon.MemorySize = (((nIterations * 19.98 - (nIterations * 10.23) / 14 * 2) / 4.058) + 1 * 190)
Argon.MemorySize = Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)).Length
Return Argon.GetBytes(nHash)
@@ -64,8 +64,9 @@ Public Class VERAG_VARIABLES
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 10
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 2)
Argon.MemorySize = (((nIterations * 20.98 - (nIterations * 10.23) / 14 * 2) / 4.058) + 1 * 190)
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 3)
'Argon.MemorySize = (((nIterations * 20.98 - (nIterations * 10.23) / 14 * 2) / 4.058) + 1 * 190)
Argon.MemorySize = Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)).Length
Return Argon.GetBytes(nHash)
End If
End Function
@@ -76,7 +77,7 @@ Public Class VERAG_VARIABLES
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 8
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 2)
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 3)
'Argon.MemorySize = (((nIterations * 19.98 - (nIterations * 10.23) / 14 * 2) / 4.058) + 1 * 190)
Argon.MemorySize = Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)).Length
Return Await Argon.GetBytesAsync(nHash)
@@ -84,8 +85,9 @@ Public Class VERAG_VARIABLES
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 10
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 2)
Argon.MemorySize = (((nIterations * 21.98 - (nIterations * 10.23) / 14 * 2) / 4.058) + 1 * 190)
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 3)
'Argon.MemorySize = (((nIterations * 21.98 - (nIterations * 10.23) / 14 * 2) / 4.058) + 1 * 190)
Argon.MemorySize = Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)).Length
Return Await Argon.GetBytesAsync(nHash)
End If
End Function
@@ -104,4 +106,6 @@ Public Class VERAG_VARIABLES
rand.GetBytes(one_byte)
Return min + (max - min) * (one_byte(0) / 255)
End Function
End Class