SHOW Signed SHOW CryptoExtensionAPI
 

net.rim.device.api.crypto
Class SmartCardRSACryptoToken

java.lang.Object
  |
  +--net.rim.device.api.crypto.RSACryptoToken
        |
        +--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.

Category:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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:
JDE 4.2.0
See Also:
RSACryptoToken

Field Summary
 
Fields inherited from interface net.rim.device.api.crypto.AsymmetricCryptoToken
KEY_GENERATION, PRIVATE_KEY_OPERATION, PUBLIC_KEY_OPERATION
 
Constructor Summary
 Category: CryptoExtensionAPI Category: Signed protected SmartCardRSACryptoToken()
          Deprecated. 
 
Method Summary
 Category: CryptoExtensionAPI Category: Signed  void decryptRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. 
 Category: CryptoExtensionAPI Category: Signed protected abstract  void decryptRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. 
 Category: CryptoExtensionAPI Category: Signed  boolean isSupportedDecryptRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData)
          Deprecated. 
 Category: CryptoExtensionAPI Category: Signed protected abstract  boolean isSupportedDecryptRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData)
          Deprecated. 
 Category: CryptoExtensionAPI Category: Signed  void signRSA(RSACryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. 
 Category: CryptoExtensionAPI Category: Signed protected abstract  void signRSASmartCardImpl(CryptoSystem cryptoSystem, CryptoTokenPrivateKeyData privateKeyData, byte[] input, int inputOffset, byte[] output, int outputOffset)
          Deprecated. 
 
Methods inherited from class net.rim.device.api.crypto.RSACryptoToken
createRSAKeyPair, 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.

Since:
JDE 4.2.0
Category:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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.
Method Detail

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
Since:
JDE 4.2.0

Following copied from 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:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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.

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.
Since:
JDE 4.2.0
See Also:
RSACryptoToken.decryptRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData, byte[], int, byte[], int)
Category:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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.

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
Since:
JDE 4.2.0

Following copied from 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:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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.

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.
Since:
JDE 4.2.0
See Also:
RSACryptoToken.isSupportedDecryptRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData)
Category:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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.

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
Since:
JDE 4.2.0

Following copied from 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:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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.

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.
Since:
JDE 4.2.0
See Also:
RSACryptoToken.signRSA(net.rim.device.api.crypto.RSACryptoSystem, net.rim.device.api.crypto.CryptoTokenPrivateKeyData, byte[], int, byte[], int)
Category:
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
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.



Copyright 1999-2009 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.