änderungen hash algorithmus
This commit is contained in:
@@ -129,14 +129,14 @@ Public Class TestPerformance
|
|||||||
Dim finalhash As Byte()
|
Dim finalhash As Byte()
|
||||||
For zahl As Integer = 0 To zahlint
|
For zahl As Integer = 0 To zahlint
|
||||||
sw1.Start()
|
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_iterats.Add(VERAG_VARIABLES.getiterationnumber)
|
||||||
arrzahl.Add(zahlint)
|
arrzahl.Add(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 7)))
|
||||||
sw1.Stop()
|
sw1.Stop()
|
||||||
arrzeitp1.Add(sw1.ElapsedMilliseconds)
|
arrzeitp1.Add(sw1.ElapsedMilliseconds)
|
||||||
sw1.Reset()
|
sw1.Reset()
|
||||||
Next
|
Next
|
||||||
Dim pw As String = "q~^Vd$fS§§nS4!q"
|
Dim pw As String = "qVd$fS§564nS4"
|
||||||
For zahl As Integer = 0 To zahlint
|
For zahl As Integer = 0 To zahlint
|
||||||
sw2.Start()
|
sw2.Start()
|
||||||
hashbytes.Add(VERAG_VARIABLES.HashPassword(pw, arrkeys(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))
|
hashbytes.Add(VERAG_VARIABLES.HashPassword(pw, arrkeys(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))
|
||||||
|
|||||||
@@ -35,20 +35,15 @@ Public Class VERAG_VARIABLES
|
|||||||
Argon.Salt = salt
|
Argon.Salt = salt
|
||||||
Argon.DegreeOfParallelism = 24
|
Argon.DegreeOfParallelism = 24
|
||||||
Argon.Iterations = nIterations
|
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)
|
Return Argon.GetBytes(nHash)
|
||||||
Else
|
Else
|
||||||
Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
|
Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
|
||||||
Argon.Salt = salt
|
Argon.Salt = salt
|
||||||
Argon.DegreeOfParallelism = 48
|
Argon.DegreeOfParallelism = 36
|
||||||
Argon.Iterations = nIterations * 2
|
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)
|
Return Argon.GetBytes(nHash)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -35,7 +35,6 @@ Partial Class Customers_Default2
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub btn_TesthashrateServer_ClickAsync(sender As Object, e As EventArgs) Handles btn_TesthashrateServer.Click
|
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(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 8)))
|
||||||
Dim pwhashresult As Byte() = TestPerformance.TestHashrateServer(zahl)
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user