ostore.security.thresh
Class ThresholdSignature

java.lang.Object
  |
  +--java.security.SignatureSpi
        |
        +--java.security.Signature
              |
              +--ostore.security.thresh.ThresholdSignature
All Implemented Interfaces:
QSSignature, QuickSerializable

public class ThresholdSignature
extends Signature
implements QSSignature

A verification signature engine for threshold signatures. Will not actually produce signatures, only verify them.

Version:
$Id: ThresholdSignature.java,v 1.16 2002/08/02 19:39:56 geels Exp $
Author:
Sean C. Rhea

Field Summary
 
Fields inherited from class java.security.Signature
SIGN, state, UNINITIALIZED, VERIFY
 
Fields inherited from class java.security.SignatureSpi
appRandom
 
Constructor Summary
ThresholdSignature()
           
ThresholdSignature(InputBuffer buffer)
           
 
Method Summary
 String algorithm()
          The signing algorithm.
protected  Object engineGetParameter(String param)
           
protected  void engineInitSign(PrivateKey key)
           
protected  void engineInitVerify(PublicKey key)
           
protected  void engineSetParameter(String param, Object value)
           
protected  byte[] engineSign()
           
protected  void engineUpdate(byte b)
           
protected  void engineUpdate(byte[] in, int offset, int length)
           
protected  boolean engineVerify(byte[] signature)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 String provider()
          The signing algorithm's provider, as used with getInstance.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 
Methods inherited from class java.security.Signature
clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, verify, verify
 
Methods inherited from class java.security.SignatureSpi
engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineVerify
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThresholdSignature

public ThresholdSignature()

ThresholdSignature

public ThresholdSignature(InputBuffer buffer)
Method Detail

algorithm

public String algorithm()
Description copied from interface: QSSignature
The signing algorithm. Using this and the value of QSSignature.provider(), a user of this class should be able to produce a signature engine to pass to SignedQS.verify(java.security.PublicKey, java.security.Signature) by calling Signature.getInstance(String, String).

Specified by:
algorithm in interface QSSignature
Returns:
the name of the digital signature algorithm, for instance, "SHA-1/RSA/PKCS#1"

provider

public String provider()
Description copied from interface: QSSignature
The signing algorithm's provider, as used with getInstance. Using this and the value of QSSignature.algorithm(), a user of this class should be able to produce a signature engine to pass to SignedQS.verify(java.security.PublicKey, java.security.Signature) by calling Signature.getInstance(String, String).

Specified by:
provider in interface QSSignature
Returns:
the name of the digital signature algorithm provider, for instance, "CryptixCrypto"

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

engineInitSign

protected void engineInitSign(PrivateKey key)
                       throws InvalidKeyException
Specified by:
engineInitSign in class SignatureSpi
InvalidKeyException

engineInitVerify

protected void engineInitVerify(PublicKey key)
                         throws InvalidKeyException
Specified by:
engineInitVerify in class SignatureSpi
InvalidKeyException

engineUpdate

protected void engineUpdate(byte b)
                     throws SignatureException
Specified by:
engineUpdate in class SignatureSpi
SignatureException

engineUpdate

protected void engineUpdate(byte[] in,
                            int offset,
                            int length)
                     throws SignatureException
Specified by:
engineUpdate in class SignatureSpi
SignatureException

engineSign

protected byte[] engineSign()
                     throws SignatureException
Specified by:
engineSign in class SignatureSpi
SignatureException

engineVerify

protected boolean engineVerify(byte[] signature)
                        throws SignatureException
Specified by:
engineVerify in class SignatureSpi
SignatureException

engineSetParameter

protected void engineSetParameter(String param,
                                  Object value)
                           throws InvalidParameterException
Specified by:
engineSetParameter in class SignatureSpi
InvalidParameterException

engineGetParameter

protected Object engineGetParameter(String param)
                             throws InvalidParameterException
Specified by:
engineGetParameter in class SignatureSpi
InvalidParameterException