RSA BSAFE CRYPTO-J

Cryptographic Components for Java

JSAFE Javadoc JCE Javadoc Search

JSAFE_Signature Class Reference

The JSAFE_Signature class defines the factory method and API for all signature algorithm objects. This is the actual signing and verifying object; it does not perform key management or creation. This class can instantiate the classes that create and verify signatures and defines the functionality.

See Overview of Crypto-J for background and reference material on using and understanding Crypto-J.

Note: Not all Crypto-J transformations have OIDs assigned to them. See Crypto-J Transformations and Their Associated Classes for a list of transformations that have assigned OIDs.

Copyright © RSA Security Inc., 1997-2005. All rights reserved.

Inheritance diagram for JSAFE_Signature:

JSAFE_Object List of all members.

Public Methods

byte [] JSAFE_Signature:: getDERAlgorithmID () throws JSAFE_UnimplementedException
 Returns a new byte array containing the DER encoding of the algorithm ID of the algorithm in this object. More...

byte [] JSAFE_Signature:: getDERAlgorithmID (String format, boolean includeParams) throws JSAFE_UnimplementedException
 Returns the DER encoding of the algorithm ID of this object. More...

String JSAFE_Signature:: getDevice ()
 Returns the name of the device of record. More...

String [] JSAFE_Signature:: getDeviceList ()
 Returns a String array that describes all the devices used to execute the transformation. More...

abstract String JSAFE_Signature:: getSignatureAlgorithm ()
 Returns the standard signature algorithm name. More...

abstract String JSAFE_Signature:: getDigestAlgorithm ()
 Returns the standard digest algorithm name. More...

abstract String JSAFE_Signature:: getPaddingScheme ()
 Returns the standard padding scheme name. More...

int JSAFE_Signature:: getMaxInputLen ()
 Returns the maximum allowed input length. More...

int JSAFE_Signature:: getSignatureSize ()
 Returns the length of a resulting signature. More...

abstract void JSAFE_Signature:: setBlinding (int blindingLevel)
 Set the desired level of blinding. More...

abstract int JSAFE_Signature:: getBlinding ()
 Returns the level of blinding this object will use. More...

void JSAFE_Signature:: signInit (JSAFE_PrivateKey key, SecureRandom random) throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException
 Initializes this object to sign using the specified private key. More...

void JSAFE_Signature:: signInit (JSAFE_PrivateKey key, JSAFE_Parameters systemParameters, SecureRandom random) throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException
 Initializes this object to sign using the specified private key and the systemParameters (if the system parameters are not part of the key). More...

void JSAFE_Signature:: signInit (JSAFE_PrivateKey key, JSAFE_Parameters systemParameters, SecureRandom random, JSAFE_Session[] sessions) throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException
 Initializes this object to sign using the specified private key, systemParameters (if the system parameters are not part of the key) and sessions. More...

void JSAFE_Signature:: signReInit () throws JSAFE_InvalidUseException
 Re-initializes this object to sign using the private key passed in during an earlier call to signInit(). More...

void JSAFE_Signature:: signUpdate (byte[] partIn, int offset, int partInLen) throws JSAFE_InvalidUseException, JSAFE_InputException
 Adds more data to sign. More...

byte [] JSAFE_Signature:: signFinal () throws JSAFE_InvalidUseException, JSAFE_InputException, JSAFE_PaddingException
 Finalizes the signature process, appending the padding and creating the signature. More...

int JSAFE_Signature:: signFinal (byte[] signature, int offset) throws JSAFE_InvalidUseException, JSAFE_InputException, JSAFE_PaddingException
 Finalizes the signature process, appending the padding and creating the signature. More...

void JSAFE_Signature:: verifyInit (JSAFE_PublicKey key, SecureRandom random) throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException
 Initializes this object to verify using the specified public key. More...

void JSAFE_Signature:: verifyInit (JSAFE_PublicKey key, JSAFE_Parameters systemParameters, SecureRandom random) throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException
 Initializes this object to verify using key and the systemParameters (if the system parameters are not part of the key). More...

void JSAFE_Signature:: verifyInit (JSAFE_PublicKey key, JSAFE_Parameters systemParameters, SecureRandom random, JSAFE_Session[] sessions) throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException
 Initializes this object to verify using the specified public key and the systemParameters (if the system parameters are not part of the key). More...

