COM.claymoresystems.provider

Class DSASignature


public class DSASignature
extends RawDSASignature

A class to perform DSA signature and verification.

This uses RawDSASignature to perform DSASignature with SHA hashing

See FIPS PUB 186, ANSI X9.57

Author:
EKR

Constructor Summary

DSASignature()

Method Summary

protected void
engineInitSign(PrivateKey key)
SPI: Initializes this object for signing using the private key
protected void
engineInitVerify(PublicKey key)
SPI: Initializes this object for verification using the given key
protected byte[]
engineSign()
Sign the input, following FIPS-186.
protected void
engineUpdate(byte b)
SPI: Single byte update
protected void
engineUpdate(byte[] b, int off, int len)
SPI: Update with a buffer
protected boolean
engineVerify(byte[] signature)
SPI: Raw Verify

Methods inherited from class COM.claymoresystems.provider.RawDSASignature

engineGetParameter, engineInitSign, engineInitVerify, engineSetParameter, engineSign, engineUpdate, engineUpdate, engineVerify

Constructor Details

DSASignature

public DSASignature()

Method Details

engineInitSign

protected void engineInitSign(PrivateKey key)
            throws InvalidKeyException
SPI: Initializes this object for signing using the private key
Overrides:
engineInitSign in interface RawDSASignature
Parameters:
key - the private key

engineInitVerify

protected void engineInitVerify(PublicKey key)
            throws InvalidKeyException
SPI: Initializes this object for verification using the given key
Overrides:
engineInitVerify in interface RawDSASignature
Parameters:
key - the public key

engineSign

protected byte[] engineSign()
            throws SignatureException
Sign the input, following FIPS-186. The signature is encoded following ANSI X9.57: DSSSignature ::= SEQUENCE { r INTEGER, s INTEGER }
Overrides:
engineSign in interface RawDSASignature

engineUpdate

protected void engineUpdate(byte b)
            throws SignatureException
SPI: Single byte update
Overrides:
engineUpdate in interface RawDSASignature

engineUpdate

protected void engineUpdate(byte[] b,
                            int off,
                            int len)
            throws SignatureException
SPI: Update with a buffer
Overrides:
engineUpdate in interface RawDSASignature

engineVerify

protected boolean engineVerify(byte[] signature)
            throws SignatureException
SPI: Raw Verify
Overrides:
engineVerify in interface RawDSASignature

Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.