Skip to content

Commit 232f349

Browse files
committed
removed dirty hack
1 parent 6b8d4cf commit 232f349

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/crypto/ec/EllipticCurveOverF2m.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,7 @@ public FieldElementF2m solveQuadraticEquation(FieldElement beta) {
216216
FieldElementF2m gamma;
217217
FieldElementF2m z;
218218
Random randNum = new Random(0);
219-
// TODO Fix DIRTY hack
220-
// Reminder: This can run into an infinite loop
221-
int dirtyHackCounter = 0;
222219
do {
223-
dirtyHackCounter++;
224220
BigInteger tauData = new BigInteger(32, randNum);
225221
FieldElementF2m tau = new FieldElementF2m(tauData, beta.getModulus());
226222
FieldElementF2m w = new FieldElementF2m(beta.getData(), beta.getModulus());
@@ -236,9 +232,6 @@ public FieldElementF2m solveQuadraticEquation(FieldElement beta) {
236232
return null;
237233
}
238234
gamma = (FieldElementF2m) z.mult(z).add(z);
239-
if (dirtyHackCounter > 1000) {
240-
break;
241-
}
242235
} while (gamma.getData().equals(BigInteger.ZERO));
243236
return z;
244237
}

0 commit comments

Comments
 (0)