]> WPIA git - gigi.git/commit - tests/club/wpia/gigi/testUtils/ConfiguredTest.java
fix: the "generateBrokenKeypair" can sometimes hang indefinitely
authorFelix Dörre <felix@dogcraft.de>
Wed, 13 Dec 2017 19:34:15 +0000 (20:34 +0100)
committerLucas Werkmeister <mail@lucaswerkmeister.de>
Mon, 18 Dec 2017 23:02:22 +0000 (00:02 +0100)
commit056e2d36653e0dfdfa520651c1aa4e70df82ea1a
tree0bbbc20c539d81b17419f166aa0425378713fc0e
parent83f0476d88b4c6746f7bd0d1347a62201a3fb866
fix: the "generateBrokenKeypair" can sometimes hang indefinitely

The value of "p" can be too small so no value for "q" can be found.

The problem can be resolved by re-choosing both p and q when the result
is too small. The old "swap and only re-generate the smaller prime" does
not work anymore as p and q are not generated with equal length.

Change-Id: I9fc533ac6ece769b15deeb4186385f2a72188e72
tests/club/wpia/gigi/testUtils/ConfiguredTest.java