Would you like to tell us how we are doing?

You bet No thanks

Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.

Developing smart card drivers

BlackBerry smartphones include the drivers that support the use of certain smart cards. The supported smart card readers require associated drivers. If you want to use a supported smart card on a supported reader, you do not have to write a driver for the smart card or a driver for the smart card reader. In the other potential scenarios of smart card and smart card reader usage you must create and register the drivers.

Scenario Implementation requirements
supported reader and unsupported card Create and register a driver for the smart card by implementing the abstract SmartCard or CryptoSmartCard class and the abstract SmartCardSession class.
unsupported reader and supported card Create and register a driver for the smart card reader by implementing the abstract SmartCardReader class and the abstract SmartCardReaderSession class.
unsupported reader and unsupported card Create and register a driver for the smart card by implementing the abstract SmartCard or CryptoSmartCard class and the abstract SmartCardSession class. Also, create and register a driver for the smart card reader by implementing the abstract SmartCardReader class and the abstract SmartCardReaderSession class.

To create drivers that interact with smart cards and the BlackBerry Smart Card Reader, you can use the net.rim.device.api.smartcard package and the net.rim.device.api.crypto packages in the Smart Card API.

A driver for a cryptographic smart card that implements the Smart Card API can work with the S/MIME Support Package for BlackBerry smartphones on a smartphone that has S/MIME support. A driver for a cryptographic smart card can perform signing private key operations on the smart card such as signing and decrypting messages. A driver for a cryptographic smart card does not require the S/MIME Support Package for BlackBerry smartphones to be able to import certificates from the smart card, or to provide two-factor authentication for a BlackBerry smartphone. For more information on S/MIME, see the BlackBerry with the S/MIME Support Package.

The Smart Card API that is provided in BlackBerry JDE 4.2 or later contains some deprecated elements. The deprecated elements provide backward compatibility if you create a driver for a cryptographic smart card for smartphones with BlackBerry Device Software 4.1.x. If you want to create a driver for a cryptographic smart card for smartphones with BlackBerry Device Software 4.1 or later, you can use the deprecated elements to avoid creating two versions of the driver.

If you want to create a driver for a cryptographic smart card for smartphones with BlackBerry Device Software 4.2 or later, use the nondeprecated API elements in the Smart Card API.

Supported smart cards

BlackBerry smartphones include drivers that enable the use of the smart cards listed in the following table. You can create drivers to support additional smart cards by implementing the abstract SmartCard and SmartCardSession classes.

Smart card

Description

CAC

CAC smart cards are the cards that are used by the United States Department of Defense.

PIV

PIV smart cards are the cards that are used by United States government employees and contractors.

SafeNet Model 330

The SafeNet Model 330 smart card is a cryptographic smart card with an embedded microcontroller and 32K of memory.

Smart card driver infrastructure

BlackBerry smartphones include a software infrastructure that enables them to communicate with a smart card by interacting with the smart card reader the card is inserted in.

When you insert a smart card into a smart card reader, the reader driver retrieves the ATR of the smart card. As a reader driver developer, you must provide an implementation for SmartCardReaderSession.getAnswerToResetImpl() that retrieves and returns the ATR of the smart cards the reader supports.

As a smart card driver developer, you must provide an implementation of SmartCard.checkAnswerToResetImpl(AnswerToReset atr), that returns True if your driver should be used to communicate with the smart card with the provided ATR.