net.rim.device.api.crypto
Class SmartCardRSACryptoToken

java.lang.Object
  extended by net.rim.device.api.crypto.RSACryptoToken
      extended by net.rim.device.api.crypto.SmartCardRSACryptoToken
All Implemented Interfaces:
AsymmetricCryptoToken, CryptoToken, Persistable, Persistable

Deprecated. This class will be deprecated in release 4.2 and above, smart card tokens should extend RSACryptoToken directly instead of extending this class.

public abstract class SmartCardRSACryptoToken
extends RSACryptoToken
implements Persistable

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.

See Also:
RSACryptoToken
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.2.0

Field Summary
 
Fields inherited from interface net.rim.device.api.crypto.AsymmetricCryptoToken
KEY_GENERATION, PRIVATE_KEY_OPERATION, PUBLIC_KEY_OPERATION
 
Constructor Summary
Category: Signed protected SmartCardRSACryptoToken()
          Deprecated. Creates a new SmartCardRSACryptoToken object.
 
Method Summary
Category: Signed  void decryptRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. Performs a raw RSA decryption operation.
Category: Signed protected abstract  void decryptRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. Performs a raw RSA decryption operation.
Category: Signed  boolean isSupportedDecryptRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData)
          Deprecated. Returns a boolean that determines if the given key and crypto system support RSA encryption.
Category: Signed protected abstract  boolean isSupportedDecryptRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData)
          Deprecated. Returns a boolean that determines if the given key and crypto system support RSA encryption.
Category: Signed  void signRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. Performs a raw RSA signature operation.
Category: Signed protected abstract  void signRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. Performs a raw RSA signature operation.
 
Methods inherited from class net.rim.device.api.crypto.RSACryptoToken
createRSAKeyPair, decryptRSA, deleteRSAPrivateKey, deleteRSAPublicKey, encryptRSA, extractRSAPrivateKeyD, extractRSAPrivateKeyDModPm1, extractRSAPrivateKeyDModQm1, extractRSAPrivateKeyE, extractRSAPrivateKeyN, extractRSAPrivateKeyP, extractRSAPrivateKeyQ, extractRSAPrivateKeyQInvModP, extractRSAPublicKeyE, extractRSAPublicKeyN, getAlgorithm, getSuggestedRSACryptoSystems, injectRSAPrivateKey, injectRSAPrivateKey, injectRSAPrivateKey, injectRSAPrivateKey, injectRSAPublicKey, isSupported, isSupportedEncryptRSA, providesUserAuthentication, signRSA, verifyRSA
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

SmartCardRSACryptoToken

protected SmartCardRSACryptoToken()
Deprecated. 
Creates a new SmartCardRSACryptoToken object.

This constructor is not used.

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.2.0


Method Detail

isSupportedDecryptRSA

public boolean isSupportedDecryptRSA(RSACryptoSystem cryptoSystem,
                                     CryptoTokenPrivateKeyData privateKeyData)
                              throws CryptoTokenException
Deprecated. 
Description copied from class: RSACryptoToken
Returns a boolean that determines if the given key and crypto system support RSA encryption.

Overrides:
isSupportedDecryptRSA in class RSACryptoToken
Parameters:
cryptoSystem - The crypto system to check.
privateKeyData - The private key data.
Returns:
A boolean that indicates if the token supports RSA encryption.
Throws:
CryptoTokenException - Thrown if an error occurs with a crypto token or the crypto token 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 4.2.0

isSupportedDecryptRSASmartCardImpl

protected abstract boolean isSupportedDecryptRSASmartCardImpl(CryptoSystem cryptoSystem,
                                                              CryptoTokenPrivateKeyData privateKeyData)
                                                       throws CryptoTokenException
Deprecated. 
Returns a boolean that determines if the given key and crypto system support RSA encryption.

Parameters:
cryptoSystem - The crypto system to check.
privateKeyData - The private key data.
Returns:
A boolean that indicates if the token supports RSA encryption.
Throws:
CryptoTokenException - Thrown if an error occurs with a crypto token or the crypto token is invalid.
See Also:
RSACryptoToken.isSupportedDecryptRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData)
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.2.0

decryptRSA

public void decryptRSA(RSACryptoSystem cryptoSystem,
                       CryptoTokenPrivateKeyData privateKeyData,
                       byte[] input,
                       int inputOffset,
                       byte[] output,
                       int outputOffset)
                throws CryptoTokenException
Deprecated. 
Description copied from class: RSACryptoToken
Performs a raw RSA decryption operation.

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.

Overrides:
decryptRSA in class RSACryptoToken
Parameters:
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.
Throws:
CryptoTokenException - Thrown if an error occurs with a crypto token or the crypto token 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 4.2.0

decryptRSASmartCardImpl

protected abstract void decryptRSASmartCardImpl(CryptoSystem cryptoSystem,
                                                CryptoTokenPrivateKeyData privateKeyData,
                                                byte[] input,
                                                int inputOffset,
                                                byte[] output,
                                                int outputOffset)
                                         throws CryptoTokenException
Deprecated. 
Performs a raw RSA decryption operation.

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.

Parameters:
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.
Throws:
CryptoTokenException - Thrown if an error occurs with a crypto token or the crypto token is invalid.
See Also:
RSACryptoToken.decryptRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData, byte[], int, byte[], int)
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.2.0

signRSA

public void signRSA(RSACryptoSystem cryptoSystem,
                    CryptoTokenPrivateKeyData privateKeyData,
                    byte[] input,
                    int inputOffset,
                    byte[] output,
                    int outputOffset)
             throws CryptoTokenException,
                    CryptoUnsupportedOperationException
Deprecated. 
Description copied from class: RSACryptoToken
Performs a raw RSA signature operation.

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.

Overrides:
signRSA in class RSACryptoToken
Parameters:
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.
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 or if the token does not support signing due to the type of padding around the encoded message.
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.2.0

signRSASmartCardImpl

protected abstract void signRSASmartCardImpl(CryptoSystem cryptoSystem,
                                             CryptoTokenPrivateKeyData privateKeyData,
                                             byte[] input,
                                             int inputOffset,
                                             byte[] output,
                                             int outputOffset)
                                      throws CryptoTokenException,
                                             CryptoUnsupportedOperationException
Deprecated. 
Performs a raw RSA signature operation.

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.

Parameters:
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.
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 or if the token does not support signing due to the type of padding around the encoded message.
See Also:
RSACryptoToken.signRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData, byte[], int, byte[], int)
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.2.0





Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.