|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CryptoSystem
A CryptoSystem generically defines all cryptosystems (such as ECCryptoSystem, DSACryptoSystem, etc)
that are used in the Crypto API.
| 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. |
| Method Detail |
|---|
String getAlgorithm()
int getBitLength()
throws CryptoTokenException,
CryptoUnsupportedOperationException
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.
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.CryptoSystem.isStrong()
String getName()
throws CryptoTokenException,
CryptoUnsupportedOperationException
CryptoTokenException
CryptoUnsupportedOperationException
boolean isStrong()
throws CryptoTokenException,
CryptoUnsupportedOperationException
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.
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.
void verify()
throws InvalidCryptoSystemException,
CryptoTokenException,
CryptoUnsupportedOperationException
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.
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.
KeyPair createKeyPair()
throws CryptoTokenException,
CryptoUnsupportedOperationException
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.AsymmetricCryptoToken getAsymmetricCryptoToken()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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