public void testZKSMManyOperations() throws ZKSetMembershipException, PublicKeysNotEqualException, BigIntegerClassNotValid {
		BigInteger[] theSet = {new BigInteger("0"), new BigInteger("1"), 
				new BigInteger("2"), new BigInteger("3"), new BigInteger("4"),
				new BigInteger("6")};
		EncryptedInteger c1 = new EncryptedInteger(new BigInteger("2"), pub);
		BigInteger r1 = c1.set(new BigInteger("2"));
		EncryptedInteger c2 = new EncryptedInteger(new BigInteger("3"), pub);
		BigInteger r2 = c2.set(new BigInteger("3"));
		EncryptedInteger c = c1.add(c2);
		BigInteger r = r1.multiply(r2).mod(this.pub.getNSquared());
		int msgIndex = 5;
		for (int i=0; i<10; i++) {
			ZKSetMembershipProver prover = new ZKSetMembershipProver(pub, theSet, msgIndex, c);
			BigInteger[] uVals = prover.genCommitments();
			ZKSetMembershipVerifier verifier = new ZKSetMembershipVerifier(pub, c, uVals, theSet);
			BigInteger e = verifier.genChallenge(new BigInteger("128"));
			prover.computeResponse(e, r);
			BigInteger[] eVals = prover.getEs();
			BigInteger[] vVals = prover.getVs();
			assertFalse(verifier.checkResponse(eVals, vVals)); // TODO: This could actually be true with low probability
		}
	}
public void testZKSMManyOperations() throws ZKSetMembershipException, PublicKeysNotEqualException, BigIntegerClassNotValid {
		BigInteger[] theSet = {new BigInteger("0"), new BigInteger("1"), 
				new BigInteger("2"), new BigInteger("3"), new BigInteger("4"),
				new BigInteger("6")};
		EncryptedInteger c1 = new EncryptedInteger(new BigInteger("2"), pub);
		BigInteger r1 = c1.set(new BigInteger("2"));
		EncryptedInteger c2 = new EncryptedInteger(new BigInteger("3"), pub);
		BigInteger r2 = c2.set(new BigInteger("3"));
		EncryptedInteger c = c1.add(c2);
		BigInteger r = r1.multiply(r2).mod(this.pub.getNSquared());
		int msgIndex = 5;
		for (int i=0; i<10; i++) {
			ZKSetMembershipProver prover = new ZKSetMembershipProver(pub, theSet, msgIndex, c);
			BigInteger[] uVals = prover.genCommitments();
			ZKSetMembershipVerifier verifier = new ZKSetMembershipVerifier(pub, c, uVals, theSet);
			BigInteger e = verifier.genChallenge(new BigInteger("128"));
			prover.computeResponse(e, r);
			BigInteger[] eVals = prover.getEs();
			BigInteger[] vVals = prover.getVs();
			assertFalse(verifier.checkResponse(eVals, vVals));
		}
	}
public void testzksmmanyoperations() throws zksetmembershipexception, publickeysnotequalexception, bigintegerclassnotvalid { biginteger[] theset = {new biginteger("0"), new biginteger("1"), new biginteger("2"), new biginteger("3"), new biginteger("4"), new biginteger("6")}; encryptedinteger c1 = new encryptedinteger(new biginteger("2"), pub); biginteger r1 = c1.set(new biginteger("2")); encryptedinteger c2 = new encryptedinteger(new biginteger("3"), pub); biginteger r2 = c2.set(new biginteger("3")); encryptedinteger c = c1.add(c2); biginteger r = r1.multiply(r2).mod(this.pub.getnsquared()); int msgindex = 5; for (int i=0; i<10; i++) { zksetmembershipprover prover = new zksetmembershipprover(pub, theset, msgindex, c); biginteger[] uvals = prover.gencommitments(); zksetmembershipverifier verifier = new zksetmembershipverifier(pub, c, uvals, theset); biginteger e = verifier.genchallenge(new biginteger("128")); prover.computeresponse(e, r); biginteger[] evals = prover.getes(); biginteger[] vvals = prover.getvs(); assertfalse(verifier.checkresponse(evals, vvals)); } }