void JSAFE_Signature:: verifyReInit () throws JSAFE_InvalidUseException
 Re-initializes this object to verify signatures using the public key passed in during a previous call to verifyInit(). More...

void JSAFE_Signature:: verifyUpdate (byte[] partIn, int offset, int partInLen) throws JSAFE_InvalidUseException, JSAFE_InputException
 Digests the first partInLen bytes of the array partIn, beginning at offset. More...

boolean JSAFE_Signature:: verifyFinal (byte[] signature, int offset, int signatureLen) throws JSAFE_InvalidUseException, JSAFE_InputException, JSAFE_PaddingException
 Finalizes the verification process, comparing the signature to the value determined in the verification process. More...

void JSAFE_Signature:: clearSensitiveData ()
 Clears sensitive data from an object. More...


Static Public Methods

JSAFE_Signature JSAFE_Signature:: getInstance (byte[] berAlgID, int offset, String device) throws JSAFE_UnimplementedException, JSAFE_InvalidParameterException
 Builds an object based on the algorithm ID. More...

int JSAFE_Signature:: getNextBEROffset (byte[] berAlgID, int offset) throws JSAFE_UnimplementedException
 Gets the next offset after the algorithm ID. More...

JSAFE_Signature JSAFE_Signature:: getInstance (String transformation, String device) throws JSAFE_UnimplementedException, JSAFE_InvalidParameterException
 Builds an object that performs an algorithm defined by transformation on the specified device. More...


Static Public Attributes

final int JSAFE_Signature:: NO_BLINDING
 NO_BLINDING is the flag to use when calling setBlinding() and you wish to set the object to perform its operations without blinding. More...

final int JSAFE_Signature:: BLINDING
 BLINDING is the flag to use when calling setBlinding() and you wish to set the object to perform its operations with blinding. More...

final int JSAFE_Signature:: PERSISTENT_BLINDING
 PERSITENT_BLINDING is the flag to use when calling setBlinding() and you wish to set the object to perform its operations with blinding using persistent blinding values. More...


Member Function Documentation

void JSAFE_Signature::clearSensitiveData   [inline];
 

Clears sensitive data from an object. Although the finalizer clears the data, there is no guarantee the garbage collector will quickly call the finalizer. Allows a user to clear data as soon as possible. After calling clearSensitiveData(), an Init (not a ReInit) method is called to perform other operations with the object.

Reimplemented from JSAFE_Object.

abstract int JSAFE_Signature::getBlinding   [pure virtual];
 

Returns the level of blinding this object will use. Currently, the return value will be one of the following:

    JSAFE_Signature.NO_BLINDING
    JSAFE_Signature.BLINDING
    JSAFE_Signature.PERSISTENT_BLINDING
 
Call this routine only after a call to an Init method. That is, if you call this method before an Init call, it will return an answer, but it may not be the correct answer.

Returns:
An int, the level of blinding.

byte [] JSAFE_Signature::getDERAlgorithmID String    format,
boolean    includeParams
throws JSAFE_UnimplementedException [inline];
 

Returns the DER encoding of the algorithm ID of this object. Uses the OID for the given format parameter, and includes the system parameters (if there are any) based on the boolean includeParams argument.

The possible values for format are:

  • RSAwithSHA1PKCS
  • RSAwithSHA1ISO_OIW
  • RSAwithSHA1X937
  • DSAwithSHA1X930
  • DSAwithSHA1X957

<bold>Note:</bold> If none of the above formats describe your signature algorithm, use the getDERAlgorithmID() method that does not take arguments.

Takes in arguments to further define the algorithm ID. The first, format, indicates which standard to follow. The second, includeParams, tells whether the system parameters (if there are any) should be part of the encoding.

Parameters:
format The standard to follow (for example, "DSAWithSHA1X957" or "RSAWithSHA1ISO_OIW").
includeParams If true, the system parameters are part of the algorithm ID; if false, they are not.
Returns:
A new byte array that contains the algorithm ID.
Exceptions:
JSAFE_UnimplementedException If the algorithm has no OID, or there is not enough information to build the algorithm ID.

byte [] JSAFE_Signature::getDERAlgorithmID   throws JSAFE_UnimplementedException [inline];
 

Returns a new byte array containing the DER encoding of the algorithm ID of the algorithm in this object.

Returns:
A new byte array that contains the algorithm ID.
Exceptions:
JSAFE_UnimplementedException If the algorithm has no OID, or there is not enough information to build the algorithm ID.

String JSAFE_Signature::getDevice   [inline];
 

