test_class.declarator: curve = CommonConfiguration.CURVE
test_class.modifier: public static final
test_class.original_string: public static final EcCurve curve = CommonConfiguration.CURVE;
test_class.type: EcCurve
test_class.var_name: curve
test_class.declarator: g = CommonConfiguration.g
test_class.modifier: public static final
test_class.original_string: public static final EcPoint g = CommonConfiguration.g;
test_class.type: EcPoint
test_class.var_name: g
test_class.declarator: h = CommonConfiguration.h
test_class.modifier: public static final
test_class.original_string: public static final EcPoint h = CommonConfiguration.h;
test_class.type: EcPoint
test_class.var_name: h
test_class.file: pross-common/src/test/java/com/ibm/pross/common/util/crypto/zkp/pedersen/PedersenEqRangeProofTest.java
test_class.identifier: PedersenEqRangeProofTest
test_case.body: @Test
  	public void testVerifyPerformance() {
  
  		// Generate encryption key
  		final PaillierKeyGenerator keyGenerator = new PaillierKeyGenerator(2048);
  		final PaillierKeyPair keyPair = keyGenerator.generate();
  		final PaillierPublicKey publicKey = keyPair.getPublicKey();
  
  		final BigInteger share1 = RandomNumberGenerator.generateRandomInteger(curve.getR());
  		final BigInteger share2 = RandomNumberGenerator.generateRandomInteger(curve.getR());
  
  		// Encrypt share
  		final BigInteger n = publicKey.getN();
  
  		// Encrypt first share
  		final BigInteger r1 = RandomNumberGenerator.generateRandomCoprimeInRange(n);
  		final BigInteger Ea = PaillierCipher.encrypt(publicKey, share1, r1);
  
  		// Encrypt second share
  		final BigInteger r2 = RandomNumberGenerator.generateRandomCoprimeInRange(n);
  		final BigInteger Eb = PaillierCipher.encrypt(publicKey, share2, r2);
  
  		// Create commitment
  		final EcPoint S = curve.addPoints(curve.multiply(g, share1), curve.multiply(h, share2));
  
  		// Warm up
  		PedersenEqRangeProof proof = null;
  		for (int i = 0; i < 20; i++) {
  			proof = PedersenEqRangeProofGenerator.generate(publicKey, share1, share2, r1, r2, Ea, Eb, S);
  		}
  		System.out.println("ZKP size: " + proof.getSize());
  
  		// Do test
  		long timeNs = 0;
  		final int iterations = 1000;
  		for (int i = 0; i < iterations; i++) {
  			proof = PedersenEqRangeProofGenerator.generate(publicKey, share1, share2, r1, r2, Ea, Eb, S);
  			final long start = System.nanoTime();
  			PedersenEqRangeProofVerifier.isValid(proof, Ea, Eb, S, publicKey);
  			final long end = System.nanoTime();
  			timeNs += (end - start);
  		}
  
  		System.out.println("Total time (ms): " + timeNs / (((long) iterations) * 1_000_000.0));
  	}
test_case.class_method_signature: PedersenEqRangeProofTest.testVerifyPerformance()
test_case.full_signature: @Test public void testVerifyPerformance()
test_case.identifier: testVerifyPerformance
test_case.invocations: generate getPublicKey generateRandomInteger getR generateRandomInteger getR getN generateRandomCoprimeInRange encrypt generateRandomCoprimeInRange encrypt addPoints multiply multiply generate println getSize generate nanoTime isValid nanoTime println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testVerifyPerformance()
focal_class.declarator: serialVersionUID = 4066675352715186273L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 4066675352715186273L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: Ealpha
focal_class.modifier: private final
focal_class.original_string: private final BigInteger Ealpha;
focal_class.type: BigInteger
focal_class.var_name: Ealpha
focal_class.declarator: Ebeta
focal_class.modifier: private final
focal_class.original_string: private final BigInteger Ebeta;
focal_class.type: BigInteger
focal_class.var_name: Ebeta
focal_class.declarator: S1
focal_class.modifier: private final
focal_class.original_string: private final EcPoint S1;
focal_class.type: EcPoint
focal_class.var_name: S1
focal_class.declarator: z1
focal_class.modifier: private final
focal_class.original_string: private final BigInteger z1;
focal_class.type: BigInteger
focal_class.var_name: z1
focal_class.declarator: z2
focal_class.modifier: private final
focal_class.original_string: private final BigInteger z2;
focal_class.type: BigInteger
focal_class.var_name: z2
focal_class.declarator: e1
focal_class.modifier: private final
focal_class.original_string: private final BigInteger e1;
focal_class.type: BigInteger
focal_class.var_name: e1
focal_class.declarator: e2
focal_class.modifier: private final
focal_class.original_string: private final BigInteger e2;
focal_class.type: BigInteger
focal_class.var_name: e2
focal_class.file: pross-common/src/main/java/com/ibm/pross/common/util/crypto/zkp/pedersen/PedersenEqRangeProof.java
focal_class.identifier: PedersenEqRangeProof
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: PedersenEqRangeProof.PedersenEqRangeProof(final BigInteger Ealpha, BigInteger Ebeta, final EcPoint S1, final BigInteger z1,
  			final BigInteger z2, final BigInteger e1, BigInteger e2)
