net.rim.device.api.crypto
Class ECCryptoSystem

java.lang.Object
  extended by net.rim.device.api.crypto.ECCryptoSystem
All Implemented Interfaces:
CryptoSystem, Persistable

public final class ECCryptoSystem
extends Object
implements CryptoSystem, Persistable

Represents the system of asymmetric cryptography based on the Elliptic Curve Discrete Logarithm Problem. The domain parameter for this system is an elliptic curve.

Elliptic Curve cryptography is defined in various standards including P1363 and ANSI X9.62.

See Also:
ECPublicKey, ECPrivateKey
Category:
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

Field Summary
Category: Signed static int CURVE_TYPE_BINARY
          This value is returned by getType() method to indicate the curve is a binary curve.
Category: Signed static int CURVE_TYPE_PRIME
          This value is returned by getType() method to indicate the curve is a prime curve.
Category: Signed static String EC160R1
          Represents an Elliptic curve defined over a field with size 160 bits.
Category: Signed static String EC163K1
          Represents a Koblitz curve defined over a field with size 163 bits.
Category: Signed static String EC163K2
          Represents a Koblitz curve defined over a field with size 163 bits.
Category: Signed static String EC163R2
          Represents an Elliptic curve defined over a field with size 163 bits.
Category: Signed static String EC192R1
          Represents an Elliptic curve defined over a field with size 192 bits.
Category: Signed static String EC224R1
          Represents an Elliptic curve defined over a field with size 224 bits.
Category: Signed static String EC233K1
          Represents a Koblitz curve defined over a field with size 233 bits.
Category: Signed static String EC233R1
          Represents an Elliptic curve defined over a field with size 233 bits.
Category: Signed static String EC239K1
          Represents a Koblitz curve defined over a field with size 239 bits.
Category: Signed static String EC256R1
          Represents an Elliptic curve defined over a field with size 256 bits.
Category: Signed static String EC283K1
          Represents a Koblitz curve defined over a field with size 283 bits.
Category: Signed static String EC283R1
          Represents an Elliptic curve defined over a field with size 283 bits.
Category: Signed static String EC384R1
          Represents an Elliptic curve defined over a field with size 384 bits.
Category: Signed static String EC409K1
          Represents a Koblitz curve defined over a field with size 409 bits.
Category: Signed static String EC409R1
          Represents an Elliptic curve defined over a field with size 409 bits.
Category: Signed static String EC521R1
          Represents an Elliptic curve defined over a field with size 521 bits.
Category: Signed static String EC571K1
          Represents a Koblitz curve defined over a field with size 571 bits.
Category: Signed static String EC571R1
          Represents an Elliptic curve defined over a field with size 571 bits.
Category: Signed static String WTLS3
          A String representing the name of the curve.
Category: Signed static String WTLS5
          A String representing the name of the curve.
Category: Signed static String WTLS7
          A String representing the name of the curve.
 
Constructor Summary
Category: Signed ECCryptoSystem()
          Constructs an elliptic curve system using EC163K1.
Category: Signed ECCryptoSystem(String name)
          Constructs an elliptic curve system using the specified curve.
Category: Signed ECCryptoSystem(ECCryptoToken cryptoToken, String name)
          Constructs an elliptic curve system using the specified curve.
Category: Signed ECCryptoSystem(ECCryptoToken cryptoToken, CryptoTokenCryptoSystemData cryptoTokenData)
          Constructs an elliptic curve system using the specified curve.
 
Method Summary
Category: Signed  ECKeyPair createECKeyPair()
           
Category: Signed  KeyPair createKeyPair()
          Creates a new key pair using this crypto system.
Category: Signed  boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
Category: Signed  byte[] getA()
          This functions returns the "a" coefficient of this elliptic curve, defined by the equation y^2 = x^3 + ax + b ( in the F_p case ) or y^2 + xy = x^3 + ax^2 + b ( in the F_2^m case ).
Category: Signed  String getAlgorithm()
          Returns a String that indicates the algorithm, ie "EC".
Category: Signed  AsymmetricCryptoToken getAsymmetricCryptoToken()
          Returns the EC Crypto token associated with the crypto token.
Category: Signed  byte[] getB()
          This functions returns the "b" coefficient of this elliptic curve, defined by the equation y^2 = x^3 + ax + b ( in the F_p case ) or y^2 + xy = x^3 + ax^2 + b ( in the F_2^m case ).
Category: Signed  ECPublicKey getBasePoint()
          This function returns the base point of this elliptic curve.
Category: Signed  int getBitLength()
          Returns the length (in bits) of the field for this system's curve.