Returns the name of the device of record. Possible device values are:

  • Java
  • Native
  • name of the specified device

Returns:
The device name.

String [] JSAFE_Signature::getDeviceList   [inline];
 

Returns a String array that describes all the devices used to execute the transformation. Because a transformation often consists of component algorithms, the implementation can consist of several component objects. A device can perform one or more of the algorithms, but it may let Java or another device perform one or more. For example, because padding is not time-consuming, a device might let the Crypto-J implementation perform padding. Returns the names of the devices used by each component.

Returns:
A String array, that describes the device used for a specific component.

abstract String JSAFE_Signature::getDigestAlgorithm   [pure virtual];
 

Returns the standard digest algorithm name.

Returns:
A String that describes the digest algorithm.

JSAFE_Signature JSAFE_Signature::getInstance String    transformation,
String    device
throws JSAFE_UnimplementedException, JSAFE_InvalidParameterException [inline, static];
 

Builds an object that performs an algorithm defined by transformation on the specified device.

The value of the algorithm must be one of the following:

algorithm Values

  • digest/RSA/padding
  • SHA1/X931RSA/X931Pad
  • digest/DSA
  • digest/RSA/PKCS1V2PSS-tfOption/mgf/mgfAlg

The value of digest when used with RSA must be one of the following:

RSA digest Values

  • "MD2"
  • "MD5"
  • "SHA1"
  • "SHA256"
  • "SHA384"
  • "SHA512"
  • "RIPEMD160"
  • "NoDigest"

Note: Cryptanalytic work has discovered a collision in MD2's internal compression function, and there is a chance that the attack on MD2 may be extended to the full hash function. RSA Security recommends not using MD2 except for backward compatibility. Another attack has been applied to the compression function on MD5, though this has yet to be extended to the full MD5. RSA Security recommends that before you use MD2 or MD5, you should consult the RSA Laboratories Web site at http://www.rsasecurity.com/rsalabs/ to be sure your use is consistent with the latest information. Refer to the bulletin Recent Results for MD2, MD4, and MD5 available at http://www.rsasecurity.com/rsalabs/bulletins/.

The value of digest must be one of the following:

DSA digest values

  • "SHA1"
  • "NoDigest"
See also the discussion of DSA in the RSA Laboratories FAQ (PDF), which is included with your Crypto-J distribution.

The value of padding must be one of the following:

padding Values

  • "PKCS1Block01Pad"
  • "X931Pad"
  • "NoPad"
  • "PKCS1V2PSS"

    Note: The X9.31 RSA algorithm works only with the SHA1 digest and X931Pad padding.

    Currently, Crypto-J supports the following PSS supporting algorithms:

    • digest: SHA1
    • tfOption: 1,2
    • mgf: MGF1
    • mgfAlg: SHA1

    The tfOption is an integer that specifies whether to include the hash function identifier in the signature: 1 indicates don't include and 2 indicates include. The mgf is the mask generating function. The mgfAlg is the mask generating function's underlying algorithm.

    Parameters:
    transformation The representation of the desired operation.
    device A list of devices used to build the object.
    Returns:
    A new JSAFE_Signature object that performs the transformation as described by the algorithm ID.
    Exceptions:
    JSAFE_UnimplementedException If the device or devices cannot perform the designated algorithm, or the toolkit cannot decode the BER encoding.
    JSAFE_InvalidParameterException If the BER encoding contains parameters that do not work.

JSAFE_Signature JSAFE_Signature::getInstance byte    berAlgID[],
int    offset,
String    device
throws JSAFE_UnimplementedException, JSAFE_InvalidParameterException [inline, static];
 

Builds an object based on the algorithm ID. This method builds an object that performs the algorithm defined by berAlgID, beginning at offset, using the specified device.

The value encoded in berAlgID must follow the definition below:

 AlgorithmIdentifier ::= SEQUENCE {
   algorithm OBJECT IDENTIFIER,
   parameters ANY DEFINED BY algorithm OPTIONAL }
 

Parameters:
berAlgID A byte array containing the BER of an algorithm ID.
offset The offset into berAlgID where the encoding actually begins.
device A list of devices to use for building the object.
Returns:
A new JSAFE_Signature object that performs the transformation as described by the algorithm ID.
Exceptions:
JSAFE_UnimplementedException If the device or devices cannot perform the designated algorithm, or the toolkit cannot decode the BER.
JSAFE_InvalidParameterException If the BER contains parameters that do not work.

