Class Dsa
- All Implemented Interfaces:
AutoCloseable
Generate, import, export, sign, and verify DSA keys and signatures.
Chilkat.Dsa is the Chilkat class for DSA key generation,
DSA key import/export, DSA hash signing, and DSA signature verification.
It supports private and public keys in DER, PEM, encrypted PEM, XML,
explicit component, and OpenSSL parameter workflows. It also exposes DSA key
components as hex-encoded SSH1-format bignums and provides helpers for
working with encoded hashes and signatures.
Generate DSA keys
Create DSA key pairs and parameters for workflows that still require DSA-based signing or verification.
Import and export keys
Load and save private or public DSA keys in DER, PEM, encrypted PEM, XML, component-based, and OpenSSL-compatible formats.
Sign hashes
Create DSA signatures over message digests using a loaded private key and the appropriate encoded hash input.
Verify signatures
Verify DSA signatures using a public key, encoded hash, and signature data.
Key components
Access DSA parameters and key components as hex-encoded SSH1-format bignums for low-level interoperability scenarios.
Encoded data helpers
Work with encoded hashes and signatures when applications need hex, Base64, or other textual representations of binary values.
Common pattern:
Load or generate a DSA key, compute the message hash with the desired hash
algorithm, then use Dsa to sign the hash with the private key or
verify the signature with the public key. For new protocol designs, consider
whether a more modern signature algorithm is preferred; use this class when
DSA is required for compatibility.
For an extended overview, see Dsa Class Overview.
</section>
Instances hold a native Chilkat object: close them with ChilkatObject.close() (try-with-resources) when
done; an unclosed instance is freed when it becomes unreachable.
- See Also:
- Online reference
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLoads a DSA private key from the DER bytes contained in theBinDataobject passed in.bdvoidfromDerFile(String path)Loads a DSA private key from the DER-encoded file specified by.pathvoidfromEncryptedPem(String password, String pemData)Loads a DSA private key from the PEM text in.pemDatavoidLoads an unencrypted DSA private key from the PEM text in.pemDatavoidfromPublicDerBd(BinData bd)Loads a DSA public key from the DER bytes contained in theBinDataobject passed in.bdvoidfromPublicDerFile(String path)Loads a DSA public key from the DER-encoded file specified by.pathvoidfromPublicPem(String pemData)Loads a DSA public key from the PEM text in.pemDatavoidLoads a DSA public or private key from the XML text in.xmlKeyvoidgenKey(int numBits)Generates a new DSA key pair with aPsize ofbits.numBitsvoidgenKey2(int keyLenBits, int modLenBits)Generates a new DSA key pair using an explicit(L, N)parameter-size combination.voidGenerates a new DSA key pair from OpenSSL-style DSA parameters stored as DER bytes in theBinDataobject passed in.bdvoidgenKeyFromParamsDerFile(String path)Generates a new DSA key pair from the OpenSSL-style DER DSA-parameters file specified by.pathvoidgenKeyFromParamsPem(String pem)Generates a new DSA key pair from OpenSSL-style DSA parameters supplied as PEM text in.pemvoidgenKeyFromParamsPemFile(String path)Generates a new DSA key pair from the OpenSSL-style PEM DSA-parameters file specified by.pathvoidgenKeyFromPQG(String pHex, String qHex, String gHex)Generates a new DSA private/public key pair using the preselected domain parametersP,Q, andGsupplied in,pHex, andqHex.gHexgetEncodedHash(String encoding)Returns the currentHashbytes encoded according to.encodinggetEncodedSignature(String encoding)Returns the currentSignaturebytes encoded according to.encodingintSpecifies the size, in bits, of the DSA subgroup parameterQused by the legacyGenKeymethod.getHexG()Returns the DSA domain parameterG, the generator of the subgroup of orderQmoduloP.getHexP()Returns the DSA domain parameterP, the large prime modulus.getHexQ()Returns the DSA domain parameterQ, a prime divisor ofP - 1.getHexX()Returns the DSA private valueX.getHexY()Returns the DSA public valueY, whereY = GX mod P.Reserved for uncommon or compatibility-specific options.Loads the entire file specified byand returns its contents as text using the legacy ANSI character encoding.pathvoidWritesto the file specified bystrToSaveusing the legacy ANSI character encoding.pathvoidsetEncodedHash(String encoding, String encodedHash)Decodesusing the encoding named byencodedHashand stores the resulting bytes in theencodingHashproperty.voidsetEncodedSignature(String encoding, String encodedSig)Decodes the signature text inusing the encoding named byencodedSigand stores the resulting bytes in theencodingSignatureproperty.voidsetEncodedSignatureRS(String encoding, String encodedR, String encodedS)Builds the DSA signature from separately encodedrandsinteger values.voidsetGroupSize(int value)Sets theGroupSizeproperty; seegetGroupSize().voidsetKeyExplicit(int groupSizeInBytes, String pHex, String qHex, String gHex, String xHex)Loads a DSA private key from explicitly supplied components.voidsetPubKeyExplicit(int groupSizeInBytes, String pHex, String qHex, String gHex, String yHex)Loads a DSA public key from explicitly supplied components.voidsetUncommonOptions(String value)Sets theUncommonOptionsproperty; seegetUncommonOptions().voidsignHash()Creates a DSA signature over the digest currently stored inHash.voidWrites the DER-encoded DSA private key to theBinDataobject passed in.bdvoidWrites the loaded DSA private key to the DER file specified by.pathtoEncryptedPem(String password)Returns the loaded DSA private key as password-encrypted PEM text usingas the password.passwordtoPem()Returns the loaded DSA private key as unencrypted PEM text.voidtoPublicDerFile(String path)Writes the public portion of the loaded DSA key to the DER file specified by.pathReturns the public portion of the loaded DSA key as PEM text.toXml(boolean bPublicOnly)Returns the loaded DSA key as XML.voidverify()Verifies the DSA signature currently stored inSignatureagainst the digest stored inHash, using the loaded public key.booleanChecks the mathematical validity and internal consistency of the DSA public or private key currently loaded in the object.Methods inherited from class com.chilkatsoft.chilkat2.ChilkatObject
close, getDebugLogFilePath, getLastErrorHtml, getLastErrorText, getLastErrorXml, getLastMethodSuccess, getVerboseLogging, getVersion, isClosed, setDebugLogFilePath, setLastMethodSuccess, setVerboseLogging, toString
-
Constructor Details
-
Dsa
public Dsa()Creates a newDsaobject.
-
-
Method Details
-
getGroupSize
public int getGroupSize()Specifies the size, in bits, of the DSA subgroup parameterQused by the legacyGenKeymethod. The default is160. This also determines the natural size of the DSA signature componentsrands.Applications should normally leave this property at its default. When an explicit standards-era
(L, N)parameter pair is required, useGenKey2, whereLis the bit length ofPandNis the bit length ofQ.Legacy algorithm: NIST FIPS 186-5 no longer approves DSA for generating new digital signatures. Retain DSA generation and signing only for interoperability with systems or data formats that specifically require it; DSA verification remains useful for legacy signatures.
- Returns:
- the value of the
GroupSizeproperty
-
setGroupSize
public void setGroupSize(int value)Sets theGroupSizeproperty; seegetGroupSize().- Parameters:
value- the new value
-
getHexG
Returns the DSA domain parameterG, the generator of the subgroup of orderQmoduloP.The returned text is a hexadecimal encoding of Chilkat's SSH1-format bignum representation, which includes a two-byte bit-length prefix followed by the unsigned integer bytes.
- Returns:
- the value of the
HexGproperty (read-only)
-
getHexP
Returns the DSA domain parameterP, the large prime modulus.The returned text is a hexadecimal encoding of Chilkat's SSH1-format bignum representation, which includes a two-byte bit-length prefix followed by the unsigned integer bytes.
- Returns:
- the value of the
HexPproperty (read-only)
-
getHexQ
Returns the DSA domain parameterQ, a prime divisor ofP - 1. The bit length ofQis commonly written asNand determines the range of the private valueXand signature componentsrands.The returned text is a hexadecimal encoding of Chilkat's SSH1-format bignum representation, which includes a two-byte bit-length prefix followed by the unsigned integer bytes.
- Returns:
- the value of the
HexQproperty (read-only)
-
getHexX
Returns the DSA private valueX. It is present only when the object contains a private key and satisfies0 < X < Q.The returned text is a hexadecimal encoding of Chilkat's SSH1-format bignum representation, which includes a two-byte bit-length prefix followed by the unsigned integer bytes.
Sensitive value: Anyone who obtains
Xcan create signatures as the key owner. Do not log, transmit, or persist this value unless it is protected as private-key material.- Returns:
- the value of the
HexXproperty (read-only)
-
getHexY
Returns the DSA public valueY, whereY = GX mod P. It is available when either a public or private DSA key is loaded.The returned text is a hexadecimal encoding of Chilkat's SSH1-format bignum representation, which includes a two-byte bit-length prefix followed by the unsigned integer bytes.
- Returns:
- the value of the
HexYproperty (read-only)
-
getUncommonOptions
Reserved for uncommon or compatibility-specific options. The default is the empty string, and applications should normally leave this property unchanged unless Chilkat documentation or support identifies a specific keyword required for the target system.- Returns:
- the value of the
UncommonOptionsproperty
-
setUncommonOptions
Sets theUncommonOptionsproperty; seegetUncommonOptions().- Parameters:
value- the new value (notnull)
-
fromDerBd
Loads a DSA private key from the DER bytes contained in theBinDataobject passed in. Returnsbdtrueon successful decoding.Private-key handling: The
BinDatacontent contains secret key material and should be cleared or released when no longer needed.- Parameters:
bd- thebdargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
fromDerFile
Loads a DSA private key from the DER-encoded file specified by. Returnspathtruewhen the file is read and decoded successfully; otherwise returnsfalse.Private-key handling: Restrict access to the file because it contains secret key material. Check
LastErrorTextwhen loading fails.- Parameters:
path- thepathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
fromEncryptedPem
Loads a DSA private key from the PEM text in.pemDatasupplies the password when the PEM is encrypted. If the PEM is unencrypted, the password is ignored and the key is loaded normally.passwordReturns
trueon success andfalseif the PEM cannot be decoded, the password is incorrect, or the contained key is not a supported DSA private key.Security: Do not embed production passwords in source code or log the PEM text. Prefer protected secret storage and encrypted private-key files where practical.
- Parameters:
password- thepasswordargument (notnull)pemData- thepemDataargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
fromPem
Loads an unencrypted DSA private key from the PEM text in. On success, the object contains the private key and its corresponding public components.pemDataUnencrypted private key: PEM armor is only a text encoding; it does not protect the private key. Treat the string as highly sensitive and use
FromEncryptedPemwhen password-protected PEM is available.- Parameters:
pemData- thepemDataargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
fromPublicDerBd
Loads a DSA public key from the DER bytes contained in theBinDataobject passed in. The resulting key can verify signatures but cannot sign.bd- Parameters:
bd- thebdargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
fromPublicDerFile
Loads a DSA public key from the DER-encoded file specified by. Returnspathtruewhen the file is read and decoded successfully; otherwise returnsfalse.- Parameters:
path- thepathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
fromPublicPem
Loads a DSA public key from the PEM text in. ReturnspemDatatruewhen the PEM contains a supported DSA public key and is decoded successfully.- Parameters:
pemData- thepemDataargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
fromXml
Loads a DSA public or private key from the XML text in. The XML content determines whether the resulting object contains public components only or also includes the private valuexmlKeyX.Security: XML is only a representation format. If the XML contains
X, it contains the complete private key and must be protected accordingly.- Parameters:
xmlKey- thexmlKeyargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
genKey
public void genKey(int numBits)Generates a new DSA key pair with aPsize ofbits.numBitsmust be at least 1024 and a multiple of 64. This legacy method uses the subgroup size selected bynumBitsGroupSize, whose default is 160 bits.For explicit standard parameter pairs such as
(2048, 224)or(3072, 256), useGenKey2.Legacy algorithm: DSA signature generation is no longer approved by FIPS 186-5. Generate new DSA keys only when required for compatibility with an existing protocol, key store, or signature format.
- Parameters:
numBits- thenumBitsargument- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
genKey2
public void genKey2(int keyLenBits, int modLenBits)Generates a new DSA key pair using an explicit(L, N)parameter-size combination.iskeyLenBitsL, the bit length of the prime modulusP.ismodLenBitsN, the bit length of the subgroup primeQ.L N Historical FIPS 186-4 combination
1024160Legacy2048224or256Supported parameter pairs3072256Largest listed pairCurrent standards status: These combinations come from the superseded FIPS 186-4 DSA specification. FIPS 186-5 no longer approves DSA signature generation; use this method only for compatibility.
- Parameters:
keyLenBits- thekeyLenBitsargumentmodLenBits- themodLenBitsargument- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
genKeyFromPQG
Generates a new DSA private/public key pair using the preselected domain parametersP,Q, andGsupplied in,pHex, andqHex.gHexEach argument is hexadecimal text in Chilkat's SSH1-format bignum representation. Chilkat generates a fresh private value
Xand derivesY; the supplied values are domain parameters, not an existing key pair.Parameter provenance: Only use DSA parameters obtained from a trusted, validated source. Malformed or maliciously chosen domain parameters can undermine signature security.
- Parameters:
pHex- thepHexargument (notnull)qHex- theqHexargument (notnull)gHex- thegHexargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
genKeyFromParamsDerBd
Generates a new DSA key pair from OpenSSL-style DSA parameters stored as DER bytes in theBinDataobject passed in.bdThe supplied data contains DSA domain parameters
P,Q, andG, not an existing private key. Chilkat validates or imports those parameters and generates a fresh private valueXand corresponding public valueY.- Parameters:
bd- thebdargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
genKeyFromParamsDerFile
Generates a new DSA key pair from the OpenSSL-style DER DSA-parameters file specified by.pathThe supplied data contains DSA domain parameters
P,Q, andG, not an existing private key. Chilkat validates or imports those parameters and generates a fresh private valueXand corresponding public valueY.Returns
truewhen the parameters are loaded and a key pair is generated successfully.- Parameters:
path- thepathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
genKeyFromParamsPem
Generates a new DSA key pair from OpenSSL-style DSA parameters supplied as PEM text in.pemThe supplied data contains DSA domain parameters
P,Q, andG, not an existing private key. Chilkat validates or imports those parameters and generates a fresh private valueXand corresponding public valueY.- Parameters:
pem- thepemargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
genKeyFromParamsPemFile
Generates a new DSA key pair from the OpenSSL-style PEM DSA-parameters file specified by.pathThe supplied data contains DSA domain parameters
P,Q, andG, not an existing private key. Chilkat validates or imports those parameters and generates a fresh private valueXand corresponding public valueY.A typical parameter file is PEM-armored with a
BEGIN DSA PARAMETERSheader. The newly generated private key can be exported with the applicableTo*methods.- Parameters:
path- thepathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getEncodedHash
Returns the currentHashbytes encoded according to. Useencodinghexorbase64.This method does not compute a hash; it only converts the bytes already stored in the
Hashproperty to text.- Parameters:
encoding- theencodingargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
getEncodedSignature
Returns the currentSignaturebytes encoded according to. Useencodinghexorbase64.After a successful
SignHashcall, the returned bytes are the ASN.1 DER-encoded DSA signature containing the integersrands.- Parameters:
encoding- theencodingargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
loadText
Loads the entire file specified byand returns its contents as text using the legacy ANSI character encoding.pathEncoding note: This convenience method is suitable for ASCII-compatible PEM and similar legacy text. It is not a general Unicode file reader; use an API with an explicit character encoding when UTF-8 or other Unicode text must be preserved.
- Parameters:
path- thepathargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
saveText
Writesto the file specified bystrToSaveusing the legacy ANSI character encoding. Returnspathtrueon success.Encoding note: This convenience method is appropriate for ASCII-compatible PEM text. It can lose characters that are not representable in the active ANSI encoding, so use an explicitly encoded text-writing API for general Unicode content.
- Parameters:
strToSave- thestrToSaveargument (notnull)path- thepathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
setEncodedHash
Decodesusing the encoding named byencodedHashand stores the resulting bytes in theencodingHashproperty. Usehexorbase64.The decoded value must be the already-computed message digest that will be signed by
SignHashor checked byVerify.- Parameters:
encoding- theencodingargument (notnull)encodedHash- theencodedHashargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
setEncodedSignature
Decodes the signature text inusing the encoding named byencodedSigand stores the resulting bytes in theencodingSignatureproperty. Usehexorbase64.The decoded bytes are expected to contain the ASN.1 DER-encoded DSA signature. Set the corresponding
Hashand public key before callingVerify.- Parameters:
encoding- theencodingargument (notnull)encodedSig- theencodedSigargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
setEncodedSignatureRS
Builds the DSA signature from separately encodedrandsinteger values.identifies the encoding used by bothencodingandencodedR; useencodedShexorbase64.On success,
Signaturecontains the ASN.1 DERSEQUENCEof the two integers and is ready for use withVerify.- Parameters:
encoding- theencodingargument (notnull)encodedR- theencodedRargument (notnull)encodedS- theencodedSargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
setKeyExplicit
public void setKeyExplicit(int groupSizeInBytes, String pHex, String qHex, String gHex, String xHex)Loads a DSA private key from explicitly supplied components.is the size ofgroupSizeInBytesQin bytes.,pHex,qHex, andgHexprovidexHexP,Q,G, and the private valueX, respectively.The corresponding public value
Y = GX mod Pis derived from the private key.SSH1 bignums: Each component string is hexadecimal text representing an SSH1-format bignum: a two-byte bit-length prefix followed by the unsigned integer bytes.
Sensitive value:
xHexcontains the private key. Do not expose it in logs or transmit it over an unprotected channel.- Parameters:
groupSizeInBytes- thegroupSizeInBytesargumentpHex- thepHexargument (notnull)qHex- theqHexargument (notnull)gHex- thegHexargument (notnull)xHex- thexHexargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
setPubKeyExplicit
public void setPubKeyExplicit(int groupSizeInBytes, String pHex, String qHex, String gHex, String yHex)Loads a DSA public key from explicitly supplied components.is the size ofgroupSizeInBytesQin bytes.,pHex,qHex, andgHexprovideyHexP,Q,G, and the public valueY, respectively.The resulting object can verify DSA signatures but cannot create them.
SSH1 bignums: Each component string is hexadecimal text representing an SSH1-format bignum: a two-byte bit-length prefix followed by the unsigned integer bytes.
- Parameters:
groupSizeInBytes- thegroupSizeInBytesargumentpHex- thepHexargument (notnull)qHex- theqHexargument (notnull)gHex- thegHexargument (notnull)yHex- theyHexargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
signHash
public void signHash()Creates a DSA signature over the digest currently stored inHash. A DSA private key must be loaded, and the digest must be set directly or withSetEncodedHashbefore this method is called.On success,
Signaturecontains an ASN.1 DER-encoded sequence of the DSA valuesrands. Retrieve it withGetEncodedSignatureor read theSignatureproperty.Security-critical nonce: Each DSA signature requires a secret per-signature value. Reuse or poor generation of that value can reveal the private key. Chilkat performs this generation internally; applications should not attempt to reuse signature state. Standards status: FIPS 186-5 no longer approves DSA for generating new signatures. Use this method only for required legacy interoperability.
- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
toDerBd
Writes the DER-encoded DSA private key to theBinDataobject passed in. Returnsbdtrueon success.Sensitive output: The destination contains unencrypted private-key bytes after a successful call. Protect and clear it appropriately.
- Parameters:
bd- thebdargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
toDerFile
Writes the loaded DSA private key to the DER file specified by. Returnspathtrueon success.Sensitive output: The file contains unencrypted private-key material. Apply restrictive filesystem permissions and avoid writing it to shared or temporary locations.
- Parameters:
path- thepathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
toEncryptedPem
Returns the loaded DSA private key as password-encrypted PEM text usingas the password.passwordPassword protection: Use a strong password and protect it separately from the PEM. Encrypted PEM reduces exposure at rest but does not make it safe to log or transmit indiscriminately.
- Parameters:
password- thepasswordargument (notnull)- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
toPem
Returns the loaded DSA private key as unencrypted PEM text.Unencrypted private key: PEM armor is not encryption. Anyone who obtains this text can use the private key, so prefer
ToEncryptedPemwhen password protection is required.- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
toPublicDerFile
Writes the public portion of the loaded DSA key to the DER file specified by. Returnspathtrueon success.- Parameters:
path- thepathargument (notnull)- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
toPublicPem
Returns the public portion of the loaded DSA key as PEM text. Public-key PEM may be distributed to parties that need to verify signatures; it does not contain the private valueX.- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
toXml
Returns the loaded DSA key as XML. SettobPublicOnlytrueto export public components only. Set it tofalseto include the private component when a private key is loaded.Security: When
isbPublicOnlyfalse, the XML can contain the private valueX. Protect it as private-key material.- Parameters:
bPublicOnly- thebPublicOnlyargument- Returns:
- the result (never
null) - Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
verify
public void verify()Verifies the DSA signature currently stored inSignatureagainst the digest stored inHash, using the loaded public key. Both values must be set before calling this method.Returns
trueonly when the signature is valid. Afalseresult can indicate an invalid signature, malformed input, an incompatible key, or another operational error; inspectLastErrorTextwhen the reason matters.- Throws:
ChilkatException- if the operation fails;ChilkatException.getLastErrorText()says why
-
verifyKey
public boolean verifyKey()Checks the mathematical validity and internal consistency of the DSA public or private key currently loaded in the object. Returnstruewhen the key parameters and available key components pass validation.This does not establish who owns the key, whether the key came from a trusted source, or whether it is suitable for a particular protocol.
- Returns:
- the result; this method never throws
ChilkatException
-