Category: Signed  byte[] getCofactor()
          This functions returns the cofactor of this elliptic curve.
Category: Signed  CryptoTokenCryptoSystemData getCryptoTokenData()
          Returns the crypto token data.
Category: Signed  int getFieldLength()
          Returns the length (in bytes) of the field for this system's curve.
Category: Signed  byte[] getFieldReductor()
          This functions returns the field reductor of this elliptic curve.
Category: Signed  byte[] getGroupOrder()
          This functions returns the number of points in the group generated by the base point of this elliptic curve.
Category: Signed  String getName()
          Returns a String that indicates the name of the elliptic curve, eg "EC163K1".
Category: Signed  int getPrivateKeyLength()
          Returns the length (in bytes) of a private key for this system's curve.
Category: Signed  int getPublicKeyLength()
          Returns the length (in bytes) of a compressed public key for this system's curve.
Category: Signed  int getPublicKeyLength(boolean compressed)
          Returns the length (in bytes) of a public key for this system's curve.
Category: Signed  int getType()
          Returns the type (prime or binary) of this system's curve.
Category: Signed  int hashCode()
          Returns a hash code value for the object.
Category: Signed  boolean isStrong()
          Returns whether or not the CryptoSystem is cryptographically strong as of the release date of the code.
Category: Signed  void verify()
          Performs certain integrity checks on the crypto system parameters.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

EC163K1

public static final String EC163K1
Represents a Koblitz curve defined over a field with size 163 bits.

See Also:
Constant Field Values
Category:
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

EC163K2

public static final String EC163K2
Represents a Koblitz curve defined over a field with size 163 bits.

See Also:
Constant Field Values
Category:
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

EC163R2

public static final String EC163R2
Represents an Elliptic curve defined over a field with size 163 bits.

See Also:
Constant Field Values
Category:
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

EC233K1

public static final String EC233K1
Represents a Koblitz curve defined over a field with size 233 bits.

See Also:
Constant Field Values
Category:
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

EC233R1

public static final String EC233R1
Represents an Elliptic curve defined over a field with size 233 bits.

See Also:
Constant Field Values
Category:
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

EC239K1

public static final String EC239K1
Represents a Koblitz curve defined over a field with size 239 bits.

See Also:
Constant Field Values
Category:
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

EC283K1

public static final String EC283K1
Represents a Koblitz curve defined over a field with size 283 bits.

See Also:
Constant Field Values
Category:
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

EC283R1

public static final String EC283R1
Represents an Elliptic curve defined over a field with size 283 bits.

See Also:
Constant Field Values
Category:
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

EC409K1

public static final String EC409K1
Represents a Koblitz curve defined over a field with size 409 bits.

See Also:
Constant Field Values
Category:
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

EC409R1

public static final String EC409R1
Represents an Elliptic curve defined over a field with size 409 bits.

See Also:
Constant Field Values
Category:
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

EC571K1

public static final String EC571K1
Represents a Koblitz curve defined over a field with size 571 bits.

See Also:
Constant Field Values
Category:
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

EC571R1

public static final String EC571R1
Represents an Elliptic curve defined over a field with size 571 bits.

See Also:
Constant Field Values
Category:
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

EC160R1

public static final String EC160R1
Represents an Elliptic curve defined over a field with size 160 bits.

See Also:
Constant Field Values
Category:
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

EC192R1

public static final String EC192R1
Represents an Elliptic curve defined over a field with size 192 bits.

See Also:
Constant Field Values
Category:
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

EC224R1

public static final String EC224R1
Represents an Elliptic curve defined over a field with size 224 bits.

See Also:
Constant Field Values
Category:
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

EC256R1

public static final String EC256R1
Represents an Elliptic curve defined over a field with size 256 bits.

See Also:
Constant Field Values
Category:
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

EC384R1

public static final String EC384R1
Represents an Elliptic curve defined over a field with size 384 bits.

See Also:
Constant Field Values
Category:
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

EC521R1

public static final String EC521R1
Represents an Elliptic curve defined over a field with size 521 bits.

See Also:
Constant Field Values
Category:
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

WTLS3

public static final String WTLS3
A String representing the name of the curve. This is functionally equivalent to EC163K1.

See Also:
Constant Field Values
Category:
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

WTLS5

public static final String WTLS5
A String representing the name of the curve. This is functionally equivalent to EC163K2.

See Also:
Constant Field Values
Category:
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

WTLS7

public static final String WTLS7
A String representing the name of the curve. This is functionally equivalent to EC160R1.

See Also:
Constant Field Values
Category:
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

CURVE_TYPE_PRIME

