net.rim.device.api.crypto
Interface CryptoSystem
- All Superinterfaces:
- Persistable
- All Known Implementing Classes:
- DHCryptoSystem, DSACryptoSystem, ECCryptoSystem, KEACryptoSystem, RSACryptoSystem
public interface CryptoSystem
- extends Persistable
A CryptoSystem
generically defines all cryptosystems (such as ECCryptoSystem, DSACryptoSystem, etc)
that are used in the Crypto API.
- 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 Summary |
|
KeyPair |
createKeyPair()
Creates a new key pair using this crypto system. |
|
String |
getAlgorithm()
Returns a String that indicates the algorithm, eg "EC", "RSA", etc. |
|
AsymmetricCryptoToken |
getAsymmetricCryptoToken()
Returns the crypto token associated with this crypto system. |
|
int |
getBitLength()
Returns the number of bits (aka the "strength") of the crypto system, eg 1024 (for RSA), 163 (for EC). |
|
String |
getName()
Returns a String that indicates the name of the crypto system, eg "WTLS1", "SUN1024", "EC160R1", etc. |
|
boolean |
isStrong()
Returns whether or not the CryptoSystem is cryptographically strong as of the release
date of the code. |
|
void |
verify()
Performs certain integrity checks on the crypto system parameters. |
getAlgorithm
String getAlgorithm()
- Returns a String that indicates the algorithm, eg "EC", "RSA", etc.
- 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
getBitLength
int getBitLength()
throws CryptoTokenException,
CryptoUnsupportedOperationException
- Returns the number of bits (aka the "strength") of the crypto system, eg 1024 (for RSA), 163 (for EC).
Note: the strength of a CryptoSystem is a combination of the algorithm and the bit length.
For example, a 1024 bit RSA CryptoSystem is estimated to have the same
cryptographic strength as 160 bit EC CryptoSystem.
- Returns:
- An integer that represents the number of bits.
- 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.- 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
getName
String getName()
throws CryptoTokenException,
CryptoUnsupportedOperationException
- Returns a String that indicates the name of the crypto system, eg "WTLS1", "SUN1024", "EC160R1", etc.
- Returns:
- A String representing the name of the algorithm.
- 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
isStrong
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.
Note: The strength of a CryptoSystem is a combination of the algorithm and the bit length.
For example, a 1024 bit RSA CryptoSystem is estimated to have the same
cryptographic strength as 160 bit EC 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
verify
void verify()
throws InvalidCryptoSystemException,
CryptoTokenException,
CryptoUnsupportedOperationException
- 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.
- 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
createKeyPair
KeyPair createKeyPair()
throws CryptoTokenException,
CryptoUnsupportedOperationException
- Creates a new key pair using this crypto system.
- 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
getAsymmetricCryptoToken
AsymmetricCryptoToken getAsymmetricCryptoToken()
- Returns the crypto token associated with this crypto system.
- 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