|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.crypto.RSACryptoToken
|
+--net.rim.device.api.crypto.SmartCardRSACryptoToken
An interface for RSA cryptographic smart cards to implement. The RIM Crypto API will call this interface when a RSA operation is to be performed on a RSA enabled cryptographic smart card.
RSACryptoToken| Field Summary |
| Fields inherited from interface net.rim.device.api.crypto.AsymmetricCryptoToken |
KEY_GENERATION, PRIVATE_KEY_OPERATION, PUBLIC_KEY_OPERATION |
| Constructor Summary | ||
|
protected |
SmartCardRSACryptoToken()
Deprecated. |
| Method Summary | ||
|
void |
decryptRSA(RSACryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData,
byte[] input,
int inputOffset,
byte[] output,
int outputOffset)
Deprecated. |
|
protected abstract void |
decryptRSASmartCardImpl(CryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData,
byte[] input,
int inputOffset,
byte[] output,
int outputOffset)
Deprecated. |
|
boolean |
isSupportedDecryptRSA(RSACryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData)
Deprecated. |
|
protected abstract boolean |
isSupportedDecryptRSASmartCardImpl(CryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData)
Deprecated. |
|
void |
signRSA(RSACryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData,
byte[] input,
int inputOffset,
byte[] output,
int outputOffset)
Deprecated. |
|
protected abstract void |
signRSASmartCardImpl(CryptoSystem cryptoSystem,
CryptoTokenPrivateKeyData privateKeyData,
byte[] input,
int inputOffset,
byte[] output,
int outputOffset)
Deprecated. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected SmartCardRSACryptoToken()
SmartCardRSACryptoToken object.
This constructor is not used.
| Method Detail |
public void decryptRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset) throws CryptoTokenException
RSACryptoTokenNotes: The token should do a raw RSA private key operation on the input data to reveal the plaintext bytes. The plaintext byes will typically be padded; the type of padding will depend on the application which encrypted the data. Typically PKCS #1 version 2.0 will be used for padding the data, but other schemes (such as OAEP) could be used. If the token removes the padding this method will need to re-add the same type of padding before returning. Data encrypted with BlackBerry's S/MIME implementation currently uses PKCS #1 padding but may use other padding methods in the future.
decryptRSA in class RSACryptoToken
RSACryptoTokencryptoSystem - The crypto system associated with the token.privateKeyData - The RSA private key.input - The input data.inputOffset - The offset in the input data to begin reading from.output - The buffer for the output data.outputOffset - The offset in the output buffer to begin writing at.CryptoTokenException - Thrown if an error occurs with a crypto
token or the crypto token is invalid.protected abstract void decryptRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset) throws CryptoTokenException
Notes: The token should do a raw RSA private key operation on the input data to reveal the plaintext bytes. The plaintext byes will typically be padded; the type of padding will depend on the application which encrypted the data. Typically PKCS #1 version 2.0 will be used for padding the data, but other schemes (such as OAEP) could be used. If the token removes the padding this method will need to re-add the same type of padding before returning. Data encrypted with BlackBerry's S/MIME implementation currently uses PKCS #1 padding but may use other padding methods in the future.
cryptoSystem - The crypto system associated with the token.privateKeyData - The RSA private key.input - The input data.inputOffset - The offset in the input data to begin reading from.output - The buffer for the output data.outputOffset - The offset in the output buffer to begin writing at.CryptoTokenException - Thrown if an error occurs with a crypto
token or the crypto token is invalid.RSACryptoToken.decryptRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData, byte[], int, byte[], int)public boolean isSupportedDecryptRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData) throws CryptoTokenException
RSACryptoTokenisSupportedDecryptRSA in class RSACryptoToken
RSACryptoTokencryptoSystem - The crypto system to check.privateKeyData - The private key data.CryptoTokenException - Thrown if an error occurs with a crypto
token or the crypto token is invalid.protected abstract boolean isSupportedDecryptRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData) throws CryptoTokenException
cryptoSystem - The crypto system to check.privateKeyData - The private key data.CryptoTokenException - Thrown if an error occurs with a crypto
token or the crypto token is invalid.RSACryptoToken.isSupportedDecryptRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData)public void signRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset) throws CryptoTokenException, CryptoUnsupportedOperationException
RSACryptoTokenNotes: The token should do a raw RSA private key operation on the input data. The input data will typically be padded; the type of padding will depend on the application requesting the signature. Typically PKCS #1 version 2.0 will be used for padding the data, but other schemes (such as PSS or ANSI X9.31) could be used. If the token requires that the padding be removed before signing, this method will need to detect the type of padding currently being used and remove it. The token should only re-apply the same type of padding which was originally applied to the data. If the token is unable to re-apply the same type of padding an UnsupportedOperationException should be thrown. Signature requests which come from BlackBerry's S/MIME implementation currently use PKCS #1 padding but may use other padding methods in the future.
signRSA in class RSACryptoToken
RSACryptoTokencryptoSystem - The crypto system associated with the token.privateKeyData - The RSA private key.input - The input data.inputOffset - The offset in the input data to begin reading from.output - The buffer for the output data.outputOffset - The offset in the output buffer to begin writing at.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
or if the token does not support signing due to the type of padding around the encoded message.protected abstract void signRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset) throws CryptoTokenException, CryptoUnsupportedOperationException
Notes: The token should do a raw RSA private key operation on the input data. The input data will typically be padded; the type of padding will depend on the application requesting the signature. Typically PKCS #1 version 2.0 will be used for padding the data, but other schemes (such as PSS or ANSI X9.31) could be used. If the token requires that the padding be removed before signing, this method will need to detect the type of padding currently being used and remove it. The token should only re-apply the same type of padding which was originally applied to the data. If the token is unable to re-apply the same type of padding an UnsupportedOperationException should be thrown. Signature requests which come from BlackBerry's S/MIME implementation currently use PKCS #1 padding but may use other padding methods in the future.
cryptoSystem - The crypto system associated with the token.privateKeyData - The RSA private key.input - The input data.inputOffset - The offset in the input data to begin reading from.output - The buffer for the output data.outputOffset - The offset in the output buffer to begin writing at.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
or if the token does not support signing due to the type of padding around the encoded message.RSACryptoToken.signRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData, byte[], int, byte[], int)
|
|||||||||
| 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.