int JSAFE_Signature::getMaxInputLen   [inline];
 

Returns the maximum allowed input length. If there is no logical limit, this method returns -1. It is generally unnecessary to call this method unless performing NoDigest signatures.

Returns:
An int that is the maximum allowed input length. If -1, there is no logical limit.

int JSAFE_Signature::getNextBEROffset byte    berAlgID[],
int    offset
throws JSAFE_UnimplementedException [inline, static];
 

Gets the next offset after the algorithm ID. Given the berAlgID, the BER encoding of the algorithm ID, beginning at offset, returns the index to the next byte in the array.

Parameters:
berAlgID A byte array containing the BER encoding of an algorithm ID.
offset The offset into berAlgID where the encoding begins.
Returns:
The index into berAlgID of the byte following the algorithm ID.
Exceptions:
JSAFE_UnimplementedException If the toolkit cannot decode the BER encoding.

abstract String JSAFE_Signature::getPaddingScheme   [pure virtual];
 

Returns the standard padding scheme name.

Returns:
A String that describes the padding algorithm.

abstract String JSAFE_Signature::getSignatureAlgorithm   [pure virtual];
 

Returns the standard signature algorithm name.

Returns:
A String that describes the signature algorithm.

int JSAFE_Signature::getSignatureSize   [inline];
 

Returns the length of a resulting signature. It should only be called after signInit(); otherwise, the return value can be 0. Returns the size of the signature output.

Returns:
An int that is the output signature size.

abstract void JSAFE_Signature::setBlinding int    blindingLevel [pure virtual];
 

Set the desired level of blinding. The argument should be one of the following flags:

    JSAFE_Signature.NO_BLINDING
    JSAFE_Signature.BLINDING
    JSAFE_Signature.PERSISTENT_BLINDING
 
The default is persistent blinding. That is, if you do not call this method, the object will perform blinding using persistent blinding values.

The current BLINDING algorithm will do the following.

   m = message -- the block to sign
   r = random value -- from a seed of block to sign and private key
   rInv = (r ^ -1) mod modulus
   b = (r ^ pubExpo) mod modulus
   mPrime = (b * m) mod modulus
   sPrime = RSA(mPrime)
   signature = (rInv * sPrime) mod modulus
 

This method should be used before an Init call.

Use the method getBlinding() to see what level of blinding is being employed.

Not all algorithms or situations will have blinding available. For example, there is no blinding for DSA or verification of any algorithm. It will not be possible to blind if creating an RSA signature using only the private exponent and modulus (instead of the CRT info).

Parameters:
blindingLevel The desired level of blinding.

int JSAFE_Signature::signFinal byte    signature[],
int    offset
throws JSAFE_InvalidUseException, JSAFE_InputException, JSAFE_PaddingException [inline];
 

Finalizes the signature process, appending the padding and creating the signature. The signature is placed in the byte array signature, beginning at offset. This method returns the resulting length of the signature, which is the number of bytes placed in the output buffer. Call a Final method before using an object to sign or verify with a new key.

Parameters:
signature The buffer where the output is placed.
offset The offset into signature where the writing begins.
Returns:
The number of bytes placed into the output buffer.
Exceptions:
JSAFE_InvalidUseException If the object is not initialized to sign.
JSAFE_InputException If the input exceeds the maximum length.
JSAFE_PaddingException If the padding algorithm cannot be executed.

byte [] JSAFE_Signature::signFinal   throws JSAFE_InvalidUseException, JSAFE_InputException, JSAFE_PaddingException [inline];
 

Finalizes the signature process, appending the padding and creating the signature. This method returns the result in a new byte array. The format of the signature depends on the underlying signature scheme. Call a Final method before using an object to sign or verify with a new key.

Returns:
A new byte array containing the signature.
Exceptions:
JSAFE_InvalidUseException If the object is not initialized to sign.
JSAFE_InputException If the input exceeds the maximum length.
JSAFE_PaddingException If the padding algorithm cannot be executed.

void JSAFE_Signature::signInit JSAFE_PrivateKey    key,
JSAFE_Parameters    systemParameters,
SecureRandom    random,
JSAFE_Session    sessions[]
throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException [inline];
 

Initializes this object to sign using the specified private key, systemParameters (if the system parameters are not part of the key) and sessions. If this object ever needs random bytes, use random.

The sessions argument is an array of hardware sessions.

