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:
- Instantiate the
Cipherclass. - Instantiate a
DESKeyobject. - Set the
Cipherobject for encryption or decryption. - Get the encrypted or decrypted output.
I'll discuss each of them in detail.