Changes to the RIM Cryptographic API
FIPS compliance is no longer enforced by default, which requires several changes to the AES implementation.
The AES implementation in the RIM® Cryptographic API has changed. Prior to BlackBerry® Java® SDK 7.0, a FIPS-validated version of the AES encryption algorithm was always used, but with 7.0 the BlackBerry device automatically chooses the version of AES that allows for the best performance. This flexibility is possible because BlackBerry devices running BlackBerry® Desktop Software version 7.0 or later do not use FIPS compliant AES implementations by default. Most developers do not need to create FIPS compliant applications. The option to enforce FIPS compliance on BlackBerry devices is available in a BlackBerry® Enterprise Server environment. To enforce FIPS compliance, your BlackBerry Enterprise Server administrator must set the new IT policy rule "Enforce FIPS Mode of Operation."
If you do not implement FIPS compliant applications, you do not need to change your existing applications. If you have an existing application that must continue to be FIPS compliant, you may need to modify it in the following ways:
- Change your implementation of AESEncryptorEngine(), AESDecryptorEngine(), AESCBCEncryptorEngine(), and AESCBCDecryptorEngine() to set the parameter useFIPSmode to true
- Change your implementation of getPRNG() to set the set the parameter prngType to PRNG_TYPE_AES_CTR_DRBG
- In setting up pseudorandom data, if you implemented the RandomSource class, you do not need to change it, the type will automatically change depending on the BlackBerry Enterprise Server settings. However, if you implemented the FIPS186PseudoRandomSource class and you want to maintain FIPS compliance, you need to change the name FIPS186PseudoRandomSource to AESCTRDRBGPseudoRandomSource
- FIPS compliance is now available only in BlackBerry Enterprise Server environments. To enforce FIPS compliance, your BlackBerry Enterprise Server administrator must set the new IT policy "Enforce FIPS Mode of Operation". For more information, see the BlackBerry Enterprise Solution Security Technical Overview, available at www.blackberry.com/security
The following is a summary of the changes to the RIM Cryptographic API:
- A new FIPS-validated random source is added: the AES cipher-based Deterministic Random Bit Generator. It is represented by a new constant in the Crypto class, PRNG_TYPE_AES_CTR_DRBG
- Another constant was added: PRNG_TYPE_FIPS186. Previously, this was the only random number generator. (As the only type, it did not previously need to be specified.) This random number generator is no longer FIPS compliant
- Crypto.getPRNG() now supports the parameter prngType. It can be set to PRNG_TYPE_AES_CTR_DRBG (for FIPS compliance) or PRNG_TYPE_FIPS186 (for no FIPS compliance)
- AESEncryptorEngine(), AESDecryptorEngine(), AESCBCEncryptorEngine(), and AESCBCDecryptorEngine() each has a new Boolean parameter called useFIPSmode
- A parameter name was changed in AESEncryptorEngine(), AESDecryptorEngine(), AESCBCEncryptorEngine(), and AESCBCDecryptorEngine(). The parameter inECMMode is changed to useCPAProtection. This name change was made for ease of use and does not affect functionality
- The AESCTRDRBGPseudoRandomSource class was introduced. The implementation of AESCTRDRBGPseudoRandomSource is identical to FIPS186PseudoRandomSource except that the new class can be used for FIPS compliance. The FIPS186PseudoRandomSource class can no longer be used to generate pseudorandom data in a FIPS compliant applications, but it can still be used for applications that do not require FIPS compliance.
Security for NFC
Two new constants have been added to the net.rim.device.api.applicationcontrol.ApplicationPermissions class. They are:
PERMISSION_NFC: Controls an application's ability to access Near Field Communication
PERMISSION_SECURE_ELEMENT: Controls an application's ability to access the secure elements embedded in the phone or on a SIM card
Each of these new permissions can be set to VALUE_ALLOW, VALUE_PROMPT, or VALUE_DENY. The default value for both permissions is VALUE_PROMPT.