|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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 |
public 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.public String getAlgorithm()
public AsymmetricCryptoToken getAsymmetricCryptoToken()
public 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.isStrong()public String getName() throws CryptoTokenException, CryptoUnsupportedOperationException
public 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.
public 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 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.