Class ElGamal_Ciphertext

java.lang.Object
edu.fiu.adwise.homomorphic_encryption.elgamal.ElGamal_Ciphertext
All Implemented Interfaces:
Serializable

public class ElGamal_Ciphertext extends Object implements 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 Details

    • gr

      public final BigInteger gr
      The first component of the ciphertext, g^r.
    • hrgm

      public final BigInteger hrgm
      The second component of the ciphertext, m * h^r or g^m * h^r.
  • Constructor Details

    • ElGamal_Ciphertext

      public ElGamal_Ciphertext(BigInteger gr, BigInteger mhr)
      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

      public BigInteger getA()
      Retrieves the first component of the ciphertext (g^r).
      Returns:
      The first component of the ciphertext.
    • getB

      public BigInteger getB()
      Retrieves the second component of the ciphertext (m * h^r or g^m * h^r).
      Returns:
      The second component of the ciphertext.