|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpaillierp.key.PaillierKey
paillierp.key.PaillierThresholdKey
public class PaillierThresholdKey
A public key for the threshold Paillier cryptosystem CS1. Provides encryption credentials to encrypt, as well as the public variables and values needed for the threshold variant of the Paillier Public Key System. This threshold key includes the public key needed to encrypt a message (i.e. the n and g needed) and the public values needed to verify messages in the threshold scheme (i.e. the verifier v and the public verifier vi for each decryption server).
The public key for the threshold variant is nothing more than the
n and g as provided for in PaillierKey
and the
following additional public variables:
The set of verification keys {vi} is generated by the key generator and passed as an argument to this class, as well as all the above mentioned variables.
The public information contained in this key is sufficient to completely decrypt a ciphertext c, given the k≥w partial decryptions c1,...,ck.
NOTE: This is for the implementation where s=1.
PaillierThreshold
,
Serialized FormField Summary | |
---|---|
private java.math.BigInteger |
combineSharesConstant
The cached value of (4Δ2)-1 mod ns |
protected java.math.BigInteger |
delta
Δ=L!; this is used often in decryption algorithms. |
protected int |
l
Number of decryption servers L. |
private static long |
serialVersionUID
This Serial ID |
protected java.math.BigInteger |
v
Generates a cyclic group of squares in Z*n2. |
protected java.math.BigInteger[] |
vi
Verification key for each of the l decryption servers. |
protected int |
w
The minimum of decryption servers needed to make a correct decryption. |
Fields inherited from class paillierp.key.PaillierKey |
---|
k, MAX_KEY_SIZE, n, nPlusOne, ns, nSPlusOne, rnd |
Constructor Summary | |
---|---|
PaillierThresholdKey(java.math.BigInteger n,
int l,
java.math.BigInteger combineSharesConstant,
int w,
java.math.BigInteger v,
java.math.BigInteger[] viarray,
long seed)
Creates a new public key for the generalized Paillier threshold scheme from the given modulus n , for use on l
decryption servers, w of which are needed to decrypt
any message encrypted by using this public key. |
|
PaillierThresholdKey(java.math.BigInteger n,
int l,
int w,
java.math.BigInteger v,
java.math.BigInteger[] viarray,
long seed)
Creates a new public key for the generalized Paillier threshold scheme from the given modulus n , for use on l
decryption servers, w of which are needed to decrypt
any message encrypted by using this public key. |
|
PaillierThresholdKey(byte[] b,
long seed)
Creates a new public threshold key using a byte encoding of a key. |
Method Summary | |
---|---|
java.math.BigInteger |
getCombineSharesConstant()
Returns a cached value of (4*Δ)-1 mod n. |
java.math.BigInteger |
getDelta()
Returns the cached value Δ=l! where l is the number of decryption servers. |
int |
getL()
Returns the number of decryption servers. |
PaillierThresholdKey |
getThresholdKey()
The public key that may be used to encrypt data for private Paillier keys. |
java.math.BigInteger |
getV()
Returns the public verification value. |
java.math.BigInteger[] |
getVi()
Returns the verification keys for each decryption server. |
int |
getW()
Returns the threshold number of decryption servers needed to successfully decrypt any ciphertext created by this key. |
byte[] |
toByteArray()
Encodes this key into a byte array. |
Methods inherited from class paillierp.key.PaillierKey |
---|
canEncrypt, getK, getN, getNPlusOne, getNS, getNSPlusOne, getPublicKey, getRandomModN, getRandomModNSPlusOneStar, getRandomModNStar, getRnd, inModN, inModN, inModNS, inModNSPlusOne, inModNSPlusOneStar, inModNStar, inModNStar, isCiphertext, isPlaintext, setRnd, setRnd, updateRnd |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
protected java.math.BigInteger v
protected java.math.BigInteger[] vi
l
decryption servers.
In essence,
vi=vΔsi.
protected int l
protected java.math.BigInteger delta
protected int w
private java.math.BigInteger combineSharesConstant
Constructor Detail |
---|
public PaillierThresholdKey(java.math.BigInteger n, int l, int w, java.math.BigInteger v, java.math.BigInteger[] viarray, long seed)
n
, for use on l
decryption servers, w
of which are needed to decrypt
any message encrypted by using this public key. The values
v
and vi
correspond to the public
values v and
vi=vl!si
needed to verify the zero knowledge proofs.
n
- a safe prime product of p and q where
p'=(p-1)/2 and a'=(a-1)/2
are also both primesl
- number of decryption serversw
- threshold of servers needed to successfully decrypt any
ciphertext created by this public key.v
- a generator of a cyclic group of squares in
Z*n
2viarray
- array of verification keys where vi[i]
is
v
l
!si
where si
is the private key
for decryption server i
seed
- a long integer needed to start a random number generatorpublic PaillierThresholdKey(java.math.BigInteger n, int l, java.math.BigInteger combineSharesConstant, int w, java.math.BigInteger v, java.math.BigInteger[] viarray, long seed)
n
, for use on l
decryption servers, w
of which are needed to decrypt
any message encrypted by using this public key. The values
v
and vi
correspond to the public
values v and
vi=vl!si
needed to verify the zero knowledge proofs.
n
- a safe prime product of p and q where
p'=(p-1)/2 and a'=(a-1)/2
are also both primesl
- number of decryption serverscombineSharesConstant
- precomputed value (4*l
!)-1
mod n
sw
- threshold of servers needed to successfully decrypt any
ciphertext created by this public key. Note that
w
≤l
/2.v
- a generator of a cyclic group of squares in
Z*n
2viarray
- array of verification keys where vi[i]
is
v
l
!si
where si
is the private
key for decryption server i
seed
- a long integer needed to start a random number generatorpublic PaillierThresholdKey(byte[] b, long seed)
b
- Byte array of the necessary values of this private keyseed
- a long integer needed to start a random number generatortoByteArray()
Method Detail |
---|
public PaillierThresholdKey getThresholdKey()
public java.math.BigInteger getV()
public java.math.BigInteger[] getVi()
public int getL()
public java.math.BigInteger getDelta()
l
!public int getW()
public java.math.BigInteger getCombineSharesConstant()
public byte[] toByteArray()
n
, l
, w
, v
, and
vi
will be encoded in that order.
Further, before each BigInteger (except n
) is the 4-byte
equivalent to the size of the BigInteger for later parsing.
toByteArray
in class PaillierKey
PaillierThresholdKey(byte[], long)
,
BigInteger.toByteArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |