test_class.file: pross-common/src/test/java/com/ibm/pross/common/util/pvss/PublicSharingTest.java
test_class.identifier: PublicSharingTest
test_case.body: @Test
  	public void testProofPerformance() {
  
  		final int keyLength = 2048;
  		final int n = 11;
  		final int t = ((n - 1) / 2) + 1;
  
  		// Generate shareholder public keys
  		final PaillierKeyPair[] keyPairs = new PaillierKeyPair[n];
  		final PaillierPublicKey[] publicKeys = new PaillierPublicKey[n];
  		final PaillierPrivateKey[] privateKeys = new PaillierPrivateKey[n];
  		final PaillierKeyGenerator generator = new PaillierKeyGenerator(keyLength);
  		for (int i = 0; i < n; i++) {
  			keyPairs[i] = generator.generate();
  			publicKeys[i] = keyPairs[i].getPublicKey();
  			privateKeys[i] = keyPairs[i].getPrivateKey();
  		}
  
  		// Warm up
  		final PublicSharingGenerator pvssDealer = new PublicSharingGenerator(n, t);
  		PublicSharing sharing = null;
  		for (int i = 0; i < 20; i++) {
  			sharing = pvssDealer.shareSecret(BigInteger.valueOf(1), publicKeys);
  		}
  		System.out.println("Sharing size: " + sharing.getSize());
  
  		// Do test
  		long timeNs = 0;
  		final int iterations = 1000;
  		for (int i = 0; i < iterations; i++) {
  			final long start = System.nanoTime();
  			pvssDealer.shareRandomSecret(publicKeys);
  			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: PublicSharingTest.testProofPerformance()
test_case.full_signature: @Test public void testProofPerformance()
test_case.identifier: testProofPerformance
test_case.invocations: generate getPublicKey getPrivateKey shareSecret valueOf println getSize nanoTime shareRandomSecret nanoTime println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testProofPerformance()
focal_class.declarator: serialVersionUID = -7866009350143080725L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -7866009350143080725L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: pedersenCommitments
focal_class.modifier: private final
focal_class.original_string: private final EcPoint[] pedersenCommitments;
focal_class.type: EcPoint[]
focal_class.var_name: pedersenCommitments
focal_class.declarator: encryptedShares1
focal_class.modifier: private final
focal_class.original_string: private final BigInteger[] encryptedShares1;
focal_class.type: BigInteger[]
focal_class.var_name: encryptedShares1
focal_class.declarator: encryptedShares2
focal_class.modifier: private final
focal_class.original_string: private final BigInteger[] encryptedShares2;
focal_class.type: BigInteger[]
focal_class.var_name: encryptedShares2
focal_class.declarator: proofs
focal_class.modifier: private final
focal_class.original_string: private final PedersenEqRangeProof[] proofs;
focal_class.type: PedersenEqRangeProof[]
focal_class.var_name: proofs
focal_class.declarator: numShares
focal_class.modifier: private final
focal_class.original_string: private final int numShares;
focal_class.type: int
focal_class.var_name: numShares
focal_class.declarator: threshold
focal_class.modifier: private final
focal_class.original_string: private final int threshold;
focal_class.type: int
focal_class.var_name: threshold
focal_class.file: pross-common/src/main/java/com/ibm/pross/common/util/pvss/PublicSharing.java
focal_class.identifier: PublicSharing
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: PublicSharing.PublicSharing(final EcPoint[] pedersenCommitments, final BigInteger[] encryptedShares1,
  			final BigInteger[] encryptedShares2, final PedersenEqRangeProof[] proofs)
focal_class.full_signature: public  PublicSharing(final EcPoint[] pedersenCommitments, final BigInteger[] encryptedShares1,
  			final BigInteger[] encryptedShares2, final PedersenEqRangeProof[] proofs)
focal_class.identifier: PublicSharing
focal_class.modifiers: public
focal_class.parameters: (final EcPoint[] pedersenCommitments, final BigInteger[] encryptedShares1,
  			final BigInteger[] encryptedShares2, final PedersenEqRangeProof[] proofs)
focal_class.signature:  PublicSharing(final EcPoint[] pedersenCommitments, final BigInteger[] encryptedShares1,
  			final BigInteger[] encryptedShares2, final PedersenEqRangeProof[] proofs)
focal_class.class_method_signature: PublicSharing.getPedersenCommitments()
focal_class.full_signature: public EcPoint[] getPedersenCommitments()
focal_class.identifier: getPedersenCommitments
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: EcPoint[]
focal_class.signature: EcPoint[] getPedersenCommitments()
focal_class.class_method_signature: PublicSharing.getEncryptedShares1()
focal_class.full_signature: public BigInteger[] getEncryptedShares1()
focal_class.identifier: getEncryptedShares1
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger[]
focal_class.signature: BigInteger[] getEncryptedShares1()
focal_class.class_method_signature: PublicSharing.getEncryptedShares2()
focal_class.full_signature: public BigInteger[] getEncryptedShares2()
focal_class.identifier: getEncryptedShares2
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: BigInteger[]
focal_class.signature: BigInteger[] getEncryptedShares2()
focal_class.class_method_signature: PublicSharing.getProofs()
focal_class.full_signature: public PedersenEqRangeProof[] getProofs()
focal_class.identifier: getProofs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: PedersenEqRangeProof[]
focal_class.signature: PedersenEqRangeProof[] getProofs()
focal_class.class_method_signature: PublicSharing.getNumShares()
focal_class.full_signature: public int getNumShares()
focal_class.identifier: getNumShares
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumShares()
focal_class.class_method_signature: PublicSharing.getThreshold()
focal_class.full_signature: public int getThreshold()
focal_class.identifier: getThreshold
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getThreshold()
focal_class.class_method_signature: PublicSharing.verifyAllShares(final PaillierPublicKey[] shareholderKeys)
focal_class.full_signature: public boolean verifyAllShares(final PaillierPublicKey[] shareholderKeys)
focal_class.identifier: verifyAllShares
focal_class.modifiers: public
focal_class.parameters: (final PaillierPublicKey[] shareholderKeys)
focal_class.return: boolean
focal_class.signature: boolean verifyAllShares(final PaillierPublicKey[] shareholderKeys)
focal_class.class_method_signature: PublicSharing.verifyShare(final int shareIndex, final PaillierPublicKey encryptionKey)
focal_class.full_signature: public boolean verifyShare(final int shareIndex, final PaillierPublicKey encryptionKey)
focal_class.identifier: verifyShare
focal_class.modifiers: public
focal_class.parameters: (final int shareIndex, final PaillierPublicKey encryptionKey)
focal_class.return: boolean
focal_class.signature: boolean verifyShare(final int shareIndex, final PaillierPublicKey encryptionKey)
focal_class.class_method_signature: PublicSharing.getSecretCommitment()
focal_class.full_signature: public EcPoint getSecretCommitment()
focal_class.identifier: getSecretCommitment
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: EcPoint
focal_class.signature: EcPoint getSecretCommitment()
focal_class.class_method_signature: PublicSharing.accessShare1(final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.full_signature: public ShamirShare accessShare1(final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.identifier: accessShare1
focal_class.modifiers: public
focal_class.parameters: (final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.return: ShamirShare
focal_class.signature: ShamirShare accessShare1(final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.class_method_signature: PublicSharing.accessShare2(final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.full_signature: public ShamirShare accessShare2(final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.identifier: accessShare2
focal_class.modifiers: public
focal_class.parameters: (final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.return: ShamirShare
focal_class.signature: ShamirShare accessShare2(final int shareIndex, final PaillierPrivateKey decryptionKey)
focal_class.class_method_signature: PublicSharing.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: PublicSharing.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: PublicSharing.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: PublicSharing.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() {
  		long size = 0;
  		for (final EcPoint pedersenCommitment : this.pedersenCommitments) {
  			size += pedersenCommitment.getX().toByteArray().length + 1; // Assumes point compression
  		}
  		for (final BigInteger encryptedShare1 : this.encryptedShares1) {
  			size += encryptedShare1.toByteArray().length;
  		}
  		for (final BigInteger encryptedShare2 : this.encryptedShares2) {
  			size += encryptedShare2.toByteArray().length;
  		}
  		for (final PedersenEqRangeProof proof : this.proofs) {
  			size += proof.getSize();
  		}
  		return size;
  	}
focal_method.class_method_signature: PublicSharing.getSize()
focal_method.full_signature: public long getSize()
focal_method.identifier: getSize
focal_method.invocations: toByteArray getX toByteArray toByteArray getSize
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: long
focal_method.signature: long getSize()