net.rim.device.api.crypto
Class X931SignatureSigner

java.lang.Object
  extended by net.rim.device.api.crypto.X931SignatureSigner
All Implemented Interfaces:
SignatureSigner

public final class X931SignatureSigner
extends Object
implements SignatureSigner

Represents an X931 Signature signer. This Signature signer is defined in the ANSI X9.31 standard.

Note : Currently the only digests defined for use with this signature signer are SHA-1, SHA-256, SHA-384, SHA-512 and RIPEMD160. These are the only digests you can use with this class.

For information on cryptographic algorithms, see Crypto Algorithms.

Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

Constructor Summary
Category: Certicom Category: Signed X931SignatureSigner(RSAPrivateKey key)
          Creates an X931SignatureSigner object given an RSA private key used for signing ( SHA-1 is the digest algorithm used ).
Category: Certicom Category: Signed X931SignatureSigner(RSAPrivateKey key, Digest digest)
          Creates an X931SignatureSigner object given an RSA private key used for signing and a digest.
 
Method Summary
Category: Certicom Category: Signed  String getAlgorithm()
          Returns the name of the signing algorithm used, eg "DSA", "ECDSA", etc.
Category: Certicom Category: Signed  String getDigestAlgorithm()
          Returns the name of the digest algorithm used, eg "SHA1", etc.
Category: Certicom Category: Signed  int getLength()
          Returns the length of the signature.
Category: Certicom Category: Signed  void initialize(RSAPrivateKey key, Digest digest)
          Initializes the key and digest for signing.
Category: Certicom Category: Signed  void reset()
          Reinitializes the signer, preparing it to generate another signature.
Category: Certicom Category: Signed  void sign(byte[] signature, int signatureOffset)
          Signs the given signature.
Category: Certicom Category: Signed  void update(byte[] data)
          Adds additional message data to the signature.
Category: Certicom Category: Signed  void update(byte[] data, int offset, int length)
          Adds additional message data to the signature.
Category: Certicom Category: Signed  void update(int data)
          Adds additional message data to the signature.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

X931SignatureSigner

public X931SignatureSigner(RSAPrivateKey key)
Creates an X931SignatureSigner object given an RSA private key used for signing ( SHA-1 is the digest algorithm used ).

Parameters:
key - The RSA private key used to sign.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

X931SignatureSigner

public X931SignatureSigner(RSAPrivateKey key,
                           Digest digest)
                    throws CryptoUnsupportedOperationException
Creates an X931SignatureSigner object given an RSA private key used for signing and a digest.

o

Parameters:
key - The RSA private key used to sign.
digest - A digest to use. Note that currently only SHA-1, SHA-256, SHA-384, SHA-512 and RIPEMD160 are defined for use with this signature signer.
Throws:
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0


Method Detail

initialize

public void initialize(RSAPrivateKey key,
                       Digest digest)
                throws CryptoUnsupportedOperationException
Initializes the key and digest for signing.

Parameters:
key - The RSA private key used for signing.
digest - A digest to use. Note that currently only SHA-1, SHA-256, SHA-384, SHA-512 and RIPEMD160 are defined for use with this signature signer.
Throws:
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getAlgorithm

public String getAlgorithm()
Description copied from interface: SignatureSigner
Returns the name of the signing algorithm used, eg "DSA", "ECDSA", etc.

Specified by:
getAlgorithm in interface SignatureSigner
Returns:
A String that represents the name of the algorithm.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getDigestAlgorithm

public String getDigestAlgorithm()
Description copied from interface: SignatureSigner
Returns the name of the digest algorithm used, eg "SHA1", etc.

Specified by:
getDigestAlgorithm in interface SignatureSigner
Returns:
A String that represents the name of the algorithm.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

reset

public void reset()
Description copied from interface: SignatureSigner
Reinitializes the signer, preparing it to generate another signature.

Specified by:
reset in interface SignatureSigner
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

update

public void update(int data)
Description copied from interface: SignatureSigner
Adds additional message data to the signature.

Specified by:
update in interface SignatureSigner
Parameters:
data - The byte to be hashed.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

update

public void update(byte[] data)
Description copied from interface: SignatureSigner
Adds additional message data to the signature.

Specified by:
update in interface SignatureSigner
Parameters:
data - The message data to hash.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

update

public void update(byte[] data,
                   int offset,
                   int length)
Description copied from interface: SignatureSigner
Adds additional message data to the signature.

Specified by:
update in interface SignatureSigner
Parameters:
data - The message data to hash.
offset - The offset, or the initial position to start reading in the data.
length - How much data to read.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getLength

public int getLength()
Returns the length of the signature.

Returns:
An integer representing the length of the signature.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

sign

public void sign(byte[] signature,
                 int signatureOffset)
          throws CryptoTokenException,
                 CryptoUnsupportedOperationException
Signs the given signature.

Parameters:
signature - A byte array containing the signature to be signed.
signatureOffset - The offset, or start position of the signature data within the array.
Throws:
CryptoTokenException - Thrown if an error occurs with a crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
BadPaddingException - Thrown if the signature is padded incorrectly.
InvalidSignatureEncodingException - Thrown if the specified signature is invalid.
Category:
Certicom: This element is part of the Certicom Cryptography APIs. The Certicom Cryptography APIs provide the tools you need, including ECC based algorithms, to integrate high performance data security into your applications, such as public key data encryption and decryption, digital signatures, and data authentication. Since the Certicom Cryptography API is already in the JDE, its use will remove the need for you to engage in time and resource intensive security integration so that you have lower development costs and a faster time to market. Use of the Certicom Cryptography API requires a license from Certicom. Please contact Certicom directly for more information on licensing fees and conditions.

Certicom Contact Information

Phone:905-507-4220

Email: sales@certicom.com

Website: http://www.certicom.com/rim

Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.