Class GMPublicKey
java.lang.Object
edu.fiu.adwise.homomorphic_encryption.gm.GMPublicKey
- All Implemented Interfaces:
GMKey,Serializable,Key,PublicKey
This class represents the public key for the Goldwasser-Micali (GM) encryption scheme.
It implements the
PublicKey and GMKey interfaces and provides access
to the public key components \( n \) and \( y \).- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm name for this public key.byte[]Returns the encoded form of the public key.Returns the format of the encoded key.getN()Retrieves the modulus \( n \) associated with this public key.
-
Method Details
-
getAlgorithm
Returns the algorithm name for this public key.- Specified by:
getAlgorithmin interfaceKey- Returns:
- A string representing the algorithm name, "Goldwasser-Micali".
-
getFormat
Returns the format of the encoded key. -
getEncoded
public byte[] getEncoded()Returns the encoded form of the public key. Currently, this method returnsnull.- Specified by:
getEncodedin interfaceKey- Returns:
- A byte array representing the encoded key, or
null.
-
getN
Retrieves the modulus \( n \) associated with this public key.- Specified by:
getNin interfaceGMKey- Returns:
- The modulus \( n \) as a
BigInteger.
-