| java.lang.Object java.security.Signature sun.security.provider.DSA
DSA | final public class DSA extends Signature (Code) | | The Digital Signature Standard (using the Digital Signature
Algorithm), as described in fips186 of the National Instute of
Standards and Technology (NIST), using fips180-1 (SHA-1).
author: Benjamin Renaud version: 1.88, 02/02/00 See Also: DSAPublicKey See Also: DSAPrivateKey |
Constructor Summary | |
public | DSA() Construct a blank DSA object. |
Method Summary | |
static int[] | SHA_7(int[] m1, int[] h) Computes set 1 thru 7 of SHA-1 on m1. | protected Object | engineGetParameter(String key) Return the value of the requested parameter. | protected void | engineInitSign(PrivateKey privateKey) Initialize the DSA object with a DSA private key. | protected void | engineInitVerify(PublicKey publicKey) Initialize the DSA object with a DSA public key. | protected void | engineSetParameter(String key, Object param) This implementation recognizes the following parameter:
- Kseed
- a byte array.
| protected byte[] | engineSign() Sign all the data thus far updated. | protected void | engineUpdate(byte b) Update a byte to be signed or verified. | protected void | engineUpdate(byte[] data, int off, int len) Update an array of bytes to be signed or verified. | protected boolean | engineVerify(byte[] signature) Verify all the data thus far updated. | protected boolean | engineVerify(byte[] signature, int offset, int length) Verify all the data thus far updated. | BigInteger | generateK(BigInteger q) | BigInteger | generateK(int[] seed, BigInteger q) Compute k for a DSA signature.
Parameters: seed - the seed for generating k. | BigInteger | generateR(BigInteger p, BigInteger q, BigInteger g, BigInteger k) | BigInteger | generateS(BigInteger x, BigInteger q, BigInteger r, BigInteger k) | BigInteger | generateV(BigInteger y, BigInteger p, BigInteger q, BigInteger g, BigInteger w, BigInteger r) | BigInteger | generateW(BigInteger p, BigInteger q, BigInteger g, BigInteger s) | public String | toString() Return a human readable rendition of the engine. |
DSA | public DSA() throws NoSuchAlgorithmException(Code) | | Construct a blank DSA object. It can generate keys, but must be
initialized before being usable for signing or verifying.
|
SHA_7 | static int[] SHA_7(int[] m1, int[] h)(Code) | | Computes set 1 thru 7 of SHA-1 on m1.
|
engineGetParameter | protected Object engineGetParameter(String key)(Code) | | Return the value of the requested parameter. Recognized
parameters are:
- Kseed
- a byte array.
the value of the requested parameter. See Also: java.security.SignatureEngine See Also: |
engineInitVerify | protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException(Code) | | Initialize the DSA object with a DSA public key.
Parameters: publicKey - the DSA public key. exception: InvalidKeyException - if the key is not a valid DSA publickey. |
engineSetParameter | protected void engineSetParameter(String key, Object param)(Code) | | This implementation recognizes the following parameter:
- Kseed
- a byte array.
|
engineSign | protected byte[] engineSign() throws SignatureException(Code) | | Sign all the data thus far updated. The signature is formatted
according to the Canonical Encoding Rules, returned as a DER
sequence of Integer, r and s.
a signature block formatted according to the CanonicalEncoding Rules. exception: SignatureException - if the signature object was notproperly initialized, or if another exception occurs. See Also: sun.security.DSA.engineUpdate See Also: sun.security.DSA.engineVerify |
engineUpdate | protected void engineUpdate(byte b)(Code) | | Update a byte to be signed or verified.
Parameters: b - the byte to updated. |
engineUpdate | protected void engineUpdate(byte[] data, int off, int len)(Code) | | Update an array of bytes to be signed or verified.
Parameters: data - the bytes to be updated. |
engineVerify | protected boolean engineVerify(byte[] signature) throws SignatureException(Code) | | Verify all the data thus far updated.
Parameters: signature - the alledged signature, encoded using theCanonical Encoding Rules, as a sequence of integers, r and s. exception: SignatureException - if the signature object was notproperly initialized, or if another exception occurs. See Also: sun.security.DSA.engineUpdate See Also: sun.security.DSA.engineSign See Also: |
engineVerify | protected boolean engineVerify(byte[] signature, int offset, int length) throws SignatureException(Code) | | Verify all the data thus far updated.
Parameters: signature - the alledged signature, encoded using theCanonical Encoding Rules, as a sequence of integers, r and s. Parameters: offset - the offset to start from in the array of bytes. Parameters: length - the number of bytes to use, starting at offset. exception: SignatureException - if the signature object was notproperly initialized, or if another exception occurs. See Also: sun.security.DSA.engineUpdate See Also: sun.security.DSA.engineSign See Also: |
generateK | BigInteger generateK(int[] seed, BigInteger q)(Code) | | Compute k for a DSA signature.
Parameters: seed - the seed for generating k. This seed should besecure. This is what is refered to as the KSEED in the DSAspecification. Parameters: g - the g parameter from the DSA key pair. |
toString | public String toString()(Code) | | Return a human readable rendition of the engine.
|
|
|