DSA Component
Properties Methods Events Configuration Settings Errors
The DSA (Digital Signature Algorithm) component enables users to generate DSA hash signatures.
Syntax
TipcDSA
Remarks
The DSA (Digital Signature Algorithm) component enables users to generate DSA hash signatures.
To begin you must either specify an existing key or create a new key. Existing private keys may be specified by setting the Key* properties. To create a new key call CreateKey. Alternatively an existing certificate may be specified by setting the Certificate* properties
Signing
To sign data first set Key or Certificate. Select the input file by setting InputFile or InputMessage. Next call Sign. The Sign method will automatically compute the hash, and then sign the hash with the specified key.
Send the public key (see CreateKey for details), file, and HashSignature to the recipient.
To sign a hash without recomputing the hash simply set HashValue to the pre-computed hash value before calling Sign.
Signature Verification
To verify a signature specify the input data using InputFile or InputMessage. Set SignerKey or SignerCert. Next set HashSignature and call VerifySignature. The VerifySignature method will return True if the signature was successfully verified.
To verify a hash signature without recomputing the hash simply set HashValue to the pre-computed hash value before calling VerifySignature.
Hash Notes
The component will determine whether or not to recompute the hash based on the properties that are set. If a file is specified by InputFile or InputMessage the hash will be recomputed when calling Sign or VerifySignature. If the HashValue property is set the component will only sign the hash or verify the hash signature. Setting InputFile or InputMessage clears the HashValue property. Setting the HashValue property clears the input file selection.
DSA Key Notes
A DSA key is made up of a number of individual parameters. When calling CreateKey the Key* properties are populated with a new private and public key.
After calling Sign the public key must be sent to the recipient along with HashSignature so they may perform signature verification. Likewise you must obtain the public key along with HashSignature in order to perform signature verification.
The public key consists of the following parameters:
The component also includes the PublicKey property 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:
The component also include the PrivateKey property which holds the PEM formatted private key for ease of use. This is helpful for storing the private key more easily..Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
CertEncoded | The certificate (PEM/base64 encoded). |
CertStore | The name of the certificate store for the client certificate. |
CertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
CertStoreType | The type of certificate store for this certificate. |
CertSubject | The subject of the certificate used for client authentication. |
HashAlgorithm | The hash algorithm used for hash computation. |
HashSignature | The hash signature. |
HashValue | The hash value of the data. |
InputFile | The file to process. |
InputMessage | The message to process. |
Key | The DSA key. |
SignerCertEncoded | The certificate (PEM/base64 encoded). |
SignerCertStore | The name of the certificate store for the client certificate. |
SignerCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
SignerCertStoreType | The type of certificate store for this certificate. |
SignerCertSubject | The subject of the certificate used for client authentication. |
SignerKey | The public key used to verify the signature. |
UseHex | Whether HashValue and HashSignature are hex encoded. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting. |
CreateKey | Creates a new key. |
Reset | Resets the component. |
SetInputStream | Sets the stream from which the component will read data to encrypt or decrypt. |
Sign | Creates a hash signature. |
VerifySignature | Verifies the signature for the specified data. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
Error | Information about errors during data delivery. |
Progress | Fired as progress is made. |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
CloseInputStreamAfterProcessing | Determines whether or not the input stream is closed after processing. |
HashSignatureFormat | The format of the HashSignature. |
KeyFormat | How the public and private key are formatted. |
KeySize | The size, in bits, of the secret key. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |