änderungen hash algorithmus

This commit is contained in:
ja
2021-12-17 14:16:08 +01:00
parent affd5898dd
commit b7b80b303d
4 changed files with 7 additions and 13 deletions

View File

@@ -129,14 +129,14 @@ Public Class TestPerformance
Dim finalhash As Byte()
For zahl As Integer = 0 To zahlint
sw1.Start()
arrkeys.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(0, zahlint)))
arrkeys.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 7))))
arrzahl_iterats.Add(VERAG_VARIABLES.getiterationnumber)
arrzahl.Add(zahlint)
arrzahl.Add(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 7)))
sw1.Stop()
arrzeitp1.Add(sw1.ElapsedMilliseconds)
sw1.Reset()
Next
Dim pw As String = "q~^Vd$fS§§nS4!q"
Dim pw As String = "qVd$fS§564nS4"
For zahl As Integer = 0 To zahlint
sw2.Start()
hashbytes.Add(VERAG_VARIABLES.HashPassword(pw, arrkeys(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))

View File

@@ -35,20 +35,15 @@ Public Class VERAG_VARIABLES
Argon.Salt = salt
Argon.DegreeOfParallelism = 24
Argon.Iterations = nIterations
Argon.MemorySize = (((nIterations * 1 - (nIterations * 1.23) / 4 * 2) / 1.05) + 1 * 270)
Argon.MemorySize = (((nIterations * 1.18 - (nIterations * 1.23) / 4 * 2) / 1.05) + 1 * 270)
'Return Convert.ToBase64String(Argon.GetBytes(nHash))
'Return Argon.GetBytes(nHash)
'Dim saltBytes = Convert.FromBase64String(salt)
'Using rfc2898DeriveBytes = New Rfc2898DeriveBytes(password, saltBytes, nIterations)
'End Using
Return Argon.GetBytes(nHash)
Else
Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 48
Argon.DegreeOfParallelism = 36
Argon.Iterations = nIterations * 2
Argon.MemorySize = (((nIterations * 1.385 - (nIterations * 0.72) / 1.95 * 2.28) / 0.08) + 1 * 316)
Argon.MemorySize = (((nIterations * 1.385 - (nIterations * 0.56) / 1.95 * 2.28) / 5.18) + 1.024 * 316)
Return Argon.GetBytes(nHash)
End If

Binary file not shown.

View File

@@ -35,7 +35,6 @@ Partial Class Customers_Default2
End Sub
Protected Sub btn_TesthashrateServer_ClickAsync(sender As Object, e As EventArgs) Handles btn_TesthashrateServer.Click
Dim zahl As Integer = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 9))
Dim pwhashresult As Byte() = TestPerformance.TestHashrateServer(zahl)
Dim pwhashresult As Byte() = TestPerformance.TestHashrateServer(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 8)))
End Sub
End Class