focal_class.full_signature: public  PedersenEqRangeProof(final BigInteger Ealpha, BigInteger Ebeta, final EcPoint S1, final BigInteger z1,
  			final BigInteger z2, final BigInteger e1, BigInteger e2)
focal_class.identifier: PedersenEqRangeProof
focal_class.modifiers: public
focal_class.parameters: (final BigInteger Ealpha, BigInteger Ebeta, final EcPoint S1, final BigInteger z1,
  			final BigInteger z2, final BigInteger e1, BigInteger e2)
focal_class.signature:  PedersenEqRangeProof(final BigInteger Ealpha, BigInteger Ebeta, final EcPoint S1, final BigInteger z1,
  			final BigInteger z2, final BigInteger e1, BigInteger e2)
focal_class.class_method_signature: PedersenEqRangeProof.getEalpha()
focal_class.full_signature: public BigInteger getEalpha()
focal_class.identifier: getEalpha
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger
focal_class.signature: BigInteger getEalpha()
focal_class.class_method_signature: PedersenEqRangeProof.getEbeta()
focal_class.full_signature: public BigInteger getEbeta()
focal_class.identifier: getEbeta
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger
focal_class.signature: BigInteger getEbeta()
focal_class.class_method_signature: PedersenEqRangeProof.getS1()
focal_class.full_signature: public EcPoint getS1()
focal_class.identifier: getS1
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: EcPoint
focal_class.signature: EcPoint getS1()
focal_class.class_method_signature: PedersenEqRangeProof.getZ1()
focal_class.full_signature: public BigInteger getZ1()
focal_class.identifier: getZ1
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger
focal_class.signature: BigInteger getZ1()
focal_class.class_method_signature: PedersenEqRangeProof.getZ2()
focal_class.full_signature: public BigInteger getZ2()
focal_class.identifier: getZ2
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger
focal_class.signature: BigInteger getZ2()
focal_class.class_method_signature: PedersenEqRangeProof.getE1()
focal_class.full_signature: public BigInteger getE1()
focal_class.identifier: getE1
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger
focal_class.signature: BigInteger getE1()
focal_class.class_method_signature: PedersenEqRangeProof.getE2()
focal_class.full_signature: public BigInteger getE2()
focal_class.identifier: getE2
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger
focal_class.signature: BigInteger getE2()
focal_class.class_method_signature: PedersenEqRangeProof.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: PedersenEqRangeProof.getSize()
focal_class.full_signature: public long getSize()
focal_class.identifier: getSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getSize()
focal_class.class_method_signature: PedersenEqRangeProof.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: PedersenEqRangeProof.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_method.body: public long getSize() {
  		return Ealpha.toByteArray().length + Ebeta.toByteArray().length + (S1.getX().toByteArray().length + 1)
  				+ z1.toByteArray().length + z2.toByteArray().length + e1.toByteArray().length + e2.toByteArray().length;
  	}
focal_method.class_method_signature: PedersenEqRangeProof.getSize()
focal_method.full_signature: public long getSize()
focal_method.identifier: getSize
focal_method.invocations: toByteArray toByteArray toByteArray getX toByteArray toByteArray toByteArray toByteArray
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: long
focal_method.signature: long getSize()