SHOW Signed

net.rim.device.api.crypto
Class ECNRSignatureSigner

java.lang.Object
  |
  +--net.rim.device.api.crypto.ECNRSignatureSigner
All Implemented Interfaces:
SignatureSigner

public final class ECNRSignatureSigner
extends Object
implements SignatureSigner

Signs messages using the Elliptic Curve Nyberg-Rueppel (ECNR) signature scheme.

Elliptic Curve cryptography is defined in various standards including P1363 and ANSI X9.42. ECNR is defined in P1363 ( we implemented the version from the draft 13 document ).

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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

Since:
JDE 3.6.0
See Also:
ECNRSignatureVerifier

Constructor Summary
 Category: Signed Category: Certicom ECNRSignatureSigner(ECPrivateKey key)
          Constructs an ECNRSignatureSigner object which uses SHA-1 to compute the signature.
 Category: Signed Category: Certicom ECNRSignatureSigner(ECPrivateKey key, Digest digest)
          Constructs an ECNRSignatureSigner object which uses the given digest to compute the signature.
 
Method Summary
 Category: Signed Category: Certicom  String getAlgorithm()
          Returns the name of this signing algorithm ("ECNR/" + digest.getAlgorithm).
 Category: Signed Category: Certicom  String getDigestAlgorithm()
          Returns the name of the digest algorithm used, eg "SHA1", etc.
 Category: Signed Category: Certicom  int getRLength()
          Returns the largest possible value for the size of r, which is the size of the field.
 Category: Signed Category: Certicom  int getSLength()
          Returns the largest possible value for the size of s, which is the size of the field.
 Category: Signed Category: Certicom  void reset()
          Reinitializes the signer, preparing it to generate another signature.
 Category: Signed Category: Certicom  void sign(byte[] r, int rOffset, byte[] s, int sOffset)
          Signs the information that has been hashed up to this point using the values of r and s.
 Category: Signed Category: Certicom  void update(byte[] data)
          Adds additional message data to the signature.
 Category: Signed Category: Certicom  void update(byte[] data, int offset, int length)
          Adds additional message data to the signature.
 Category: Signed Category: Certicom  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

ECNRSignatureSigner

public ECNRSignatureSigner(ECPrivateKey key)
                    throws CryptoTokenException,
                           CryptoUnsupportedOperationException
Constructs an ECNRSignatureSigner object which uses SHA-1 to compute the signature.

Parameters:
key - The EC private key to use.
Throws:
CryptoTokenException - Thrown if an error occurs with the crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


ECNRSignatureSigner

public ECNRSignatureSigner(ECPrivateKey key,
                           Digest digest)
                    throws CryptoTokenException,
                           CryptoUnsupportedOperationException
Constructs an ECNRSignatureSigner object which uses the given digest to compute the signature.

NOTE: If the digest has any state information in it when it is given to the signature signer, this information will be incorparated into the signature. If you don't want this information included, call the reset method for the signature signer to delete it. A newly created digest, which no update calls have been made too, contains no state information in it by default.

Parameters:
key - The EC private key to use.
digest - An instance of the digest algorithm to use.
Throws:
CryptoTokenException - Thrown if an error occurs with the crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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

Method Detail

getAlgorithm

public String getAlgorithm()
Returns the name of this signing algorithm ("ECNR/" + digest.getAlgorithm).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


getDigestAlgorithm

public String getDigestAlgorithm()
Returns the name of the digest algorithm used, eg "SHA1", etc.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


reset

public void reset()
Description copied from interface: SignatureSigner
Reinitializes the signer, preparing it to generate another signature.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


update

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

Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


update

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

Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


update

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

Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


getRLength

public int getRLength()
Returns the largest possible value for the size of r, which is the size of the field. Notice that the "field" refers to the finite field that the elliptic curve is defined over and the size refers to either the size of the prime or the degree of the irreducible polynomial that helps define the field.

The reason we return the maximum size is because r is always in the field and hence can have size less than or equal to the size of the field so we return the maximum to ensure that there is enough room to hold r. If r turns out to be smaller than the maximum it will be padded with zeroes to accomodate this fact.

Returns:
An integer that represents the length of r.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


getSLength

public int getSLength()
Returns the largest possible value for the size of s, which is the size of the field. Notice that the "field" refers to the finite field that the elliptic curve is defined over and the size refers to either the size of the prime or the degree of the irreducible polynomial that helps define the field.

The reason we return the maximum size is because s is always in the field and hence can have size less than or equal to the size of the field so we return the maximum to ensure that there is enough room to hold s. If s turns out to be smaller than the maximum it will be padded with zeroes to accomodate this fact.

Returns:
An integer representing the length of s.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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


sign

public void sign(byte[] r,
                 int rOffset,
                 byte[] s,
                 int sOffset)
          throws CryptoTokenException,
                 CryptoUnsupportedOperationException
Signs the information that has been hashed up to this point using the values of r and s.

Parameters:
r - Represents the r parameter for the ECNR algorithm. Note that r is an element of the finite field that the elliptic curve is defined over.
rOffset - The offset, or start position, of the signature data within the array.
s - Represents the s parameter for the ECNR algorithm. Note that s is an element of the finite field that the elliptic curve is defined over.
sOffset - The offset, or start postion, of the signature data within the array.
Throws:
CryptoTokenException - Thrown if an error occurs with the crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
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:613-254-9258

Email: sales@certicom.com

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



Copyright 1999-2004 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.