package org.crypttech.modexp.testgenerator;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class TestGeneratorBasic {
	public static final List<TestVector> getTestVectors() {
		Random rng = new Random(0); //any static seed
		ArrayList<TestVector> list = new ArrayList<TestVector>();
		for(int i = 0; i < 10; i++) {
			final long seed = rng.nextLong();
			rng.setSeed(seed);
			BigInteger m = BigInteger.probablePrime(33, rng);
			BigInteger x = BigInteger.probablePrime(33, rng);
			BigInteger e = BigInteger.probablePrime(33, rng);
			BigInteger z = x.modPow(e, m);
			TestVector tv = Util.generateTestVector("BASIC", Long.toString(seed), 2, m, x, e, z);
			list.add(tv);
		}
		return list;
	}


}

@@ -343,16 +343,407 @@
 tor%3E();%0A
+%09%09%0A%09%09generateTestVectors(rng, list, 33, 2);%0A%09%09generateTestVectors(rng, list, 30, 1);%0A%09%09//generateTestVectors(rng, list, 32, 1); //will generate failing tests in C model %0A%09%09//generateTestVectors(rng, list, 31, 1); //will generate failing tests in C model %0A%09%09return list;%0A%09%7D%0A%0A%09private static void generateTestVectors(Random rng,%0A%09%09%09ArrayList%3CTestVector%3E list, int bitLength, int wordLength) %7B%0A
 %09%09for(in
@@ -860,34 +860,41 @@
 r.probablePrime(
-33
+bitLength
 , rng);%0A%09%09%09BigIn
@@ -920,34 +920,41 @@
 r.probablePrime(
-33
+bitLength
 , rng);%0A%09%09%09BigIn
@@ -988,18 +988,25 @@
 lePrime(
-33
+bitLength
 , rng);%0A
@@ -1112,17 +1112,26 @@
 (seed), 
-2
+wordLength
 , m, x, 
@@ -1158,30 +1158,15 @@
 v);%0A%09%09%7D%0A
-%09%09return list;%0A
 %09%7D%0A%0A%0A%7D%0A

Generate 1 word test cases