public static final int CURVE_TYPE_PRIME
This value is returned by getType() method to indicate the curve is a prime curve.

See Also:
Constant Field Values
Category:
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 5.0.0

CURVE_TYPE_BINARY

public static final int CURVE_TYPE_BINARY
This value is returned by getType() method to indicate the curve is a binary curve.

See Also:
Constant Field Values
Category:
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 5.0.0


Constructor Detail

ECCryptoSystem

public ECCryptoSystem()
Constructs an elliptic curve system using EC163K1.

Category:
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

ECCryptoSystem

public ECCryptoSystem(String name)
Constructs an elliptic curve system using the specified curve.

Parameters:
name - A String representing the name of the desired curve.
Category:
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

ECCryptoSystem

public ECCryptoSystem(ECCryptoToken cryptoToken,
                      String name)
               throws CryptoTokenException,
                      CryptoUnsupportedOperationException,
                      UnsupportedCryptoSystemException
Constructs an elliptic curve system using the specified curve.

Parameters:
cryptoToken - The EC crypto token.
name - The string name of the desired curve.
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.
UnsupportedCryptoSystemException - Thrown if the specified crypto system is invalid.
Category:
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

ECCryptoSystem

public ECCryptoSystem(ECCryptoToken cryptoToken,
                      CryptoTokenCryptoSystemData cryptoTokenData)
Constructs an elliptic curve system using the specified curve.

Parameters:
cryptoToken - The EC crypto token.
cryptoTokenData - The data associated with the crypto token.
Category:
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

verify

public void verify()
            throws InvalidCryptoSystemException,
                   CryptoTokenException,
                   CryptoUnsupportedOperationException
Description copied from interface: CryptoSystem
Performs certain integrity checks on the crypto system parameters.

These checks are useful to prevent certain types of attacks that involve modifying the parameters and then using a signed message to calculate the private key parameters.

Specified by:
verify in interface CryptoSystem
Throws:
InvalidCryptoSystemException - Thrown if the specified cryptosystem is invalid.
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.
Category:
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()
Returns a String that indicates the algorithm, ie "EC".

Specified by:
getAlgorithm in interface CryptoSystem
Returns:
A String representing the algorithm.
Category:
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

getAsymmetricCryptoToken

public AsymmetricCryptoToken getAsymmetricCryptoToken()
Returns the EC Crypto token associated with the crypto token.

Specified by:
getAsymmetricCryptoToken in interface CryptoSystem
Returns:
The EC crypto token.
Category:
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

getCryptoTokenData

public CryptoTokenCryptoSystemData getCryptoTokenData()
Returns the crypto token data.

Returns:
The data associated with the crypto token.
Category:
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

getName

public String getName()
               throws CryptoTokenException,
                      CryptoUnsupportedOperationException
Returns a String that indicates the name of the elliptic curve, eg "EC163K1".

Specified by:
getName in interface CryptoSystem
Returns:
A String that represents the name.
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.
Category:
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

getBitLength

public int getBitLength()
                 throws CryptoTokenException,
                        CryptoUnsupportedOperationException
Returns the length (in bits) of the field for this system's curve. Notice that the "field" refers to the finite field that the elliptic curve is defined over and the length refers to either the size of the prime or the degree of the irreducible polynomial that helps define the field.

Specified by:
getBitLength in interface CryptoSystem
Returns:
An integer that represents the length in bits.
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.
See Also:
CryptoSystem.isStrong()
Category:
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

isStrong

public boolean isStrong()
                 throws CryptoTokenException,
                        CryptoUnsupportedOperationException
Returns whether or not the CryptoSystem is cryptographically strong as of the release date of the code.

Note: Due to the nature of cryptography, things that are presently strong may be insecure in the future.

Specified by:
isStrong in interface CryptoSystem
Returns:
true if the crypto system is strong as of the release date of this code.
Throws:
CryptoTokenException - Thrown when a problem occurs with a crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown when a call is made to an unsupported operation.
Category:
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

getFieldLength

public int getFieldLength()
                   throws CryptoTokenException,
                          CryptoUnsupportedOperationException
Returns the length (in bytes) of the field for this system's curve. Notice that the "field" refers to the finite field that the elliptic curve is defined over and the length refers to either the size of the prime or the degree of the irreducible polynomial that helps define the field.

Returns:
An integer that represents the field length.
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.
Category:
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

getBasePoint

public ECPublicKey getBasePoint()
                         throws CryptoTokenException,
                                CryptoUnsupportedOperationException,
                                InvalidKeyException
This function returns the base point of this elliptic curve.

Returns:
an ECPublicKey of the base point for the elliptic curve.
Throws:
CryptoTokenException
CryptoUnsupportedOperationException
InvalidKeyException
Category:
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 4.0.0