Since:
Crypto-J 3.2
Parameters:
key A JSAFE_PrivateKey object that is used to sign.
systemParameters A JSAFE_Parameters object that contains the system parameters that are used to sign.
random A SecureRandom object random bytes are drawn from, if necessary.
sessions An array of JSAFE_Session objects from which a device is sought that performs the operation.
Exceptions:
JSAFE_InvalidUseException If the object cannot be initialized.
JSAFE_InvalidKeyException If the key object does not match this object (for example, a different algorithm or different device).
JSAFE_InvalidParameterException If the system parameters do not match the key.

void JSAFE_Signature::signInit JSAFE_PrivateKey    key,
JSAFE_Parameters    systemParameters,
SecureRandom    random
throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException [inline];
 

Initializes this object to sign using the specified private key and the systemParameters (if the system parameters are not part of the key). If the signature algorithm or padding scheme needs random bytes, the object gets them from random. If the algorithm does not need random bytes, pass in a null.

JSAFE_SecureRandom is a subclass of java.security.SecureRandom, so an object of that class is valid input for random.

An object that is initialized for signing is not able to verify.

Parameters:
key A JSAFE_PrivateKey object that is used to sign.
systemParameters A JSAFE_Parameters object that contains the system parameters that are used to sign.
random A SecureRandom object random bytes are drawn from, if necessary.
Exceptions:
JSAFE_InvalidUseException If the object cannot be initialized.
JSAFE_InvalidKeyException If the key object does not match this object (for example, if it is a different algorithm or different device).
JSAFE_InvalidParameterException If the system parameters do not match the key.

void JSAFE_Signature::signInit JSAFE_PrivateKey    key,
SecureRandom    random
throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException [inline];
 

Initializes this object to sign using the specified private key. If the signature algorithm or padding scheme needs random bytes, the object gets them from random. If the algorithm does not need random bytes, pass in a null.

The JSAFE_SecureRandom object is a subclass of java.security.SecureRandom, so an object of that class is valid input for random.

An object that is initialized for signing is not able to verify.

Parameters:
key A JSAFE_PrivateKey that is used to sign.
random A SecureRandom object random bytes are drawn from, if necessary.
Exceptions:
JSAFE_InvalidUseException If the object cannot be initialized.
JSAFE_InvalidKeyException If the key object does not match this object (for example, if it is a different algorithm or different device).

void JSAFE_Signature::signReInit   throws JSAFE_InvalidUseException [inline];
 

Re-initializes this object to sign using the private key passed in during an earlier call to signInit(). An object that is initialized for signing is not able to verify. This method re-initializes an object to perform signatures.

Exceptions:
JSAFE_InvalidUseException If the object is not initialized for signing.

void JSAFE_Signature::signUpdate byte    partIn[],
int    offset,
int    partInLen
throws JSAFE_InvalidUseException, JSAFE_InputException [inline];
 

Adds more data to sign. This method will digest the data. If NoDigest is specified, it will save the input data in an internal buffer. This method digests the first partInLen bytes fo the array partIn, beginning at offset.

Parameters:
partIn The data to sign.
offset The offset into partIn where the data begins.
partInLen The length of the data to sign.
Exceptions:
JSAFE_InvalidUseException If the object is not initialized to sign.
JSAFE_InputException If the input exceeds the maximum length.

boolean JSAFE_Signature::verifyFinal byte    signature[],
int    offset,
int    signatureLen
throws JSAFE_InvalidUseException, JSAFE_InputException, JSAFE_PaddingException [inline];
 

Finalizes the verification process, comparing the signature to the value determined in the verification process. The return value is true if the signature verifies, and false if it does not.

Call a Final method before using an object to verify with a new key.

Parameters:
signature The signature to compare to the previously determined value.
offset The offset into signature where the data to verify begins.
signatureLen The length, in bytes, of the signature to verify.
Returns:
A boolean. Returns true if the signature verifies, false if not.
Exceptions:
JSAFE_InvalidUseException If the object is not initialized to verify.
JSAFE_InputException If the input exceeds the maximum length.
JSAFE_PaddingException If the padding algorithm cannot execute.

void JSAFE_Signature::verifyInit JSAFE_PublicKey    key,
JSAFE_Parameters    systemParameters,
SecureRandom    random,
JSAFE_Session    sessions[]
throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException [inline];
 

Initializes this object to verify using the specified public key and the systemParameters (if the system parameters are not part of the key). If this object ever needs random bytes, use random. If an algorithm does not need system parameters, or if they are contained within the key, pass in a null for systemParameters or use the previous verifyInit() method.

