Encrypt and decrypt data with the Elgamal asymmetric key encryption algorithm for public-key cryptography.
The ElGamal class is used to encrypt/decrypt data with the Elgamal asymmetric key encryption algorithm for public-key cryptography.
Input and Output Properties
The class will determine the source and destination of the input and output based on which properties are set.
The order in which the input properties are checked is as follows:
When a valid source is found the search stops. The order in which the output properties are checked is as follows:
- OutputMessage: The output data is written to this property if no other destination is specified.
An Elgamal key is made up of a number of individual parameters.
The public key consists of the following parameters:
The class also includes the PublicKey field which holds the PEM formatted public key for ease of use. This is helpful if you are in control of both signature creation and verification process. When sending the public key to a recipient note that not all implementations will support using the PEM formatted value in PublicKey in which case the individual parameters must be sent.
The private key consists of the following parameters:PrivateKey field which holds the PEM formatted private key for ease of use. This is helpful for storing the private key more easily.
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
|InputFile||The file to process.|
|InputMessage||The message to process.|
|Key||The Elgamal key used for decryption.|
|OutputFile||The output file when encrypting or decrypting.|
|OutputMessage||The output message after processing.|
|Overwrite||Indicates whether or not the class should overwrite files.|
|RecipientKey||The recipient's public key used when encrypting.|
|UseHex||Whether input or output is hex encoded.|
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
|Config||Sets or retrieves a configuration setting.|
|CreateKey||Creates a new key.|
|Decrypt||Decrypts the input data using the specified private key.|
|Encrypt||Encrypts the input data using the recipient's public key.|
|Reset||Resets the class.|
|SetInputStream||Sets the stream from which the class will read data to encrypt or decrypt.|
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
|Error||Information about errors during data delivery.|
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
|CloseInputStreamAfterProcessing||Determines whether or not the input stream is closed after processing.|
|CloseOutputStreamAfterProcessing||Determines whether or not the output stream is closed after processing.|
|KeySize||The size, in bits, of the secret key.|
|BuildInfo||Information about the product's build.|
|GUIAvailable||Tells the class whether or not a message loop is available for processing events.|
|LicenseInfo||Information about the current license.|
|UseDaemonThreads||Whether threads created by the class are daemon threads.|
|UseInternalSecurityAPI||Tells the class whether or not to use the system security libraries or an internal implementation.|