// 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)); // TODO: This could actually be true with low probability
		}
	}
BigInteger[] eVals = prover.getEs();
BigInteger[] vVals = prover.getVs();
assertFalse(verifier.checkResponse(eVals, vVals)); // TODO: This could actually be true with low probability
}
}
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)); // TODO: This could actually be true with low probability
}
}