JSAFE_SecureRandom is a subclass of java.security.SecureRandom, so an object of that class is valid input for random.

An object that is initialized for verifying is not able to sign.

The sessions argument is an array of hardware sessions.

Since:
Crypto-J 3.2
Parameters:
key A JSAFE_PublicKey object that is used to verify.
systemParameters A JSAFE_Parameters object that contains the system parameters that is used to verify.
random A SecureRandom object random bytes are drawn from, if necessary.
sessions An array of JSAFE_Session objects that search for one device that will perform the operation.
Exceptions:
JSAFE_InvalidUseException If the object cannot be initialized.
JSAFE_InvalidKeyException If the key object does not match this object (for example, if it is a different algorithm or different device).
JSAFE_InvalidParameterException If the system parameters do not match the key.

void JSAFE_Signature::verifyInit JSAFE_PublicKey    key,
JSAFE_Parameters    systemParameters,
SecureRandom    random
throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException, JSAFE_InvalidParameterException [inline];
 

Initializes this object to verify using key and the systemParameters (if the system parameters are not part of the key). If this object ever needs random bytes, use random. If an algorithm does not need system parameters, or if they are contained within the key, pass in a null for systemParameters or use the previous verifyInit() method.

Parameters:
key A JSAFE_PublicKey object that is used to verify.
systemParameters A JSAFE_Parameters object that contains the system parameters used to verify.
random A SecureRandom object this object draws random bytes from, if necessary.
Exceptions:
JSAFE_InvalidUseException If the object cannot be initialized.
JSAFE_InvalidKeyException If the key object does not match this object (for instance, if it is a different algorithm or different device).
JSAFE_InvalidParameterException If the system parameters do not match the key.

void JSAFE_Signature::verifyInit JSAFE_PublicKey    key,
SecureRandom    random
throws JSAFE_InvalidUseException, JSAFE_InvalidKeyException [inline];
 

Initializes this object to verify using the specified public key. If this object ever needs random bytes, use random. If an algorithm does not need random bytes, pass in null.

The JSAFE_SecureRandom object is a subclass of java.security.SecureRandom, so an object of that class is valid input for random.

An object that is initialized for verifying is not able to sign.

Parameters:
key A JSAFE_PublicKey object that is used to verify.
random A SecureRandom object random bytes are drawn from, if necessary.
Exceptions:
JSAFE_InvalidUseException If the object cannot be initialized.
JSAFE_InvalidKeyException If the key object does not match this object (for example, if it is a different algorithm or different device).

void JSAFE_Signature::verifyReInit   throws JSAFE_InvalidUseException [inline];
 

Re-initializes this object to verify signatures using the public key passed in during a previous call to verifyInit(). An object that is initialized for verifying is not able to sign.

Exceptions:
JSAFE_InvalidUseException If the object is not initialized to verify.

void JSAFE_Signature::verifyUpdate byte    partIn[],
int    offset,
int    partInLen
throws JSAFE_InvalidUseException, JSAFE_InputException [inline];
 

Digests the first partInLen bytes of the array partIn, beginning at offset. If the object is performing NoDigest signatures, the input data is stored in an internal buffer.

Parameters:
partIn The data to be verified.
offset The offset into partIn where the data begins.
partInLen The length of the data to be verified.
Exceptions:
JSAFE_InvalidUseException If the object is not initialized to verify.
JSAFE_InputException If the input exceeds the maximum length.


Member Data Documentation

final int JSAFE_Signature::BLINDING [static]
 

BLINDING is the flag to use when calling setBlinding() and you wish to set the object to perform its operations with blinding. This is also the return value of getBlinding() if the object will perform its operations with blinding.

final int JSAFE_Signature::NO_BLINDING [static]
 

NO_BLINDING is the flag to use when calling setBlinding() and you wish to set the object to perform its operations without blinding. This is also the return value of getBlinding() if the object will perform its operations without blinding.

final int JSAFE_Signature::PERSISTENT_BLINDING [static]
 

PERSITENT_BLINDING is the flag to use when calling setBlinding() and you wish to set the object to perform its operations with blinding using persistent blinding values. These values are associated with a key, will be generated once and used each time the key is used. This is in contrast to the normal blinding which generates different blinding values each time the key is used.

This is also the return value of getBlinding() if the object will perform its operations with persistent blinding.


Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 038-001001-3500-001-000 - 3.5