aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java
diff options
context:
space:
mode:
authorJ08nY2019-03-06 16:12:47 +0100
committerJ08nY2019-03-06 16:12:47 +0100
commit09f3fa7fe3b4842b8ec0af6db0e4f4a3f23bb220 (patch)
tree3bcc34da01579f9f43d9fd1d0743056ce334841c /src/cz/crcs/ectester/reader/test/CardCofactorSuite.java
parent34d25b87527771d0346e98f634e9a90959322f59 (diff)
downloadECTester-09f3fa7fe3b4842b8ec0af6db0e4f4a3f23bb220.tar.gz
ECTester-09f3fa7fe3b4842b8ec0af6db0e4f4a3f23bb220.tar.zst
ECTester-09f3fa7fe3b4842b8ec0af6db0e4f4a3f23bb220.zip
Fix some keys in invalid test suite, add "random" test option.
Diffstat (limited to '')
-rw-r--r--src/cz/crcs/ectester/reader/test/CardCofactorSuite.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java b/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java
index 6b15ab0..d1eb2b1 100644
--- a/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java
+++ b/src/cz/crcs/ectester/reader/test/CardCofactorSuite.java
@@ -25,7 +25,7 @@ import static cz.crcs.ectester.common.test.Result.ExpectedValue;
*/
public class CardCofactorSuite extends CardTestSuite {
public CardCofactorSuite(TestWriter writer, ECTesterReader.Config cfg, CardMngr cardManager) {
- super(writer, cfg, cardManager, "cofactor", new String[]{"preset"}, "The cofactor test suite tests whether the card correctly rejects points on the curve",
+ super(writer, cfg, cardManager, "cofactor", new String[]{"preset", "random"}, "The cofactor test suite tests whether the card correctly rejects points on the curve",
"but not in the subgroup generated by the generator(so of small order, dividing the cofactor) during ECDH.");
}
@@ -39,7 +39,7 @@ public class CardCofactorSuite extends CardTestSuite {
Test allocate = CommandTest.expect(new Command.Allocate(this.card, ECTesterApplet.KEYPAIR_BOTH, curve.getBits(), curve.getField()), ExpectedValue.SUCCESS);
Test set = CommandTest.expect(new Command.Set(this.card, ECTesterApplet.KEYPAIR_BOTH, EC_Consts.CURVE_external, curve.getParams(), curve.flatten()), ExpectedValue.SUCCESS);
- Test generate = genOrPreset(curve, ExpectedValue.SUCCESS, ECTesterApplet.KEYPAIR_LOCAL);
+ Test generate = setupKeypairs(curve, ExpectedValue.SUCCESS, ECTesterApplet.KEYPAIR_LOCAL);
Test prepare = CompoundTest.all(ExpectedValue.SUCCESS, "Prepare and generate keypair on " + curve.getId() + ".", allocate, set, generate);