Class ElGamal_Ciphertext
java.lang.Object
edu.fiu.adwise.homomorphic_encryption.elgamal.ElGamal_Ciphertext
- All Implemented Interfaces:
Serializable
Represents an ElGamal ciphertext consisting of two components: g^r and m * h^r (or g^m * h^r).
This class is used in the ElGamal encryption scheme.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BigIntegerThe first component of the ciphertext, g^r.final BigIntegerThe second component of the ciphertext, m * h^r or g^m * h^r. -
Constructor Summary
ConstructorsConstructorDescriptionElGamal_Ciphertext(BigInteger gr, BigInteger mhr) Constructs an ElGamal ciphertext with the given components. -
Method Summary
-
Field Details
-
gr
The first component of the ciphertext, g^r. -
hrgm
The second component of the ciphertext, m * h^r or g^m * h^r.
-
-
Constructor Details
-
ElGamal_Ciphertext
Constructs an ElGamal ciphertext with the given components.- Parameters:
gr- The first component of the ciphertext (g^r).mhr- The second component of the ciphertext (m * h^r or g^m * h^r).
-
-
Method Details
-
getA
Retrieves the first component of the ciphertext (g^r).- Returns:
- The first component of the ciphertext.
-
getB
Retrieves the second component of the ciphertext (m * h^r or g^m * h^r).- Returns:
- The second component of the ciphertext.
-