public class ElgamalPrivateKey extends java.lang.Object implements DecryptionKey
| Constructor and Description |
|---|
ElgamalPrivateKey(ElgamalPublicKey pub,
org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement a) |
ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG)
Create a new ElGamal private key.
|
ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG,
org.cryptimeleon.math.structures.groups.GroupElement g)
Creates a new ElGamal private key.
|
ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG,
org.cryptimeleon.math.structures.groups.GroupElement g,
org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement a)
Creates a new ElGamal private key.
|
ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG,
org.cryptimeleon.math.structures.groups.GroupElement g,
org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement a,
org.cryptimeleon.math.structures.groups.GroupElement h)
Creates a new Elgamal private key.
|
ElgamalPrivateKey(org.cryptimeleon.math.serialization.Representation repr,
ElgamalEncryption scheme) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement |
getA() |
org.cryptimeleon.math.structures.groups.GroupElement |
getG() |
org.cryptimeleon.math.structures.groups.Group |
getGroupG() |
ElgamalPublicKey |
getPublicKey() |
org.cryptimeleon.math.serialization.Representation |
getRepresentation() |
int |
hashCode() |
void |
setPublicKey(ElgamalPublicKey pk) |
public ElgamalPrivateKey(org.cryptimeleon.math.serialization.Representation repr,
ElgamalEncryption scheme)
public ElgamalPrivateKey(ElgamalPublicKey pub, org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement a)
public ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG,
org.cryptimeleon.math.structures.groups.GroupElement g,
org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement a,
org.cryptimeleon.math.structures.groups.GroupElement h)
groupG - the groupg - a generator of the group groupGa - the private exponent such that \(h = g^a\)h - the public key \(h = g^a\)public ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG,
org.cryptimeleon.math.structures.groups.GroupElement g,
org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement a)
Sets the public parameter h=g^a.
groupG - the group of this keyg - a generator of this groupa - the private exponentpublic ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG,
org.cryptimeleon.math.structures.groups.GroupElement g)
Chooses a uniformly at random in {0,...,n-1} where n is the size of the group. Sets the public parameter h=g^a.
groupG - the group of this keyg - a generator of this grouppublic ElgamalPrivateKey(org.cryptimeleon.math.structures.groups.Group groupG)
Chooses a random generator g of the given cyclic group of order n. Chooses a random exponent a in {0,....,n-1} and sets the private key to g,a,h=g^a
groupG - the group over which ElGamal is donepublic ElgamalPublicKey getPublicKey()
public void setPublicKey(ElgamalPublicKey pk)
public org.cryptimeleon.math.serialization.Representation getRepresentation()
getRepresentation in interface org.cryptimeleon.math.serialization.Representablepublic org.cryptimeleon.math.structures.rings.zn.Zn.ZnElement getA()
public org.cryptimeleon.math.structures.groups.Group getGroupG()
public org.cryptimeleon.math.structures.groups.GroupElement getG()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object