ea
Class ElectionAuthority

java.lang.Object
  extended byea.ElectionAuthority

public class ElectionAuthority
extends java.lang.Object

This class resembles the ElectionAuthority of the Election. This class will handle the decryption of the results when enough decrypted shares are acquired from the Servers

Author:
bent

Constructor Summary
ElectionAuthority(PublicKey pk, ElectionProperties ep, boolean trustDecryptionServers)
          Creates a new ElectionAuthority
ElectionAuthority(PublicKey pk, ElectionProperties ep, BulletinBoard bb, boolean trustDecryptionServers)
          Creates a new ElectionAuthority
 
Method Summary
 java.math.BigInteger[] combineShares(int type)
          Combines the shares into a result.
 java.math.BigInteger shareCombine(DecryptedShare[] dsList)
          The method for combining the DecryptedShare's acquired from the decryption Servers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElectionAuthority

public ElectionAuthority(PublicKey pk,
                         ElectionProperties ep,
                         BulletinBoard bb,
                         boolean trustDecryptionServers)
Creates a new ElectionAuthority

Parameters:
pk - The PublicKey for this election
ep - The ElectionProperties for this election

ElectionAuthority

public ElectionAuthority(PublicKey pk,
                         ElectionProperties ep,
                         boolean trustDecryptionServers)
Creates a new ElectionAuthority

Parameters:
pk - The PublicKey for this election
ep - The ElectionProperties for this election
Method Detail

combineShares

public java.math.BigInteger[] combineShares(int type)
                                     throws java.rmi.RemoteException,
                                            InsufficientSharesException
Combines the shares into a result.

Parameters:
type - The election type. 0 if 1-out of L, 1 if k-out-of-L, 2 if 1-out-of-L Binary, 3 if k-out-of-L Binary.
Returns:
The final results of the election
Throws:
java.rmi.RemoteException
InsufficientSharesException

shareCombine

public java.math.BigInteger shareCombine(DecryptedShare[] dsList)
                                  throws InsufficientSharesException
The method for combining the DecryptedShare's acquired from the decryption Servers

Parameters:
dsList - Array of DecryptedShare's
Returns:
The result of the election
Throws:
InsufficientSharesException