Class GMPrivateKey
java.lang.Object
edu.fiu.adwise.homomorphic_encryption.gm.GMPrivateKey
- All Implemented Interfaces:
GMKey,Serializable,Key,PrivateKey,Destroyable
This class represents the private key for the Goldwasser-Micali (GM) encryption scheme.
It implements the
PrivateKey and GMKey interfaces and provides access
to the private key components \( p \), \( q \), and the modulus \( n \).- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm name for this private key.byte[]Returns the encoded form of the private key.Returns the format of the encoded key.getN()Retrieves the modulus \( n \) associated with this private key.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Method Details
-
getAlgorithm
Returns the algorithm name for this private 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 private 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 private key.- Specified by:
getNin interfaceGMKey- Returns:
- The modulus \( n \) as a
BigInteger.
-