From 826b0a19531e3e6c9cc2dd8e93509f2ca26b20b4 Mon Sep 17 00:00:00 2001 From: ja Date: Fri, 4 Feb 2022 16:58:05 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"=C3=84nderung=20Algorithus=20Hashing?= =?UTF-8?q?=20Geschwindigkeitsboost=20durch=20verkleinerung=20der=20Iterat?= =?UTF-8?q?ionenzahl."?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5ec80868af1102c0c9ec77ecede7637644ce0950. --- App_Code/VERAG_VARIABLES.vb | 16 ++++++++++------ login/login_FLEX.aspx.vb | 6 +----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/App_Code/VERAG_VARIABLES.vb b/App_Code/VERAG_VARIABLES.vb index d6c6319..6dc1b2f 100644 --- a/App_Code/VERAG_VARIABLES.vb +++ b/App_Code/VERAG_VARIABLES.vb @@ -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 diff --git a/login/login_FLEX.aspx.vb b/login/login_FLEX.aspx.vb index 053979e..e7d6c1c 100644 --- a/login/login_FLEX.aspx.vb +++ b/login/login_FLEX.aspx.vb @@ -22,7 +22,7 @@ Partial Class login_FLEX Try Dim teststr = String.Empty If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then - intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 7)) + intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 17)) teststr = Await TestPerformance.TestHashrateServerAsync(0.052 * VERAG_VARIABLES.GetCpuSpeed()) Else intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 17)) @@ -30,10 +30,6 @@ Partial Class login_FLEX End If If String.Equals(teststr, String.Empty) = False Then intzahliterats = VERAG_VARIABLES.getiterationnumber - teststr = Await TestPerformance.TestHashrateServerAsync(0.042 * VERAG_VARIABLES.GetCpuSpeed()) - If String.Equals(teststr, String.Empty) = False Then - Response.Write("Der Webserver kann momentan keine sicherheitsrelevanten Aufgaben ausführen. Bitte versuchen Sie es später noch einmal.") - End If End If Catch Ex As SettingsPropertyNotFoundException VERAG_VARIABLES.seterrorcount(4534)