Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

Cryptography in Java Card

Added 31 Jul 2008

In this section I'll discuss the support for cryptography in the Java Card API. I will also discuss the limitations of the cryptograpy features available in the current version of the Java Card Development Kit (JCDK) and show you how to overcome those limitations to enable dual-factor security.

I'll start by discussing the cryptographic support in the Java Card API.

Cryptography support in the Java Card API

The Java Card API has a package named javacardx.crypto that provides cryptographic support. This package contains a class named Cipher, which you can use for encryption and decryption according to different encryption algorithms.

You need to perform following four steps to use the Cipher class for encryption or decryption:

  1. Instantiate the Cipher class.
  2. Instantiate a DESKey object.
  3. Set the Cipher object for encryption or decryption.
  4. Get the encrypted or decrypted output.

I'll discuss each of them in detail.