Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Advanced features of the Cryptography API

by Retired ‎02-12-2010 01:11 PM - edited ‎09-17-2010 04:25 PM (2,534 Views)



Build an application that uses advanced features in the Cryptography API such as encryption, decryption, signing and verification using public key cryptography.

Prerequisite: You should have completed the lab entitled Basic encryption and decryption before starting this exercise.



  • Discover how to use a PublicKey for encryption.
  • Discover how to use a PrivateKey for signing.
  • Discover how to use a PrivateKey for decryption.
  • Discover how to use a PublicKey for verification.


  1. Open AdvancedCryptoDeveloperLab_1.zip
  2. In the IDE, open the AdvancedCryptoDeveloperLab.jdw workspace
  3. Open the AdvancedCryptoDeveloperLab.java source file.


  1. Complete the implementation of the encrypt method:
  1. Implement the encrypt method using the RSAPublicKey.
  2. Implement the sign method using the RSAPrivateKey.
  3. Implement the decrypt method using the RSAPrivateKey.
  4. Implement the verify method using the RSAPublicKey.

Note: You are required to import the net_rim_crypto.jar file into your project to access the Cryptography API.


Check Your Work


Check AdvancedCryptoDeveloperLab_2.zip



In this exercise, you discovered the following things:

  • to use a PublicKey for encryption and for verification.
  • to use a PrivateKey for signing and for decryption.
Users Online
Currently online: 43 members 1,352 guests
Please welcome our newest community members: