| RSA BSAFE CRYPTO-J |
Cryptographic Components for Java |
| JSAFE Javadoc | JCE Javadoc | Search |
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:

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... | |
|
|
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 Reimplemented from JSAFE_Object. |
|
|
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 the DER encoding of the algorithm ID of this object. Uses the OID for the given
The possible values for
<bold>Note:</bold> If none of the above formats describe your signature algorithm, use the
Takes in arguments to further define the algorithm ID. The first,
|
|
|
Returns a new
|
|
|
Returns the name of the device of record. Possible device values are:
|
|
|
Returns a
|
|
|
Returns the standard digest algorithm name.
|
|
||||||||||||
|
Builds an object that performs an algorithm defined by The value of the algorithm must be one of the following: algorithm Values
The value of digest when used with RSA must be one of the following: RSA digest Values
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 The value of digest must be one of the following: DSA digest values
The value of padding must be one of the following: padding Values
|
|
||||||||||||||||
|
Builds an object based on the algorithm ID. This method builds an object that performs the algorithm defined by
The value encoded in
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
|
|
|
Returns the maximum allowed input length. If there is no logical limit, this method returns
|
|
||||||||||||
|
Gets the next offset after the algorithm ID. Given the
|
|
|
Returns the standard padding scheme name.
|
|
|
Returns the standard signature algorithm name.
|
|
|
Returns the length of a resulting signature. It should only be called after
|
|
|
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
Use the method 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).
|
|
||||||||||||
|
Finalizes the signature process, appending the padding and creating the signature. The signature is placed in the
|
|
|
Finalizes the signature process, appending the padding and creating the signature. This method returns the result in a new
|
|
||||||||||||||||||||
|
Initializes this object to sign using the specified private
The
|
|
||||||||||||||||
|
Initializes this object to sign using the specified private
An object that is initialized for signing is not able to verify.
|
|
||||||||||||
|
Initializes this object to sign using the specified private
The An object that is initialized for signing is not able to verify.
|
|
|
Re-initializes this object to sign using the private key passed in during an earlier call to
|
|
||||||||||||||||
|
Adds more data to sign. This method will digest the data. If
|
|
||||||||||||||||
|
Finalizes the verification process, comparing the
Call a
|
|
||||||||||||||||||||
|
Initializes this object to verify using the specified public
An object that is initialized for verifying is not able to sign.
The
|
|
||||||||||||||||
|
Initializes this object to verify using
|
|
||||||||||||
|
Initializes this object to verify using the specified public
The An object that is initialized for verifying is not able to sign.
|
|
|
Re-initializes this object to verify signatures using the public key passed in during a previous call to
|
|
||||||||||||||||
|
Digests the first
|
|
|
BLINDING is the flag to use when calling |
|
|
NO_BLINDING is the flag to use when calling |
|
|
PERSITENT_BLINDING is the flag to use when calling
This is also the return value of |