paillierp
Class PartialDecryption

java.lang.Object
  extended by paillierp.PartialDecryption
All Implemented Interfaces:
java.io.Serializable

public class PartialDecryption
extends java.lang.Object
implements java.io.Serializable

A partial decryption in the Threshold Paillier encryption scheme with necessary data to proceed with the full decryption. To produce the full decryption of any ciphertext, at least w decryption servers must provide their partial decryptions. Furthermore, the source ID of each partial decryption is essential in combining the shares to produce a full and complete decryption of the original ciphertext. For this reason, a special datatype has been produced to hold only the partial decryption and the source ID.

Author:
James Garrity
See Also:
Serialized Form

Field Summary
private  java.math.BigInteger decryption
          The partial decryption
private  int id
          The ID number of the decryption server who decrypted this.
private static long serialVersionUID
          This Serial ID
 
Constructor Summary
PartialDecryption(java.math.BigInteger decryption, int id)
          Links the partial decryption decryption as coming from decryption server id.
PartialDecryption(byte[] b)
          Translates a byte array, of which the first four bytes contain the id and the last number of bytes contain the two's complement binary representation of a BigInteger.
PartialDecryption(PaillierPrivateThresholdKey key, java.math.BigInteger ciphertext)
          Computes the partial decryption of ciphertext using the private key key.
 
Method Summary
 java.math.BigInteger getDecryptedValue()
          Returns the partial decryption string
 int getID()
          Returns the ID of the secret key which produced this partial decryption
 byte[] toByteArray()
          Returns a byte array where the first four bytes signify the ID and the remaining signify the partial decryption.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
This Serial ID

See Also:
Constant Field Values

decryption

private java.math.BigInteger decryption
The partial decryption


id

private int id
The ID number of the decryption server who decrypted this.

Constructor Detail

PartialDecryption

public PartialDecryption(java.math.BigInteger decryption,
                         int id)
Links the partial decryption decryption as coming from decryption server id.

Parameters:
decryption - a partial decryption
id - the id of the secret key who composed this partial decryption

PartialDecryption

public PartialDecryption(byte[] b)
Translates a byte array, of which the first four bytes contain the id and the last number of bytes contain the two's complement binary representation of a BigInteger.

Parameters:
b -

PartialDecryption

public PartialDecryption(PaillierPrivateThresholdKey key,
                         java.math.BigInteger ciphertext)
Computes the partial decryption of ciphertext using the private key key. This is essentially the value ciphertextsi.

Parameters:
key - private key of decryption server i
ciphertext - original ciphertext
Method Detail

getDecryptedValue

public java.math.BigInteger getDecryptedValue()
Returns the partial decryption string

Returns:
the value ci

getID

public int getID()
Returns the ID of the secret key which produced this partial decryption

Returns:
the secret key ID used

toByteArray

public byte[] toByteArray()
Returns a byte array where the first four bytes signify the ID and the remaining signify the partial decryption.

Returns:
byte array of the ID concatenated to byte array of the partial decryption.