getGroupOrder

public byte[] getGroupOrder()
                     throws CryptoTokenException,
                            CryptoUnsupportedOperationException
This functions returns the number of points in the group generated by the base point of this elliptic curve.

Returns:
a byte[] containing the group order
Throws:
CryptoTokenException
CryptoUnsupportedOperationException
Category:
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 4.0.0

getA

public byte[] getA()
            throws CryptoTokenException,
                   CryptoUnsupportedOperationException
This functions returns the "a" coefficient of this elliptic curve, defined by the equation y^2 = x^3 + ax + b ( in the F_p case ) or y^2 + xy = x^3 + ax^2 + b ( in the F_2^m case ). For more information see FIPS 186-2 or P1363.

Returns:
a byte[] containing the a coefficient
Throws:
CryptoTokenException
CryptoUnsupportedOperationException
Category:
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 4.0.0

getB

public byte[] getB()
            throws CryptoTokenException,
                   CryptoUnsupportedOperationException
This functions returns the "b" coefficient of this elliptic curve, defined by the equation y^2 = x^3 + ax + b ( in the F_p case ) or y^2 + xy = x^3 + ax^2 + b ( in the F_2^m case ). For more information see FIPS 186-2 or P1363.

Returns:
a byte[] containing the group order
Throws:
CryptoTokenException
CryptoUnsupportedOperationException
Category:
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 4.0.0

getCofactor

public byte[] getCofactor()
                   throws CryptoTokenException,
                          CryptoUnsupportedOperationException
This functions returns the cofactor of this elliptic curve.

Returns:
a byte[] containing the cofactor
Throws:
CryptoTokenException
CryptoUnsupportedOperationException
Category:
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 4.0.0

getFieldReductor

public byte[] getFieldReductor()
                        throws CryptoTokenException,
                               CryptoUnsupportedOperationException
This functions returns the field reductor of this elliptic curve. If the elliptic curve is defined by the equation y^2 = x^3 + ax + b ( in the F_p case ) then this function returns "p" otherwise, if it is defined by the equation y^2 + xy = x^3 + ax^2 + b ( in the F_2^m case ) then it returns the irreducible polynomial that defines the field. For more information see FIPS 186-2 or P1363.

Returns:
a byte[] containing the field reductor
Throws:
CryptoTokenException
CryptoUnsupportedOperationException
Category:
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 4.0.0

getPublicKeyLength

public int getPublicKeyLength()
                       throws CryptoTokenException,
                              CryptoUnsupportedOperationException
Returns the length (in bytes) of a compressed public key for this system's curve. Note that the public key is encoded as an ANSI X9.62 ECPoint object and the compression follows the ANSI X9.62 compression format.

Returns:
An integer that represents the public key length, in bytes.
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.
Category:
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

getPublicKeyLength

public int getPublicKeyLength(boolean compressed)
                       throws CryptoTokenException,
                              CryptoUnsupportedOperationException
Returns the length (in bytes) of a public key for this system's curve. Note that the public key is encoded as an ANSI X9.62 ECPoint object.

Parameters:
compressed - Specifies whether to determine the length of a compressed ( using the ANSI X9.62 format ) or uncompressed Public Key. If this is true, then use compression, otherwise don't.
Returns:
An integer that represents the public key length, in bytes.
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.
Category:
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

getPrivateKeyLength

public int getPrivateKeyLength()
                        throws CryptoTokenException,
                               CryptoUnsupportedOperationException
Returns the length (in bytes) of a private key for this system's curve. Note that the private key is an element of the finite field that the elliptic curve is defined over.

Returns:
An integer that represents the private key length, in bytes.
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.
Category:
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

getType

public int getType()
            throws CryptoTokenException,
                   CryptoUnsupportedOperationException
Returns the type (prime or binary) of this system's curve.

Returns:
An integer that represents the curve type.
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.
Category:
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 5.0.0

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), Hashtable
Category:
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

equals

public boolean equals(Object obj)
Description copied from class: Object
Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation:

The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable
Category:
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

createKeyPair

public KeyPair createKeyPair()
                      throws CryptoTokenException,
                             CryptoUnsupportedOperationException
Description copied from interface: CryptoSystem
Creates a new key pair using this crypto system.

Specified by:
createKeyPair in interface CryptoSystem
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.
Category:
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

createECKeyPair

public ECKeyPair createECKeyPair()
                          throws CryptoTokenException,
                                 CryptoUnsupportedOperationException
Throws:
CryptoTokenException
CryptoUnsupportedOperationException
Category:
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-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal